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