diff options
author | Chris Lattner <sabre@nondot.org> | 2003-08-13 04:20:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-08-13 04:20:06 +0000 |
commit | ab04c365b817f01ee2b6cdeceb605e89a17db870 (patch) | |
tree | a46e79aeb85e477fa600798927ffe35243c6a6ac /test | |
parent | e92d2f450a94b0a6127ffdcc517550c569982470 (diff) | |
download | llvm-ab04c365b817f01ee2b6cdeceb605e89a17db870.tar.gz llvm-ab04c365b817f01ee2b6cdeceb605e89a17db870.tar.bz2 llvm-ab04c365b817f01ee2b6cdeceb605e89a17db870.tar.xz |
Update test to represent new cannonicalization rules for multiplies
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7804 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/InstCombine/shift.ll | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/Transforms/InstCombine/shift.ll b/test/Transforms/InstCombine/shift.ll index 987ea88569..b11d6dc1d5 100644 --- a/test/Transforms/InstCombine/shift.ll +++ b/test/Transforms/InstCombine/shift.ll @@ -36,8 +36,9 @@ uint %test5a(uint %A) { } uint %test6(uint %A) { - %B = shl uint %A, ubyte 1 ;; convert to an add instruction - ret uint %B + %B = shl uint %A, ubyte 1 ;; convert to an mul instruction + %C = mul uint %B, 3 + ret uint %C } int %test7(ubyte %A) { @@ -64,7 +65,8 @@ ubyte %test10(ubyte %A) { ;; (A >> 7) << 7 === A & 128 } ubyte %test11(ubyte %A) { ;; (A >> 3) << 4 === (A & 0x1F) << 1 - %B = shr ubyte %A, ubyte 3 + %a = mul ubyte %A, 3 + %B = shr ubyte %a, ubyte 3 %C = shl ubyte %B, ubyte 4 ret ubyte %C } @@ -76,7 +78,8 @@ int %test12(int %A) { } sbyte %test13(sbyte %A) { ;; (A >> 3) << 4 === (A & -8) * 2 - %B = shr sbyte %A, ubyte 3 + %a = mul sbyte %A, 3 + %B = shr sbyte %a, ubyte 3 %C = shl sbyte %B, ubyte 4 ret sbyte %C } |