| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -mlsx -ftree-vectorize -fdump-tree-optimized" } */ |
| 3 |
|
| 4 |
#ifndef N |
| 5 |
#define N 4 |
| 6 |
#endif |
| 7 |
|
| 8 |
extern float a[N], b[N]; |
| 9 |
extern int c[N], d[N]; |
| 10 |
|
| 11 |
void |
| 12 |
bar1 (void) |
| 13 |
{ |
| 14 |
for (int i = 0; i < N; i++) |
| 15 |
d[i] = a[i] > b[i] ? 0 : c[i]; |
| 16 |
} |
| 17 |
|
| 18 |
void |
| 19 |
bar2 (void) |
| 20 |
{ |
| 21 |
for (int i = 0; i < N; i++) |
| 22 |
d[i] = a[i] > b[i] ? c[i]: -1; |
| 23 |
} |
| 24 |
|
| 25 |
/* We should produce a BIT_ANDC and BIT_IORC here. */ |
| 26 |
|
| 27 |
/* { dg-final { scan-tree-dump ".BIT_ANDN " "optimized" } } */ |
| 28 |
/* { dg-final { scan-tree-dump ".BIT_IORN " "optimized" } } */ |