This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/61801] sched2 miscompiles syscall sequence with -g
- 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, 15 Jul 2014 09:47:19 +0000
- Subject: [Bug rtl-optimization/61801] sched2 miscompiles syscall sequence with -g
- Auto-submitted: auto-generated
- References: <bug-61801-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization, ra
CC| |aoliva at gcc dot gnu.org,
| |vmakarov at gcc dot gnu.org
Known to fail| |4.10.0, 4.8.3, 4.9.1
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Reduced testcase also reproduces the bug with 4.9 and trunk (but not 4.7):
movl 64(%esp), %eax # cmdp, tmp206
movl 4(%esp), %esi # %sfp, result
.LVL36:
movl (%eax), %eax # cmdp_30(D)->syscall_no,
cmdp_30(D)->syscall_no
movl %eax, 4(%esp) # cmdp_30(D)->syscall_no, %sfp
.LVL37:
movl 64(%esp), %eax # cmdp, tmp208
movl 4(%eax), %edi # cmdp_30(D)->id, cmdp_30(D)->id
movl 8(%eax), %ecx # cmdp_30(D)->id, cmdp_30(D)->id
movl 12(%eax), %edx # cmdp_30(D)->id, cmdp_30(D)->id
movl %esi, %eax # result, result
#APP
# 75 "bug-887141_pthread_create.1.min.i" 1
xchgl %ebx, %edi
int $0x80
xchgl %edi, %ebx
Note that 4.7 doesn't spill %eax but generates
movl 0(%ebp), %esi # cmdp_18(D)->syscall_no, result
.LVL45:
movl 4(%ebp), %edi # cmdp_18(D)->id, cmdp_18(D)->id
movl 8(%ebp), %ecx # cmdp_18(D)->id, cmdp_18(D)->id
movl 12(%ebp), %edx # cmdp_18(D)->id, cmdp_18(D)->id
movl %esi, %eax # result,
#APP
# 75 "bug-887141_pthread_create.1.min.i" 1
xchgl %ebx, %edi
int $0x80
xchgl %edi, %ebx
which would be an IRA issue?