2015-12-10 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / fuse-caller-save-xmm.c
blobc2d0544d665ddf68f4103fe1445d37fbc513ec45
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -msse2 -mno-avx -fipa-ra -fomit-frame-pointer" } */
4 typedef double v2df __attribute__((vector_size (16)));
6 static v2df __attribute__((noinline))
7 bar (v2df a)
9 return a + (v2df){ 3.0, 3.0 };
12 v2df __attribute__((noinline))
13 foo (v2df y)
15 return y + bar (y);
18 /* For !nonpic && ia32 xfails, see PR64895. */
20 /* Check presence of all insns on xmm registers. These checks are expected to
21 pass with both -fipa-ra and -fno-ipa-ra. */
22 /* { dg-final { scan-assembler-times "addpd\t\\.?LC0.*, %xmm0" 1 } } */
23 /* { dg-final { scan-assembler-times "addpd\t%xmm1, %xmm0" 1 { xfail { { ! nonpic } && ia32 } } } } */
24 /* { dg-final { scan-assembler-times "movapd\t%xmm0, %xmm1" 1 { xfail { { ! nonpic } && ia32 } } } } */
26 /* Check absence of save/restore of xmm1 register. */
27 /* { dg-final { scan-assembler-not "movaps\t%xmm1, \\(%\[re\]?sp\\)" } } */
28 /* { dg-final { scan-assembler-not "movapd\t\\(%\[re\]?sp\\), %xmm1" } } */