| 1 |
/* PR tree-optimization/111150 */ |
| 2 |
/* { dg-do compile } */ |
| 3 |
/* { dg-options "-O1 -fdump-tree-forwprop1 -Wno-psabi" } */ |
| 4 |
|
| 5 |
typedef int v4si __attribute((__vector_size__(4 * sizeof(int)))); |
| 6 |
|
| 7 |
/* Before the patch, VEC_COND_EXPR was generated for each statement in the |
| 8 |
function. This resulted in 3 VEC_COND_EXPR. */ |
| 9 |
v4si f1_(v4si a, v4si b, v4si c, v4si d) { |
| 10 |
v4si X = a == b; |
| 11 |
v4si Y = c == d; |
| 12 |
return (X != Y); |
| 13 |
} |
| 14 |
|
| 15 |
v4si f2_(v4si a, v4si b, v4si c, v4si d) { |
| 16 |
v4si X = a == b; |
| 17 |
v4si Y = c == d; |
| 18 |
return (X == Y); |
| 19 |
} |
| 20 |
|
| 21 |
/* For each testcase, should produce only one VEC_COND_EXPR for X^Y. */ |
| 22 |
/* { dg-final { scan-tree-dump-times " VEC_COND_EXPR " 2 "forwprop1" } } */ |
| 23 |
/* { dg-final { scan-tree-dump-times " == " 4 "forwprop1" } } */ |