i386: Add V2SFmode DIV insn pattern [PR95046, PR103797]
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pr95046-1.c
blob2a0e6db5fa5af0dc2566a818cee7e928e21bcbbf
1 /* PR target/95046 */
2 /* { dg-do compile { target { ! ia32 } } } */
3 /* { dg-options "-O3 -ffast-math -msse2 -mno-recip" } */
6 float r[2], a[2], b[2];
8 void
9 test_plus (void)
11 for (int i = 0; i < 2; i++)
12 r[i] = a[i] + b[i];
15 /* { dg-final { scan-assembler "\tv?addps" } } */
17 void
18 test_minus (void)
20 for (int i = 0; i < 2; i++)
21 r[i] = a[i] - b[i];
24 /* { dg-final { scan-assembler "\tv?subps" } } */
26 void
27 test_mult (void)
29 for (int i = 0; i < 2; i++)
30 r[i] = a[i] * b[i];
33 /* { dg-final { scan-assembler "\tv?mulps" } } */
35 void
36 test_div (void)
38 for (int i = 0; i < 2; i++)
39 r[i] = a[i] / b[i];
42 /* { dg-final { scan-assembler "\tv?divps" } } */
44 void
45 test_min (void)
47 for (int i = 0; i < 2; i++)
48 r[i] = a[i] < b[i] ? a[i] : b[i];
51 /* { dg-final { scan-assembler "\tv?minps" } } */
53 void
54 test_max (void)
56 for (int i = 0; i < 2; i++)
57 r[i] = a[i] > b[i] ? a[i] : b[i];
60 /* { dg-final { scan-assembler "\tv?maxps" } } */
62 float sqrtf (float);
64 void
65 test_sqrt (void)
67 for (int i = 0; i < 2; i++)
68 r[i] = sqrtf (a[i]);
71 /* { dg-final { scan-assembler "\tv?sqrtps" } } */