Debian Codegraph @

gcc/testsuite/gcc.target/riscv/movdifne-thead.c

raw
1 /* { dg-do compile { target { ! riscv_abi_e } } } */
2 /* { dg-require-effective-target rv64 } */
3 /* { dg-skip-if "" { *-*-* } { "-O0" "-Og" } } */
4 /* { dg-options "-march=rv64gc_xtheadcondmov -mtune=thead-c906 -mbranch-cost=1 -fdump-rtl-ce1" } */
5
6 typedef int __attribute__ ((mode (DI))) int_t;
7
8 int_t
9 movdifne (double w, double x, int_t y, int_t z)
10 {
11 return w != x ? y : z;
12 }
13
14 /* Expect branchless assembly like:
15
16 feq.d a5,fa0,fa1
17 th.mvnez a0,a1,a5
18 */
19
20 /* { dg-final { scan-rtl-dump-times "Conversion succeeded on pass 1\\." 1 "ce1" } } */
21 /* { dg-final { scan-rtl-dump-times "if-conversion succeeded through noce_try_cmove" 1 "ce1" } } */
22 /* { dg-final { scan-assembler-times "\\sfeq\\.d\\s" 1 } } */
23 /* { dg-final { scan-assembler-times "\\s(?:th\\.mveqz|th\\.mvnez)\\s" 1 } } */
24 /* { dg-final { scan-assembler-not "\\s(?:seqz|snez)\\s" } } */
25 /* { dg-final { scan-assembler-not "\\s(?:beq|bne)\\s" } } */