[PATCH 2/5] add testcase for ((x >> S) << S) simplification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add the testcase before doing the simplification.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 validation/optim/shl-lsr0.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 validation/optim/shl-lsr0.c

diff --git a/validation/optim/shl-lsr0.c b/validation/optim/shl-lsr0.c
new file mode 100644
index 000000000..851f62842
--- /dev/null
+++ b/validation/optim/shl-lsr0.c
@@ -0,0 +1,15 @@
+unsigned mask(unsigned x)
+{
+	return (x >> 15) << 15;
+}
+
+/*
+ * check-name: shl-lsr0
+ * check-command: test-linearize -Wno-decl $file
+ * check-known-to-fail
+ *
+ * check-output-ignore
+ * check-output-contains: and\\..*0xffff8000
+ * check-output-excludes: lsr\\.
+ * check-output-excludes: shl\\.
+ */
-- 
2.18.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux