Improved test cases that were added with r214892.

1. Added ':' to CHECK-LABELs
2. Added more CHECKs
3. Added CHECK-NEXTs
4. Added verbose hex immediate comments to CHECKs



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214921 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Sanjay Patel 2014-08-05 20:16:35 +00:00
parent 0ca286752e
commit 998edc6187
2 changed files with 15 additions and 13 deletions

View File

@ -31,24 +31,26 @@ declare <2 x float> @llvm.fabs.v2f32(<2 x float> %a)
; We should generate:
; mov r0, #0
; mvn r1, #-2147483648
; mov pc, lr
; bx lr
; CHECK-LABEL: fabs_v2f32_1
define i64 @fabs_v2f32_1() {
; CHECK-LABEL: fabs_v2f32_1:
; CHECK: mvn r1, #-2147483648
; CHECK: bx lr
; CHECK-NOT: vabs
%bitcast = bitcast i64 18446744069414584320 to <2 x float> ; 0xFFFF_FFFF_0000_0000
%fabs = call <2 x float> @llvm.fabs.v2f32(<2 x float> %bitcast)
%ret = bitcast <2 x float> %fabs to i64
ret i64 %ret
; CHECK: mvn r1, #-2147483648
; CHECK-NOT: vabs
}
; CHECK-LABEL: fabs_v2f32_2
define i64 @fabs_v2f32_2() {
; CHECK-LABEL: fabs_v2f32_2:
; CHECK: mvn r0, #-2147483648
; CHECK: bx lr
; CHECK-NOT: vabs
%bitcast = bitcast i64 4294967295 to <2 x float> ; 0x0000_0000_FFFF_FFFF
%fabs = call <2 x float> @llvm.fabs.v2f32(<2 x float> %bitcast)
%ret = bitcast <2 x float> %fabs to i64
ret i64 %ret
; CHECK: mvn r0, #-2147483648
; CHECK-NOT: vabs
}

View File

@ -52,24 +52,24 @@ declare <8 x float> @llvm.fabs.v8f32(<8 x float> %p)
; We should generate:
; mov (put constant value in return register)
; CHECK-LABEL: fabs_v2f32_1
define i64 @fabs_v2f32_1() {
; CHECK-LABEL: fabs_v2f32_1:
; CHECK: movabsq $9223372032559808512, %rax # imm = 0x7FFFFFFF00000000
; CHECK-NEXT: retq
%bitcast = bitcast i64 18446744069414584320 to <2 x float> ; 0xFFFF_FFFF_0000_0000
%fabs = call <2 x float> @llvm.fabs.v2f32(<2 x float> %bitcast)
%ret = bitcast <2 x float> %fabs to i64
ret i64 %ret
; CHECK: movabsq $9223372032559808512, %rax
; # imm = 0x7FFF_FFFF_0000_0000
}
; CHECK-LABEL: fabs_v2f32_2
define i64 @fabs_v2f32_2() {
; CHECK-LABEL: fabs_v2f32_2:
; CHECK: movl $2147483647, %eax # imm = 0x7FFFFFFF
; CHECK-NEXT: retq
%bitcast = bitcast i64 4294967295 to <2 x float> ; 0x0000_0000_FFFF_FFFF
%fabs = call <2 x float> @llvm.fabs.v2f32(<2 x float> %bitcast)
%ret = bitcast <2 x float> %fabs to i64
ret i64 %ret
; CHECK: movl $2147483647, %eax
; # imm = 0x0000_0000_7FFF_FFFF
}
declare <2 x float> @llvm.fabs.v2f32(<2 x float> %p)