This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/58143] [4.8/4.9 regression] wrong code at -O3
- From: "bernd.edlinger at hotmail dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 15 Oct 2013 11:45:46 +0000
- Subject: [Bug tree-optimization/58143] [4.8/4.9 regression] wrong code at -O3
- Auto-submitted: auto-generated
- References: <bug-58143-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58143
--- Comment #22 from Bernd Edlinger <bernd.edlinger at hotmail dot de> ---
(In reply to Richard Biener from comment #21)
hmm...
all these test cases simply work with my patch...
I tried this example (with my latest patch, but trunk from 22/9/13)
and the result is quite different:
@@ -135,11 +332,10 @@
intD.6 a.2D.1739;
unsigned intD.9 b.1D.1736;
intD.6 b.0D.1735;
- unsigned intD.9 _6;
- intD.6 _7;
+ intD.6 _8;
_BoolD.1701 _9;
- unsigned int ivtmp_12;
- unsigned int ivtmp_15;
+ unsigned int _11;
+ unsigned int _13;
intD.6 pretmp_23;
intD.6 pretmp_25;
intD.6 pretmp_32;
@@ -161,11 +357,10 @@
;; 2 [100.0%] (FALLTHRU,EXECUTABLE)
# .MEM_18 = PHI <.MEM_18(11), .MEM_2(D)(2)>
# b.0_20 = PHI <b.6_14(11), 4(2)>
- # ivtmp_15 = PHI <ivtmp_12(11), 34(2)>
- b.1_5 = (unsigned intD.9) b.0_20;
- _6 = 2147483647 - b.1_5;
- _7 = (intD.6) _6;
- _9 = _7 < pretmp_23;
+ _13 = (unsigned int) b.0_20;
+ _11 = 2147483647 - _13;
+ _8 = (intD.6) _11;
+ _9 = _8 < pretmp_23;
e.3_10 = (intD.6) _9;
goto <bb 9>;
;; succ: 9 [100.0%] (FALLTHRU,EXECUTABLE)
@@ -219,8 +414,7 @@
;; prev block 9, next block 11, flags: (NEW, REACHABLE)
;; pred: 9 [9.0%] (FALSE_VALUE,EXECUTABLE)
b.6_14 = b.0_20 + -1;
- ivtmp_12 = ivtmp_15 - 1;
- if (ivtmp_12 != 0)
+ if (b.6_14 != -30)
goto <bb 11>;
else
goto <bb 12>;