comparison gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* { dg-additional-options "-fno-math-errno -fdisable-tree-sincos" } */
2 /* { dg-require-effective-target vect_float } */
3
4 void __attribute__ ((noipa))
5 f (float *a)
6 {
7 a[0] = a[0] * a[0];
8 a[1] = __builtin_powf (a[1], 2);
9 a[2] = a[2] * a[2];
10 a[3] = __builtin_powf (a[3], 2);
11 }
12
13 float a[4] = { 1, 2, 3, 4 };
14
15 int
16 main (void)
17 {
18 f (a);
19 for (int i = 0; i < 4; ++i)
20 {
21 if (a[i] != (i + 1) * (i + 1))
22 __builtin_abort ();
23 asm volatile ("" ::: "memory");
24 }
25 return 0;
26 }
27
28 /* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" } } */