summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/zeroext-and-reduce.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/InstCombine/zeroext-and-reduce.ll')
-rw-r--r--llvm/test/Transforms/InstCombine/zeroext-and-reduce.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/zeroext-and-reduce.ll b/llvm/test/Transforms/InstCombine/zeroext-and-reduce.ll
new file mode 100644
index 00000000000..e171f3aacb0
--- /dev/null
+++ b/llvm/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.s, 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
+}
+
OpenPOWER on IntegriCloud