isl_scheduler.c: graph_find_compressed_node: look up node in correct graph
The function graph_find_compressed_node has a fail-safe that checks
that the pointer recorded in the isl_id actually corresponds
to a node in the graph. However, it failed to take into account
that the pointer refers to the original dependence graph,
while the graph in which the node is looked up may be subgraph
(with different node pointers).
Check that the node is valid for the original graph rather than
the current graph and if the current graph is not the same as
the original graph, then look up the corresponding node in
the current graph.
The new test case is different from the one that was
reported by Michael Kruse because the latter does not
appear to have a valid solution.
The test case is checked using the isl_schedule (and isl_schedule_cmp)
application(s) because it is easier to introduce test cases this way
(both the current test case and any future scheduling test cases).
Reported-by: Michael Kruse <MichaelKruse@meinersbur.de>
Signed-off-by: Sven Verdoolaege <sven.verdoolaege@gmail.com>