[PATCH 2/7] optim: add a few more testcases for shift & mask

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

 



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

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

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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