This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/85989] Incorrect result for example involving unary minus in a loop


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85989

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-05-30
                 CC|                            |rsandifo at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  It is backprop somehow concluding that the load is never negative:

--- t.i.093t.ccp2       2018-05-30 16:28:48.811740654 +0200
+++ t.i.096t.backprop   2018-05-30 16:28:48.811740654 +0200
@@ -59,13 +59,12 @@
   <bb 5> [local count: 286363364]:
   _3 = *P5_32(D);
   _4 = (int) _3;
-  P29_36 = -_4;
   b_P5_37 = b_P5_20 + 1;

   <bb 6> [local count: 322154758]:
   # b_P5_20 = PHI <b_P5_37(5), 0(16)>
   # P26_22 = PHI <P29_23(5), 10(16)>
-  # P29_23 = PHI <P29_36(5), 10(16)>
+  # P29_23 = PHI <_4(5), 10(16)>
   if (b_P5_20 <= 7)
     goto <bb 5>; [88.89%]
   else

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]