fixed loop-invariant nodes: Bad nodes are always loop invariant,
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Fri, 17 Jun 2005 17:31:33 +0000 (17:31 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Fri, 17 Jun 2005 17:31:33 +0000 (17:31 +0000)
but did not work in the test

[r6063]

ir/opt/reassoc.c

index 8f12a13..79d6015 100644 (file)
@@ -56,7 +56,11 @@ static const_class_t get_const_class(ir_node *n, ir_node *block)
     return REAL_CONSTANT;
   if (op == op_SymConst)
     return CONST_EXPR;
-  if (is_loop_invariant(n, block))
+  /*
+   * Beware: Bad nodes are always loop-invariant, but
+   * cannot handles in later code, so filter them here
+   */
+  if (! is_Bad(n) && is_loop_invariant(n, block))
     return CONST_EXPR;
 
   return NO_CONSTANT;