On 11/26/2015 12:12 PM, Kyrill Tkachov wrote:
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index af7a3b9..3e3dc8d 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -2220,7 +2220,7 @@ noce_try_cmove_arith (struct noce_if_info *if_info)
          }

      }
-    if (emit_a && modified_in_a)
+    if (emit_a || modified_in_a)
        {
Having stared at it in the debugger for a while, I think I managed to convince myself that this is correct. So, OK.

A few other comments. This whole if block is indented too far, please fix while you're there. Also eliminate the unnecessary blank lines before closing braces (two instances inside this if block). There are other formatting errors in this function, but those are best left alone for now.

        modified_in_b = emit_b != NULL_RTX && modified_in_p (orig_a, emit_b);

Can this ever be true? We arrange for emit_b to set a new pseudo, don't we? Are we allowing cases where we copy a pattern that sets more than one register, and is that safe?


Bernd

Reply via email to