gcc/testsuite/gcc.dg/vect/pr92324-3.c
raw| 1 | #include "tree-vect.h" |
| 2 | |
| 3 | int a[1024]; |
| 4 | unsigned b[1024]; |
| 5 | |
| 6 | int __attribute__((noipa)) |
| 7 | foo (int n) |
| 8 | { |
| 9 | int res = 0; |
| 10 | for (int i = 0; i < n; ++i) |
| 11 | { |
| 12 | res = res > a[i] ? res : a[i]; |
| 13 | res = res > b[i] ? res : b[i]; |
| 14 | } |
| 15 | return res; |
| 16 | } |
| 17 | |
| 18 | int main () |
| 19 | { |
| 20 | check_vect (); |
| 21 | b[3] = (unsigned)__INT_MAX__ + 1; |
| 22 | if (foo (4) != -__INT_MAX__ - 1) |
| 23 | __builtin_abort (); |
| 24 | return 0; |
| 25 | } |
| 26 | |
| 27 | /* { dg-final { scan-tree-dump-not "vectorized \[1-9\] loops" "vect" } } */ |