Debian Codegraph @

gcc/testsuite/gcc.target/riscv/cset-sext-sfb.c

raw
1 /* { dg-do compile { target { ! riscv_abi_e } } } */
2 /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" "-O1" "-Os" } } */
3 /* { dg-options "-march=rv32gc -mtune=sifive-7-series -mbranch-cost=1 -fno-ssa-phiopt -fdump-rtl-ce1" { target { rv32 } } } */
4 /* { dg-options "-march=rv64gc -mtune=sifive-7-series -mbranch-cost=1 -fno-ssa-phiopt -fdump-rtl-ce1" { target { rv64 } } } */
5
6 int
7 foo (long a, long b)
8 {
9 if (!b)
10 return 0;
11 else if (a)
12 return 1;
13 else
14 return 0;
15 }
16
17 /* Expect short forward branch assembly like:
18
19 snez a0,a0
20 bne a1,zero,1f # movcc
21 mv a0,zero
22 1:
23 */
24
25 /* { dg-final { scan-rtl-dump-times "if-conversion succeeded through noce_try_cmove_arith" 1 "ce1" } }
26 /* { dg-final { scan-assembler-times "\\ssnez\\s" 1 } } */
27 /* { dg-final { scan-assembler-times "\\sbne\\s\[^\\s\]+\\s# movcc\\s" 1 } } */
28 /* { dg-final { scan-assembler-not "\\sbeq\\s" } } */