riscv: thead: Add support for the XTheadCondMov ISA extensions
[official-gcc.git] / gcc / testsuite / gcc.target / riscv / xtheadcondmov-mveqz-imm-eqz.c
blob913ae43f21b525d03dc540aeabfa88bac8a868f3
1 /* { dg-do compile } */
2 /* { dg-options "-march=rv32gc_xtheadcondmov" { target { rv32 } } } */
3 /* { dg-options "-march=rv64gc_xtheadcondmov" { target { rv64 } } } */
4 /* { dg-skip-if "" { *-*-* } { "-O0" "-Os" "-Og" } } */
6 int
7 not_int_int (int x, int cond)
9 if (cond == 0)
10 return 1025;
11 return x;
14 long
15 not_long_int (long x, int cond)
17 if (cond == 0)
18 return 1025l;
19 return x;
22 int
23 not_int_long (int x, long cond)
25 if (cond == 0)
26 return 1025;
27 return x;
30 long
31 not_long_long (long x, int cond)
33 if (cond == 0)
34 return 1025l;
35 return x;
38 /* { dg-final { scan-assembler-times "th.mveqz" 4 } } */