combine.c (combine_simplify_rtx): Avoid mis-simplifying conditionals for STORE_FLAG_V...
authorMaxim Kuvyrkov <maxim@codesourcery.com>
Mon, 25 Apr 2011 12:06:27 +0000 (12:06 +0000)
committerMaxim Kuvyrkov <mkuvyrkov@gcc.gnu.org>
Mon, 25 Apr 2011 12:06:27 +0000 (12:06 +0000)
* combine.c (combine_simplify_rtx): Avoid mis-simplifying conditionals
for STORE_FLAG_VALUE==-1 case.

Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>
From-SVN: r172930

gcc/ChangeLog
gcc/combine.c

index 505d7437cd93f71f206f965f6491324c71617856..a115d78fddc39ec3e4ee860c3587f58ef54264bf 100644 (file)
@@ -1,3 +1,9 @@
+2011-04-25  Maxim Kuvyrkov  <maxim@codesourcery.com>
+           Eric Botcazou <ebotcazou@adacore.com>
+
+       * combine.c (combine_simplify_rtx): Avoid mis-simplifying conditionals
+       for STORE_FLAG_VALUE==-1 case.
+
 2011-04-24  Richard Sandiford  <richard.sandiford@linaro.org>
 
        PR target/43804
index 240cd918d2ff73899fcf08543fbdac1a04818e2f..7bdbed4144c4a3b4dfe722444bbbc987c8649538 100644 (file)
@@ -5787,7 +5787,10 @@ combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest,
 
          /* If STORE_FLAG_VALUE is -1, we have cases similar to
             those above.  */
-         if (STORE_FLAG_VALUE == -1
+         if (in_cond)
+           ;
+
+         else if (STORE_FLAG_VALUE == -1
              && new_code == NE && GET_MODE_CLASS (mode) == MODE_INT
              && op1 == const0_rtx
              && (num_sign_bit_copies (op0, mode)