aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/sh-or-and0.c
diff options
Diffstat (limited to 'validation/optim/sh-or-and0.c')
-rw-r--r--validation/optim/sh-or-and0.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/validation/optim/sh-or-and0.c b/validation/optim/sh-or-and0.c
new file mode 100644
index 00000000..4a099df2
--- /dev/null
+++ b/validation/optim/sh-or-and0.c
@@ -0,0 +1,21 @@
+unsigned lsr_or_and0(unsigned x, unsigned b)
+{
+ return (((x & 0x00000fff) | b) >> 12);
+}
+
+unsigned shl_or_and0(unsigned x, unsigned b)
+{
+ return (((x & 0xfff00000) | b) << 12);
+}
+
+/*
+ * check-name: sh-or-and0
+ * check-command: test-linearize -Wno-decl $file
+ * check-known-to-fail
+ *
+ * check-output-ignore
+ * check-output-pattern(1): lsr\\.
+ * check-output-pattern(1): shl\\.
+ * check-output-excludes: or\\.
+ * check-output-excludes: and\\.
+ */