aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/optim/sh-or-and1.c
diff options
Diffstat (limited to 'validation/optim/sh-or-and1.c')
-rw-r--r--validation/optim/sh-or-and1.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/validation/optim/sh-or-and1.c b/validation/optim/sh-or-and1.c
new file mode 100644
index 00000000..44a07ec5
--- /dev/null
+++ b/validation/optim/sh-or-and1.c
@@ -0,0 +1,21 @@
+unsigned lsr_or_and1(unsigned x, unsigned b)
+{
+ return (((x & 0xfffff000) | b) >> 12);
+}
+
+unsigned shl_or_and1(unsigned x, unsigned b)
+{
+ return (((x & 0x000fffff) | b) << 12);
+}
+
+/*
+ * check-name: sh-or-and1
+ * 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-pattern(2): or\\.
+ * check-output-excludes: and\\.
+ */