summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/shift.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-04-09 23:47:24 +0000
committerChris Lattner <sabre@nondot.org>2004-04-09 23:47:24 +0000
commit1c4852733067c93867693119b7caa5938b8ced50 (patch)
tree3638af2ffe9365055f68e61a6e4df1287c75f16a /test/Transforms/InstCombine/shift.ll
parente576b91948ffb02562291fa02f1c84a457d5b6ba (diff)
downloadllvm-1c4852733067c93867693119b7caa5938b8ced50.tar.gz
llvm-1c4852733067c93867693119b7caa5938b8ced50.tar.bz2
llvm-1c4852733067c93867693119b7caa5938b8ced50.tar.xz
Testcase to make sure we can apply the shift to the operands of the select,
eliminating the shifts git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12801 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/shift.ll')
-rw-r--r--test/Transforms/InstCombine/shift.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/shift.ll b/test/Transforms/InstCombine/shift.ll
index 016d00fc8b..ac7bb27ea9 100644
--- a/test/Transforms/InstCombine/shift.ll
+++ b/test/Transforms/InstCombine/shift.ll
@@ -96,3 +96,16 @@ uint %test14a(uint %A) {
%D = shr uint %C, ubyte 4 ;; D = ((B | 1234) << 4) === ((B << 4)|(1234 << 4)
ret uint %D
}
+
+int %test15(bool %C) {
+ %A = select bool %C, int 3, int 1
+ %V = shl int %A, ubyte 2
+ ret int %V
+}
+
+int %test15a(bool %C) {
+ %A = select bool %C, ubyte 3, ubyte 1
+ %V = shl int 64, ubyte %A
+ ret int %V
+}
+