| 1 |
/* { dg-do compile { target { ! ia32 } } } */ |
| 2 |
/* { dg-require-effective-target maybe_x32 } */ |
| 3 |
/* { dg-options "-maddress-mode=short -mx32 -Ofast -funroll-loops -march=haswell" } */ |
| 4 |
/* { dg-final { scan-assembler-not "\tvgather" } } */ |
| 5 |
/* { dg-final { scan-assembler "addr32 vgather" } } */ |
| 6 |
|
| 7 |
void foo (void); |
| 8 |
|
| 9 |
extern float *ncost; |
| 10 |
|
| 11 |
float |
| 12 |
bar (int type, int num) |
| 13 |
{ |
| 14 |
int i; |
| 15 |
float cost; |
| 16 |
|
| 17 |
cost = 0; |
| 18 |
for (i = 0; i < num; i++) |
| 19 |
if (type) |
| 20 |
cost += ncost[i]; |
| 21 |
else |
| 22 |
foo (); |
| 23 |
return (cost); |
| 24 |
} |