| 1 |
/* { dg-do compile { target { s390*-*-* } } } */ |
| 2 |
/* { dg-options "-O3 -mzarch -march=z13 -mzvector" } */ |
| 3 |
|
| 4 |
/* { dg-final { scan-assembler-times "vtm" 2 } } */ |
| 5 |
/* { dg-final { scan-assembler-times "ipm" 1 } } */ |
| 6 |
|
| 7 |
#include <vecintrin.h> |
| 8 |
|
| 9 |
/* CC will be extracted into a GPR and returned. */ |
| 10 |
int |
| 11 |
foo (vector unsigned int a, vector unsigned b) |
| 12 |
{ |
| 13 |
return vec_test_mask (a, b); |
| 14 |
} |
| 15 |
|
| 16 |
extern void baz (void); |
| 17 |
|
| 18 |
/* In that case the ipm/srl is supposed to optimized out by |
| 19 |
combine/s390_canonicalize_comparison. */ |
| 20 |
int |
| 21 |
bar (vector unsigned int a, vector unsigned b) |
| 22 |
{ |
| 23 |
if (vec_test_mask (a, b) == 2) |
| 24 |
baz (); |
| 25 |
} |