aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/riscv
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/riscv')
-rw-r--r--gcc/testsuite/gcc.target/riscv/xtheadcondmov-bug.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/riscv/xtheadcondmov-bug.c b/gcc/testsuite/gcc.target/riscv/xtheadcondmov-bug.c
new file mode 100644
index 0000000..01cec62
--- /dev/null
+++ b/gcc/testsuite/gcc.target/riscv/xtheadcondmov-bug.c
@@ -0,0 +1,12 @@
+/* { dg-do compile { target { rv64 } } } */
+/* { dg-options "-march=rv64gc_xtheadcondmov -mabi=lp64d -O2" } */
+
+long long int
+foo (long long int x, long long int y)
+{
+ if (((int) x | (int) y) != 0)
+ return 6;
+ return x + y;
+}
+
+/* { dg-final { scan-assembler-times {\msext\.w\M} 1 } } */