mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-29 06:30:30 +00:00
Thumb-2 tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74464 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1ad7edc212
commit
8ba221d5c5
@ -1,32 +1,32 @@
|
||||
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {adc\\W*r\[0-9\],\\W*r\[0-9\],\\W*#\[0-9\]*} | grep {#171\\|#1179666\\|#872428544\\|#1448498774\\|#66846720} | count 5
|
||||
|
||||
; 734439407617 = 0x000000ab00000001
|
||||
; 734439407618 = 0x000000ab00000002
|
||||
define i64 @f1(i64 %a) {
|
||||
%tmp = add i64 %a, 734439407617
|
||||
%tmp = add i64 %a, 734439407618
|
||||
ret i64 %tmp
|
||||
}
|
||||
|
||||
; 5066626890203137 = 0x0012001200000001
|
||||
; 5066626890203138 = 0x0012001200000002
|
||||
define i64 @f2(i64 %a) {
|
||||
%tmp = add i64 %a, 5066626890203137
|
||||
%tmp = add i64 %a, 5066626890203138
|
||||
ret i64 %tmp
|
||||
}
|
||||
|
||||
; 3747052064576897025 = 0x3400340000000001
|
||||
; 3747052064576897026 = 0x3400340000000002
|
||||
define i64 @f3(i64 %a) {
|
||||
%tmp = add i64 %a, 3747052064576897025
|
||||
%tmp = add i64 %a, 3747052064576897026
|
||||
ret i64 %tmp
|
||||
}
|
||||
|
||||
; 6221254862626095105 = 0x5656565600000001
|
||||
; 6221254862626095106 = 0x5656565600000002
|
||||
define i64 @f4(i64 %a) {
|
||||
%tmp = add i64 %a, 6221254862626095105
|
||||
%tmp = add i64 %a, 6221254862626095106
|
||||
ret i64 %tmp
|
||||
}
|
||||
|
||||
; 287104476244869121 = 0x03fc000000000001
|
||||
; 287104476244869122 = 0x03fc000000000002
|
||||
define i64 @f5(i64 %a) {
|
||||
%tmp = add i64 %a, 287104476244869121
|
||||
%tmp = add i64 %a, 287104476244869122
|
||||
ret i64 %tmp
|
||||
}
|
||||
|
||||
|
@ -29,8 +29,3 @@ define i32 @f5(i32 %a) {
|
||||
%tmp = add i32 %a, 510
|
||||
ret i32 %tmp
|
||||
}
|
||||
|
||||
define i32 @f6(i32 %a) {
|
||||
%tmp = add i32 %a, 4095
|
||||
ret i32 %tmp
|
||||
}
|
||||
|
6
test/CodeGen/Thumb2/thumb2-sbc2.ll
Normal file
6
test/CodeGen/Thumb2/thumb2-sbc2.ll
Normal file
@ -0,0 +1,6 @@
|
||||
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {sbc\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\]*} | count 1
|
||||
|
||||
define i64 @f1(i64 %a, i64 %b) {
|
||||
%tmp = sub i64 %a, %b
|
||||
ret i64 %tmp
|
||||
}
|
31
test/CodeGen/Thumb2/thumb2-sub.ll
Normal file
31
test/CodeGen/Thumb2/thumb2-sub.ll
Normal file
@ -0,0 +1,31 @@
|
||||
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {sub\[w\]\\?\\W*r\[0-9\],\\W*r\[0-9\],\\W*#\[0-9\]*} | grep {#171\\|#1179666\\|#872428544\\|#1448498774\\|#510} | count 5
|
||||
|
||||
; 171 = 0x000000ab
|
||||
define i32 @f1(i32 %a) {
|
||||
%tmp = sub i32 %a, 171
|
||||
ret i32 %tmp
|
||||
}
|
||||
|
||||
; 1179666 = 0x00120012
|
||||
define i32 @f2(i32 %a) {
|
||||
%tmp = sub i32 %a, 1179666
|
||||
ret i32 %tmp
|
||||
}
|
||||
|
||||
; 872428544 = 0x34003400
|
||||
define i32 @f3(i32 %a) {
|
||||
%tmp = sub i32 %a, 872428544
|
||||
ret i32 %tmp
|
||||
}
|
||||
|
||||
; 1448498774 = 0x56565656
|
||||
define i32 @f4(i32 %a) {
|
||||
%tmp = sub i32 %a, 1448498774
|
||||
ret i32 %tmp
|
||||
}
|
||||
|
||||
; 510 = 0x000001fe
|
||||
define i32 @f5(i32 %a) {
|
||||
%tmp = sub i32 %a, 510
|
||||
ret i32 %tmp
|
||||
}
|
6
test/CodeGen/Thumb2/thumb2-sub2.ll
Normal file
6
test/CodeGen/Thumb2/thumb2-sub2.ll
Normal file
@ -0,0 +1,6 @@
|
||||
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {subw\\W*r\[0-9\],\\W*r\[0-9\],\\W*#\[0-9\]*} | grep {#4095} | count 1
|
||||
|
||||
define i32 @f1(i32 %a) {
|
||||
%tmp = sub i32 %a, 4095
|
||||
ret i32 %tmp
|
||||
}
|
6
test/CodeGen/Thumb2/thumb2-sub4.ll
Normal file
6
test/CodeGen/Thumb2/thumb2-sub4.ll
Normal file
@ -0,0 +1,6 @@
|
||||
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {sub\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\]} | count 1
|
||||
|
||||
define i32 @f1(i32 %a, i32 %b) {
|
||||
%tmp = sub i32 %a, %b
|
||||
ret i32 %tmp
|
||||
}
|
6
test/CodeGen/Thumb2/thumb2-sub5.ll
Normal file
6
test/CodeGen/Thumb2/thumb2-sub5.ll
Normal file
@ -0,0 +1,6 @@
|
||||
; RUN: llvm-as < %s | llc -march=thumb -mattr=+thumb2 | grep {subs\\W*r\[0-9\],\\W*r\[0-9\],\\W*r\[0-9\]} | count 1
|
||||
|
||||
define i64 @f1(i64 %a, i64 %b) {
|
||||
%tmp = sub i64 %a, %b
|
||||
ret i64 %tmp
|
||||
}
|
Loading…
Reference in New Issue
Block a user