aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c')
-rw-r--r--gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
new file mode 100644
index 0000000..9588798
--- /dev/null
+++ b/gcc/testsuite/gcc.target/loongarch/conditional-move-opt-3.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "maskeqz" } } */
+/* { dg-final { scan-assembler "masknez" } } */
+
+extern long lm, ln, lr;
+
+void
+test_and ()
+{
+ if (lm < 0)
+ lr &= (1 << 16);
+ lr += lm;
+}