[Bug target/82271] New: loop gets miscompiled on powerpc at -O2
sirl at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 20 15:25:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82271
Bug ID: 82271
Summary: loop gets miscompiled on powerpc at -O2
Product: gcc
Version: 7.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: sirl at gcc dot gnu.org
Target Milestone: ---
Created attachment 42211
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42211&action=edit
testcase
The attached testcase removes conditions in the loop when compiled for
powerpc-eabi with -O2. On the trunk the bug got fixed (went latent?) with
r247886. Applying this revision to current 7.2.1@r252980 also fixes it there.
When comparing trunk compilers r247885 and r247886 the differences start in the
ivopts dump. Further on in the vrp2 dump, the difference is easy to see,
r247886 does have "if (nAccessSize_67 == 4096)", r247885 doesn't have it.
A quick check suggests this bug is there since at least 4.7. If I read the
dumps correctly, I couldn't reproduce it with x86, either -m32 or -m64.
More information about the Gcc-bugs
mailing list