gcc/testsuite/gcc.target/i386/pr94494.c
raw| 1 | /* PR target/94494 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-O2 -ftree-vectorize -msse -mno-sse2" } */ |
| 4 | |
| 5 | void |
| 6 | foo (float *item, float *f, float *out, |
| 7 | int threshold, int wi, int lo, int hi, int value) |
| 8 | { |
| 9 | for (int i = 0; i < wi; i++) { |
| 10 | if (item[i] > 0) { |
| 11 | int found = 0; |
| 12 | |
| 13 | for (int k = lo; k < hi; k++) |
| 14 | if (f[k] > 0) |
| 15 | found = 1; |
| 16 | |
| 17 | if (found > 0) |
| 18 | out[i] = threshold; |
| 19 | else if (out[i] > value) |
| 20 | out[i] -= 1; |
| 21 | } |
| 22 | } |
| 23 | } |