gcc/testsuite/g++.dg/vect/pr112961.cc
raw| 1 | // { dg-do compile } |
| 2 | // { dg-require-effective-target vect_int } |
| 3 | |
| 4 | inline const int& maxx (const int& a, const int &b) |
| 5 | { |
| 6 | return a > b ? a : b; |
| 7 | } |
| 8 | |
| 9 | int foo(int *a) |
| 10 | { |
| 11 | int max = 0; |
| 12 | for (int i = 0; i < 1024; ++i) |
| 13 | max = maxx(max, a[i]); |
| 14 | return max; |
| 15 | } |
| 16 | |
| 17 | // { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { xfail vect_no_int_min_max } } } |