| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-lim-details" } */ |
| 3 |
|
| 4 |
/* PR tree-optimization/117234 */ |
| 5 |
/* VEC_DUPLICATE_EXPR should not be declared as |
| 6 |
a trapping. */ |
| 7 |
#include <arm_sve.h> |
| 8 |
|
| 9 |
svfloat32_t f(float a, int t, _Bool *b) |
| 10 |
{ |
| 11 |
svfloat32_t tt = svdup_f32(0.0); |
| 12 |
for (int i =0 ;i < t; i++) |
| 13 |
{ |
| 14 |
if (b[i]) |
| 15 |
tt = svadd_f32_z(svptrue_b32(),tt,svdup_f32(a)); |
| 16 |
} |
| 17 |
return tt; |
| 18 |
} |
| 19 |
|
| 20 |
/* There should be 1 `invariant up to level`, one for the VEC_DUPLICATE_EXPR. */ |
| 21 |
/* { dg-final { scan-tree-dump-times "invariant up to level" 1 "lim2" } } */ |