Generate avx_vzeroupper after reload is completed.
gcc/ 2010-11-03 H.J. Lu <hongjiu.lu@intel.com> PR target/46285 * config/i386/i386.c (ix86_expand_call): Conditionally decorate calls with UNSPEC_CALL_NEEDS_VZEROUPPER unspec before reload is completed. gcc/testsuite/ 2010-11-03 H.J. Lu <hongjiu.lu@intel.com> PR target/46285 * gcc.target/i386/pr46285.c. From-SVN: r166240
This commit is contained in:
parent
02ff830b58
commit
72fdf9e9c4
4 changed files with 27 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
|||
2010-11-03 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR target/46285
|
||||
* config/i386/i386.c (ix86_expand_call): Conditionally decorate
|
||||
calls with UNSPEC_CALL_NEEDS_VZEROUPPER unspec before reload
|
||||
is completed.
|
||||
|
||||
2010-11-03 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/46217
|
||||
|
|
|
@ -21540,10 +21540,16 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1,
|
|||
else
|
||||
avx256 = call_no_avx256;
|
||||
|
||||
unspec = gen_rtx_UNSPEC (VOIDmode,
|
||||
gen_rtvec (1, GEN_INT (avx256)),
|
||||
UNSPEC_CALL_NEEDS_VZEROUPPER);
|
||||
call = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, call, unspec));
|
||||
if (reload_completed)
|
||||
emit_insn (gen_avx_vzeroupper (GEN_INT (avx256)));
|
||||
else
|
||||
{
|
||||
unspec = gen_rtx_UNSPEC (VOIDmode,
|
||||
gen_rtvec (1, GEN_INT (avx256)),
|
||||
UNSPEC_CALL_NEEDS_VZEROUPPER);
|
||||
call = gen_rtx_PARALLEL (VOIDmode,
|
||||
gen_rtvec (2, call, unspec));
|
||||
}
|
||||
}
|
||||
|
||||
call = emit_call_insn (call);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2010-11-03 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR target/46285
|
||||
* gcc.target/i386/pr46285.c.
|
||||
|
||||
2010-11-03 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR tree-optimization/46217
|
||||
|
|
5
gcc/testsuite/gcc.target/i386/pr46285.c
Normal file
5
gcc/testsuite/gcc.target/i386/pr46285.c
Normal file
|
@ -0,0 +1,5 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-mavx -fsplit-stack -mtune=generic" } */
|
||||
|
||||
typedef char __m256 __attribute__ ((__vector_size__ (32)));
|
||||
void foo (__m256 x) {}
|
Loading…
Add table
Reference in a new issue