[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/shift.ll
Chris Lattner
lattner at cs.uiuc.edu
Tue Aug 12 23:21:01 PDT 2003
Changes in directory llvm/test/Regression/Transforms/InstCombine:
shift.ll updated: 1.12 -> 1.13
---
Log message:
Update test to represent new cannonicalization rules for multiplies
---
Diffs of the changes:
Index: llvm/test/Regression/Transforms/InstCombine/shift.ll
diff -u llvm/test/Regression/Transforms/InstCombine/shift.ll:1.12 llvm/test/Regression/Transforms/InstCombine/shift.ll:1.13
--- llvm/test/Regression/Transforms/InstCombine/shift.ll:1.12 Tue Aug 12 16:22:51 2003
+++ llvm/test/Regression/Transforms/InstCombine/shift.ll Tue Aug 12 23:20:06 2003
@@ -36,8 +36,9 @@
}
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 %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 @@
}
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
}
More information about the llvm-commits
mailing list