| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-veclower2" } */ |
| 3 |
/* PR tree-optimization/110473 */ |
| 4 |
/* convertvector lowering should produce directly the casts |
| 5 |
rather than lower them to scalar. */ |
| 6 |
|
| 7 |
typedef unsigned int v4si __attribute__ ((vector_size (4*sizeof(int)))); |
| 8 |
typedef unsigned short v4hi __attribute__ ((vector_size (4*sizeof(short)))); |
| 9 |
|
| 10 |
v4si f(v4si a, v4si b) |
| 11 |
{ |
| 12 |
v4hi t = __builtin_convertvector (a, v4hi); |
| 13 |
v4si t1 = __builtin_convertvector (t, v4si); |
| 14 |
return t1; |
| 15 |
} |
| 16 |
|
| 17 |
/* { dg-final { scan-assembler-times "\txtn\t" 1 } } */ |
| 18 |
/* { dg-final { scan-assembler-times "\tuxtl\t" 1 } } */ |
| 19 |
/* { dg-final { scan-tree-dump-times " = .v4hi. a_" 1 "veclower21" } } */ |
| 20 |
/* { dg-final { scan-tree-dump-times " = .v4si. " 1 "veclower21" } } */ |