Make fp optimization dependent on the fp model.
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sun, 2 Jul 2006 16:25:37 +0000 (16:25 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sun, 2 Jul 2006 16:25:37 +0000 (16:25 +0000)
[r7984]

ir/opt/reassoc.c

index b0144db..e5ac876 100644 (file)
@@ -367,8 +367,11 @@ static void do_reassociation(ir_node *n, void *env)
 
     res = 0;
 
-    /* reassociation works only for integer or reference modes */
-    if (op->ops.reassociate && (mode_is_int(mode) || mode_is_reference(mode))) {
+    /* for FP these optimizations are only allowed if fp_strict_algebraic is disabled */
+    if (mode_is_float(mode) && get_irg_fp_model(current_ir_graph) & fp_strict_algebraic)
+      break;
+
+    if (op->ops.reassociate) {
       res = op->ops.reassociate(&n);
 
       wenv->changes |= res;