http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46197
Summary: Bad split_stack_return pattern in i386.md Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: hjl.to...@gmail.com CC: ubiz...@gmail.com On Linux/x86, revision 166000 gave FAIL: gcc.target/i386/avx-vzeroupper-10.c scan-assembler-times avx_vzeroupper 3 FAIL: gcc.target/i386/avx-vzeroupper-11.c scan-assembler-times avx_vzeroupper 3 FAIL: gcc.target/i386/avx-vzeroupper-12.c scan-assembler-times avx_vzeroupper 1 FAIL: gcc.target/i386/avx-vzeroupper-14.c scan-assembler-times avx_vzeroupper 1 FAIL: gcc.target/i386/avx-vzeroupper-7.c scan-assembler-times avx_vzeroupper 1 FAIL: gcc.target/i386/avx-vzeroupper-9.c scan-assembler-times avx_vzeroupper 1 The problem is (define_insn "split_stack_return" [(unspec_volatile [(match_operand:SI 0 "const_int_operand" "")] UNSPEC_STACK_CHECK)] vs. (define_insn "avx_vzeroupper" [(unspec_volatile [(match_operand 0 "const_int_operand" "")] UNSPECV_VZEROUPPER)] I generate avx_zeroupper. But it matches split_stack_return since (int) UNSPEC_STACK_CHECK == (int) UNSPECV_VZEROUPPER.