Debian Codegraph @

gcc/testsuite/gcc.target/s390/zvector/vec-unsigned-compile.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -mzarch -march=arch13 -mzvector -fno-asynchronous-unwind-tables -dp" } */
3
4 #include <vecintrin.h>
5
6 vector unsigned int
7 vclfeb (vector float a)
8 {
9 return vec_unsigned (a);
10 }
11
12 /* { dg-final { scan-assembler-times "vclfeb.*\n\tvclfeb.*fixuns_truncv4sfv4si2" 1 } } */
13
14 vector unsigned long long
15 vclgdb (vector double a)
16 {
17 return vec_unsigned (a);
18 }
19
20 /* { dg-final { scan-assembler-times "vclgdb.*\n\tvclgdb.*fixuns_truncv2dfv2di2" 1 } } */
21
22 vector unsigned int
23 vclfeb_mem (vector float *a)
24 {
25 return vec_unsigned (*a);
26 }
27
28 vector unsigned long long
29 vclgdb_mem (vector double *a)
30 {
31 return vec_unsigned (*a);
32 }
33
34 /* The following immediates are being converted and directly stored
35 in the literal pool so no explicit conversion is necessary. */
36 /* { dg-final { scan-assembler-times "vl\t%v\[0-9\]+,\.L\[0-9\]+\-\.L\[0-9\]+\\(%r\[0-9\]+\\)" 2 } } */
37
38 vector unsigned int
39 vclfeb_imm ()
40 {
41 return vec_unsigned ((vector float) { 1.0f, 2.0f });
42 }
43
44 vector unsigned long long
45 vclgdb_imm ()
46 {
47 return vec_unsigned ((vector double){ 1.0, 2.0 });
48 }
49
50 /* { dg-final { scan-assembler-times "vclfeb\t" 2 } } */
51 /* { dg-final { scan-assembler-times "vclgdb\t" 2 } } */