This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/66375] [4.8/4.9/5 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 02 Jun 2015 09:31:24 +0000
- Subject: [Bug middle-end/66375] [4.8/4.9/5 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu
- Auto-submitted: auto-generated
- References: <bug-66375-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66375
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at gcc dot gnu.org
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
PRE doesn't seem to do sth wrong here. The testcase can be fixed by for
example disabling VRP2. VRP2 needs either store-motion or complete unrolling
to
make it trigger the miscompile. Nicest IL before VRP2 is with -fno-ivopts
-fno-tree-loop-im. The transform VRP2 does is
Folding statement: if (a.4_17 <= 13)
Simplified relational if (a.4_17 <= 13)
into if (a.4_17 != 14)
and
Registering jump thread: (6, 7) incoming edge; (7, 8) normal;
Threaded jump 6 --> 7 to 12
<bb 6>:
# prephitmp_3 = PHI <prephitmp_22(5)>
# prephitmp_39 = PHI <prephitmp_22(5)>
<bb 7>:
# prephitmp_26 = PHI <prephitmp_39(6), pretmp_23(3)>
if (prephitmp_26 != 113)
goto <bb 8>;
else
goto <bb 9>;
<bb 8>:
__builtin_abort ();
so it looks jump-threading related to me. Somehow the equivalences I
see being recorded miss the backedge for prephitmp_22 but only record zero.