aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-06-26 13:14:44 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-08-07 14:09:39 +0200
commit80ee1b6fca62dcf9ed7c54fba5cc45b790c11524 (patch)
treefc2a78296fa83726de04fecb9c621e09581edd33 /validation
parent213ee17897a3a82733e8a0abdb1635a42f6f0d1c (diff)
downloadsparse-dev-80ee1b6fca62dcf9ed7c54fba5cc45b790c11524.tar.gz
optim: add a few more testcases for shift & mask
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
-rw-r--r--validation/optim/shl-lsr.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/validation/optim/shl-lsr.c b/validation/optim/shl-lsr.c
new file mode 100644
index 00000000..1ab2c48f
--- /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\\.
+ */