aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/ARM/long_shift.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
commit832254e1c2387c0cbeb0a820b8315fbe85cb003a (patch)
treed3d0c15237b69dfda4ea152775417f2cc67b369b /test/CodeGen/ARM/long_shift.ll
parent9a2ef9509e76869c3d658fb3e321d9b9e9d479d9 (diff)
downloadexternal_llvm-832254e1c2387c0cbeb0a820b8315fbe85cb003a.zip
external_llvm-832254e1c2387c0cbeb0a820b8315fbe85cb003a.tar.gz
external_llvm-832254e1c2387c0cbeb0a820b8315fbe85cb003a.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/ARM/long_shift.ll')
-rw-r--r--test/CodeGen/ARM/long_shift.ll16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/CodeGen/ARM/long_shift.ll b/test/CodeGen/ARM/long_shift.ll
index 09b3d1e..515cb17 100644
--- a/test/CodeGen/ARM/long_shift.ll
+++ b/test/CodeGen/ARM/long_shift.ll
@@ -5,27 +5,27 @@
; RUN: llvm-as < %s | llc -march=arm | grep __lshrdi3 &&
; RUN: llvm-as < %s | llc -march=arm -enable-thumb
-define i64 @f00(i64 %A, i64 %B) {
+define i64 @f0(i64 %A, i64 %B) {
%tmp = bitcast i64 %A to i64
- %tmp2 = lshr i64 %B, i8 1
+ %tmp2 = lshr i64 %B, 1
%tmp3 = sub i64 %tmp, %tmp2
ret i64 %tmp3
}
-define i32 @f1(i64 %x, i8 %y) {
- %a = shl i64 %x, i8 %y
+define i32 @f1(i64 %x, i64 %y) {
+ %a = shl i64 %x, %y
%b = trunc i64 %a to i32
ret i32 %b
}
-define i32 @f2(i64 %x, i8 %y) {
- %a = ashr i64 %x, i8 %y
+define i32 @f2(i64 %x, i64 %y) {
+ %a = ashr i64 %x, %y
%b = trunc i64 %a to i32
ret i32 %b
}
-define i32 @f3(i64 %x, i8 %y) {
- %a = lshr i64 %x, i8 %y
+define i32 @f3(i64 %x, i64 %y) {
+ %a = lshr i64 %x, %y
%b = trunc i64 %a to i32
ret i32 %b
}