simplify-rtx.c (simplify_unary_operation): Only transform (not (eq X Y)) into (ne...
authorRoger Sayle <roger@eyesopen.com>
Thu, 18 Sep 2003 19:07:04 +0000 (19:07 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Thu, 18 Sep 2003 19:07:04 +0000 (19:07 +0000)
* simplify-rtx.c (simplify_unary_operation): Only transform
(not (eq X Y)) into (ne X Y) when mode is BImode or STORE_FLAG_VALUE
is -1.  RTL "not" is a bit-wise not, "~", not a logical not "!".

From-SVN: r71532

gcc/ChangeLog
gcc/simplify-rtx.c

index 0b4f6d619602a1b26f536f26242ea636166bd201..aac42bff409f23831118c59c5fa5485effb16867 100644 (file)
@@ -1,3 +1,9 @@
+2003-09-18  Roger Sayle  <roger@eyesopen.com>
+
+       * simplify-rtx.c (simplify_unary_operation): Only transform
+       (not (eq X Y)) into (ne X Y) when mode is BImode or STORE_FLAG_VALUE
+       is -1.  RTL "not" is a bit-wise not, "~", not a logical not "!".
+
 2003-09-18  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
 
        PR target/11674
index f2da9eef4d0659c1f7d7fda2f79b2520cc1efbfb..c338b665ca00815f37ba6e96859c3cfe42f817f5 100644 (file)
@@ -808,6 +808,7 @@ simplify_unary_operation (enum rtx_code code, enum machine_mode mode,
 
          /* (not (eq X Y)) == (ne X Y), etc.  */
          if (GET_RTX_CLASS (GET_CODE (op)) == '<'
+             && (mode == BImode || STORE_FLAG_VALUE == -1)
              && ((reversed = reversed_comparison_code (op, NULL_RTX))
                  != UNKNOWN))
            return simplify_gen_relational (reversed, mode, VOIDmode,