Commit 52f2a1d6 authored by yb9976's avatar yb9976
Browse files

Handle corner case in reassociation.

This fixes opt/reassoc035.c.
parent 5c8df19f
......@@ -808,6 +808,13 @@ static void do_shannon(ir_graph *irg)
get_irn_node_nr(top_node),
get_irn_node_nr(other_node)));
/* This case can be handled by local optimizations.
* We skip the case, because we would otherwise
* simplify a & a to -1 & -1, or need to track edges
* instead of nodes in the optimization environment. */
if (base_node == other_node)
continue;
/* check if optimization is still valid */
if (middle_node) {
if (!has_operand(middle_node, top_node) || !has_operand(base_node, middle_node)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment