Summary: | [10/11/12/13 Regression] Redundant move is generated after r228097 | ||
---|---|---|---|
Product: | gcc | Reporter: | Yuri Rumyantsev <ysrumyan> |
Component: | rtl-optimization | Assignee: | Bernd Schmidt <bernds> |
Status: | ASSIGNED --- | ||
Severity: | normal | CC: | dimhen, fredrik.hederstierna, hp, jakub, jeffreyalaw, vmakarov |
Priority: | P2 | Keywords: | missed-optimization, ra |
Version: | 6.0 | ||
Target Milestone: | 10.5 | ||
Host: | Target: | i?86-*-* | |
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2016-03-09 00:00:00 | |
Attachments: | test-case to reproduce |
Description
Yuri Rumyantsev
2016-02-02 16:44:51 UTC
Created attachment 37559 [details]
test-case to reproduce
Need to be compiled with -O2 -m32 -pie -fPIE.
Assume that -march=slm is not needed.
Doesn't seem to happen over here. Can you still reproduce this with trunk? Please post exact arguments to cc1 if it does. Sorry for a confusion. The bug must be closed as user mistake. 2016-03-07 19:18 GMT+03:00 bernds at gcc dot gnu.org <gcc-bugzilla@gcc.gnu.org>: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69633 > > Bernd Schmidt <bernds at gcc dot gnu.org> changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |bernds at gcc dot gnu.org > > --- Comment #2 from Bernd Schmidt <bernds at gcc dot gnu.org> --- > Doesn't seem to happen over here. Can you still reproduce this with trunk? > Please post exact arguments to cc1 if it does. > > -- > You are receiving this mail because: > You reported the bug. Closing then. Strange, I can still reproduce it: ./cc1.228094 -quiet -O2 -m32 -fPIE pr69633.c -o pr69633.s1 -march=i386 \ -mtune=generic ./cc1.228097 -quiet -O2 -m32 -fPIE pr69633.c -o pr69633.s2 -march=i386 \ -mtune=generic ./cc1.228153 -quiet -O2 -m32 -fPIE pr69633.c -o pr69633.s3 -march=i386 \ -mtune=generic ./cc1.234064 -quiet -O2 -m32 -fPIE pr69633.c -o pr69633.s4 -march=i386 \ -mtune=generic Compared to the first one, all the others have one more instruction in the function. E.g. between s1 and s3 there is: @@ -44,17 +41,18 @@ foo: addl %edi, %ebx imull $7471, %ecx, %edi leal 32768(%ebx,%edi), %ebx - imull $-15119, %eax, %edi sarl $16, %ebx movb %bl, -3(%ebp) movl %edx, %ebx sall $15, %ebx - subl %edx, %ebx + movl %ebx, %edi + imull $-15119, %eax, %ebx + subl %edx, %edi + imull $13282, %edx, %edx addl %edi, %ebx imull $-17648, %ecx, %edi - imull $13282, %edx, %edx - leal 32768(%ebx,%edi), %ebx imull $19485, %ecx, %ecx + leal 32768(%ebx,%edi), %ebx sarl $16, %ebx movb %bl, -2(%ebp) movl %eax, %ebx s1 to s4 has more changes, but also one more instruction. Taking a closer look. GCC 6.1 has been released. GCC 6.2 is being released, adjusting target milestone. GCC 6.2 is being released, adjusting target milestone. GCC 6.3 is being released, adjusting target milestone. GCC 6.4 is being released, adjusting target milestone. GCC 6 branch is being closed From my reading, it looks like we do worse now than in previous releases. Things look OK going into IRA. The IRA allocations are different, but I haven't analyzed in any detail why and if one is inherently better than the other. LRA inserts more reloads/copies on the trunk than we did way back in r228097. The GCC 7 branch is being closed, re-targeting to GCC 8.4. GCC 8.4.0 has been released, adjusting target milestone. GCC 8 branch is being closed. GCC 9.4 is being released, retargeting bugs to GCC 9.5. GCC 9 branch is being closed GCC 10.4 is being released, retargeting bugs to GCC 10.5. |