llvm.org GIT mirror llvm / 1091a97
Merge tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33560 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 13 years ago
2 changed file(s) with 28 addition(s) and 31 deletion(s). Raw diff Collapse all Expand all
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm
0 ; RUN: llvm-as < %s | llc -march=arm &&
1 ; RUN: llvm-as < %s | llc -march=arm | grep rrx | wc -l | grep 1 &&
2 ; RUN: llvm-as < %s | llc -march=arm | grep __ashldi3 &&
3 ; RUN: llvm-as < %s | llc -march=arm | grep __ashrdi3 &&
4 ; RUN: llvm-as < %s | llc -march=arm | grep __lshrdi3 &&
5 ; RUN: llvm-as < %s | llc -march=arm -enable-thumb
16
2 long %foo0(long %A, ulong %B) {
3 %tmp = cast long %A to ulong ; [#uses=1]
4 %tmp2 = shr ulong %B, ubyte 1 ; [#uses=1]
5 %tmp3 = sub ulong %tmp, %tmp2 ; [#uses=1]
6 %tmp3 = cast ulong %tmp3 to long ; [#uses=1]
7 ret long %tmp3
7 define i64 @f00(i64 %A, i64 %B) {
8 %tmp = bitcast i64 %A to i64
9 %tmp2 = lshr i64 %B, i8 1
10 %tmp3 = sub i64 %tmp, %tmp2
11 ret i64 %tmp3
812 }
913
14 define i32 @f1(i64 %x, i8 %y) {
15 %a = shl i64 %x, i8 %y
16 %b = trunc i64 %a to i32
17 ret i32 %b
18 }
19
20 define i32 @f2(i64 %x, i8 %y) {
21 %a = ashr i64 %x, i8 %y
22 %b = trunc i64 %a to i32
23 ret i32 %b
24 }
25
26 define i32 @f3(i64 %x, i8 %y) {
27 %a = lshr i64 %x, i8 %y
28 %b = trunc i64 %a to i32
29 ret i32 %b
30 }
+0
-24
test/CodeGen/ARM/longarith.ll less more
None ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __ashldi3 &&
2 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __ashrdi3 &&
3 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep __lshrdi3
4 uint %f1(ulong %x, ubyte %y) {
5 entry:
6 %a = shl ulong %x, ubyte %y
7 %b = cast ulong %a to uint
8 ret uint %b
9 }
10
11 uint %f2(long %x, ubyte %y) {
12 entry:
13 %a = shr long %x, ubyte %y
14 %b = cast long %a to uint
15 ret uint %b
16 }
17
18 uint %f3(ulong %x, ubyte %y) {
19 entry:
20 %a = shr ulong %x, ubyte %y
21 %b = cast ulong %a to uint
22 ret uint %b
23 }