summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ifcvt-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/ifcvt-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/ifcvt-2.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/ifcvt-2.c b/gcc/testsuite/gcc.dg/ifcvt-2.c
new file mode 100644
index 00000000000..e0e1728a34c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ifcvt-2.c
@@ -0,0 +1,17 @@
+/* { dg-do compile { target aarch64*-*-* x86_64-*-* } } */
+/* { dg-options "-fdump-rtl-ce1 -O2" } */
+
+
+typedef unsigned char uint8_t;
+typedef unsigned int uint16_t;
+
+uint8_t
+_xtime (const uint8_t byte, const uint16_t generator)
+{
+ if (byte & 0x80)
+ return byte ^ generator;
+ else
+ return byte << 1;
+}
+
+/* { dg-final { scan-rtl-dump "3 true changes made" "ce1" } } */