aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Transforms/InstCombine/shl-trunc.ll7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/shl-trunc.ll b/test/Transforms/InstCombine/shl-trunc.ll
new file mode 100644
index 0000000000..fae0ce3d42
--- /dev/null
+++ b/test/Transforms/InstCombine/shl-trunc.ll
@@ -0,0 +1,7 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep shl
+
+bool %test(int %X, ubyte %A) {
+ %B = lshr int %X, ubyte %A
+ %D = trunc int %B to bool
+ ret bool %D
+}