PR c++/85077
[official-gcc.git] / gcc / testsuite / g++.dg / ext / vector35.C
blob22ff513091aaec61844b655a6930033ce5f1bcd8
1 // PR c++/85077
2 // { dg-do compile }
3 // { dg-options "-Ofast -fdump-tree-forwprop1" }
5 typedef float V __attribute__((vector_size (4 * sizeof (float))));
6 typedef double W __attribute__((vector_size (2 * sizeof (double))));
8 void
9 foo (V *y)
11   V x = *y;
12   *y = x < 0 ? -x : x;
15 void
16 bar (W *y)
18   W x = *y;
19   *y = x < 0 ? -x : x;
22 // { dg-final { scan-tree-dump-times "ABS_EXPR <" 2 "forwprop1" } }