Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/sve/acle/general/cmpeq_3.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3
4 #include <arm_sve.h>
5
6 void
7 test1 (svbool_t pg, svfloat32_t x, svfloat32_t y, int *any, svbool_t *ptr)
8 {
9 svbool_t res = svcmpeq (pg, x, y);
10 *any = svptest_any (pg, res);
11 *ptr = res;
12 }
13
14 int
15 test2 (svbool_t pg, svfloat32_t x, svfloat32_t y, int *any)
16 {
17 svbool_t res = svcmpeq (pg, x, y);
18 return svptest_any (pg, res);
19 }
20
21 void
22 test3 (svbool_t pg, svfloat32_t x, int *any, svbool_t *ptr)
23 {
24 svbool_t res = svcmpeq (pg, x, 0.0);
25 *any = svptest_any (pg, res);
26 *ptr = res;
27 }
28
29 int
30 test4 (svbool_t pg, svfloat32_t x, int *any)
31 {
32 svbool_t res = svcmpeq (pg, x, 0.0);
33 return svptest_any (pg, res);
34 }
35
36 /* { dg-final { scan-assembler-times {\tfcmeq\t} 4 } } */
37 /* { dg-final { scan-assembler-times {\tfcmeq\t[^\n]*, #0\.0} 2 } } */
38 /* { dg-final { scan-assembler-times {\tptest\t} 4 } } */