http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52170

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-02-08
     Ever Confirmed|0                           |1

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-02-08 
11:38:15 UTC ---
Caused by

            case NOT:
              /* ~a -> (-a - 1) */
              if (n_ops != 7)
                {
                  ops[n_ops].op = constm1_rtx;
                  ops[n_ops++].neg = this_neg;
                  ops[i].op = XEXP (this_op, 0);
                  ops[i].neg = !this_neg;
                  changed = 1;
                  canonicalized = 1;
                }
              break;

fixed by

Index: gcc/simplify-rtx.c
===================================================================
--- gcc/simplify-rtx.c  (revision 183997)
+++ gcc/simplify-rtx.c  (working copy)
@@ -3945,7 +3945,8 @@ simplify_plus_minus (enum rtx_code code,

            case NOT:
              /* ~a -> (-a - 1) */
-             if (n_ops != 7)
+             if (n_ops != 7
+                 && SCALAR_INT_MODE_P (GET_MODE (this_op)))
                {
                  ops[n_ops].op = constm1_rtx;
                  ops[n_ops++].neg = this_neg;

or by using a proper constant instead of constm1_rtx.

Reply via email to