| 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 -mtune=sifive-7-series -mbranch-cost=1 -fdump-rtl-ce1" } */ |
| 5 |
|
| 6 |
typedef int __attribute__ ((mode (DI))) int_t; |
| 7 |
|
| 8 |
int_t |
| 9 |
movdilt (int_t w, int_t x, int_t y, int_t z) |
| 10 |
{ |
| 11 |
return w < x ? y : z; |
| 12 |
} |
| 13 |
|
| 14 |
/* Expect short forward branch assembly like: |
| 15 |
|
| 16 |
bge a0,a1,1f # movcc |
| 17 |
mv a3,a2 |
| 18 |
1: |
| 19 |
mv a0,a3 |
| 20 |
*/ |
| 21 |
|
| 22 |
/* { dg-final { scan-rtl-dump-times "Conversion succeeded on pass 1\\." 1 "ce1" } } */ |
| 23 |
/* { dg-final { scan-rtl-dump-times "if-conversion succeeded through noce_try_cmove" 1 "ce1" } } */ |
| 24 |
/* { dg-final { scan-assembler-times "\\s(?:bge|bgt|ble|blt)\\s\[^\\s\]+\\s# movcc\\s" 1 } } */ |
| 25 |
/* { dg-final { scan-assembler-not "\\s(?:seqz|snez)\\s" } } */ |
| 26 |
/* { dg-final { scan-assembler-not "\\s(?:sgt|slt)\\s" } } */ |