aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine/zeroext-and-reduce.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine/zeroext-and-reduce.ll')
-rw-r--r--test/Transforms/InstCombine/zeroext-and-reduce.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/zeroext-and-reduce.ll b/test/Transforms/InstCombine/zeroext-and-reduce.ll
new file mode 100644
index 0000000..aac8c3b
--- /dev/null
+++ b/test/Transforms/InstCombine/zeroext-and-reduce.ll
@@ -0,0 +1,9 @@
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
+; RUN: grep {and i32 %Y, 8}
+
+int %test1(ubyte %X) {
+ %Y = cast ubyte %X to int
+ %Z = and int %Y, 65544 ;; Prune this to and Y, 8
+ ret int %Z
+}
+