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" } } */
5
6 int
7 not_int_int (int x, int cond, int v)
8 {
9 if (cond != 0)
10 return v;
11 return x;
12 }
13
14 long
15 not_long_int (long x, int cond, long v)
16 {
17 if (cond != 0)
18 return v;
19 return x;
20 }
21
22 int
23 not_int_long (int x, long cond, int v)
24 {
25 if (cond != 0)
26 return v;
27 return x;
28 }
29
30 long
31 not_long_long (long x, int cond, long v)
32 {
33 if (cond != 0)
34 return v;
35 return x;
36 }
37
38 /* { dg-final { scan-assembler-times "th.mvnez" 4 } } */