This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/69633] [6 Regression] Redundant move is generated after r228097
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 09 Mar 2016 10:34:23 +0000
- Subject: [Bug rtl-optimization/69633] [6 Regression] Redundant move is generated after r228097
- Auto-submitted: auto-generated
- References: <bug-69633-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69633
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |NEW
Last reconfirmed| |2016-03-09
Resolution|INVALID |---
Ever confirmed|0 |1
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
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.