summaryrefslogtreecommitdiffstats
path: root/llvm/test/Integer/BitBit.ll
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-02 02:16:23 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-02 02:16:23 +0000
commit2341c22ec71aed773101eef6bc725df2047e5154 (patch)
tree453d820479bbe83769e54e01abc702ac8ef71312 /llvm/test/Integer/BitBit.ll
parent48b094d9ddbca690da41f5711d8e1fcb46c50e05 (diff)
downloadbcm5719-llvm-2341c22ec71aed773101eef6bc725df2047e5154.tar.gz
bcm5719-llvm-2341c22ec71aed773101eef6bc725df2047e5154.zip
Changes to support making the shift instructions be true BinaryOperators.
This feature is needed in order to support shifts of more than 255 bits on large integer types. This changes the syntax for llvm assembly to make shl, ashr and lshr instructions look like a binary operator: shl i32 %X, 1 instead of shl i32 %X, i8 1 Additionally, this should help a few passes perform additional optimizations. llvm-svn: 33776
Diffstat (limited to 'llvm/test/Integer/BitBit.ll')
-rw-r--r--llvm/test/Integer/BitBit.ll9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/test/Integer/BitBit.ll b/llvm/test/Integer/BitBit.ll
index 2b01c447d9e..7c17326e198 100644
--- a/llvm/test/Integer/BitBit.ll
+++ b/llvm/test/Integer/BitBit.ll
@@ -14,11 +14,12 @@ begin
%t3 = sext i31 %i to i33
%t4 = or i33 %t3, %j
%t5 = xor i31 %t2, 7
- %t6 = shl i31 %i, i8 2
+ %t6 = shl i31 %i, 2
%t7 = trunc i31 %i to i8
- %t8 = shl i8 %t7, i8 3
- %t9 = lshr i33 %j, i8 31
- %t10 = ashr i33 %j, i8 %t7
+ %t8 = shl i8 %t7, 3
+ %t9 = lshr i33 %j, 31
+ %t7z = zext i8 %t7 to i33
+ %t10 = ashr i33 %j, %t7z
ret void
end
OpenPOWER on IntegriCloud