summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-12 21:20:49 +0000
committerChris Lattner <sabre@nondot.org>2003-08-12 21:20:49 +0000
commitb310196abc3b750d655a8bd0e31693e04945fdba (patch)
tree40a20e35eaa0e2c16bfbfe9b0d01c34f439267d3 /test
parent33fbad7024f5c58f201bef4c166bad8dcbf01a3e (diff)
downloadllvm-b310196abc3b750d655a8bd0e31693e04945fdba.tar.gz
llvm-b310196abc3b750d655a8bd0e31693e04945fdba.tar.bz2
llvm-b310196abc3b750d655a8bd0e31693e04945fdba.tar.xz
New testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7789 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-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 6a496d3723..7d438fb157 100644
--- a/test/Transforms/InstCombine/shift.ll
+++ b/test/Transforms/InstCombine/shift.ll
@@ -80,3 +80,16 @@ sbyte %test13(sbyte %A) { ;; (A >> 3) << 4 === (A & -8) * 2
%C = shl sbyte %B, ubyte 4
ret sbyte %C
}
+
+uint %test14(uint %A) {
+ %B = shr uint %A, ubyte 4
+ %C = or uint %B, 1234
+ %D = shl uint %C, ubyte 4 ;; D = ((B | 1234) << 4) === ((B << 4)|(1234 << 4)
+ ret uint %D
+}
+int %test14a(int %A) {
+ %B = shl int %A, ubyte 4
+ %C = and int %B, -1234
+ %D = shr int %C, ubyte 4 ;; D = ((B | 1234) << 4) === ((B << 4)|(1234 << 4)
+ ret int %D
+}