Debian Codegraph @

gcc/testsuite/gcc.target/aarch64/ccmp_3.c

raw
1 /* { dg-options "-O2" } */
2 /* PR target/100942 */
3
4 void foo(void);
5 int f1(int a, int b)
6 {
7 int c = a == 0 || b == 0;
8 if (c) foo();
9 return c;
10 }
11
12 /* We should get one cmp followed by ccmp and one cset. */
13 /* { dg-final { scan-assembler "\tccmp\t" } } */
14 /* { dg-final { scan-assembler-times "\tcset\t" 1 } } */
15 /* { dg-final { scan-assembler-times "\tcmp\t" 1 } } */
16 /* And not get 2 cmps and 2 (or more cset) and orr and a cbnz. */
17 /* { dg-final { scan-assembler-not "\torr\t" } } */
18 /* { dg-final { scan-assembler-not "\tcbnz\t" } } */
19 /* { dg-final { scan-assembler-not "\tcbz\t" } } */
20