1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Convert test to FileCheck.

llvm-svn: 111195
This commit is contained in:
Bob Wilson 2010-08-16 22:21:13 +00:00
parent 6bc71a2a20
commit b776a55df5

View File

@ -1,8 +1,7 @@
; RUN: llc < %s -march=thumb -mattr=+thumb2,+t2xtpk | \ ; RUN: llc < %s -march=thumb -mattr=+thumb2,+t2xtpk | FileCheck %s
; RUN: grep pkhbt | count 5
; RUN: llc < %s -march=thumb -mattr=+thumb2,+t2xtpk | \
; RUN: grep pkhtb | count 4
; CHECK: test1
; CHECK: pkhbt r0, r0, r1, lsl #16
define i32 @test1(i32 %X, i32 %Y) { define i32 @test1(i32 %X, i32 %Y) {
%tmp1 = and i32 %X, 65535 ; <i32> [#uses=1] %tmp1 = and i32 %X, 65535 ; <i32> [#uses=1]
%tmp4 = shl i32 %Y, 16 ; <i32> [#uses=1] %tmp4 = shl i32 %Y, 16 ; <i32> [#uses=1]
@ -10,6 +9,8 @@ define i32 @test1(i32 %X, i32 %Y) {
ret i32 %tmp5 ret i32 %tmp5
} }
; CHECK: test1a
; CHECK: pkhbt r0, r0, r1, lsl #16
define i32 @test1a(i32 %X, i32 %Y) { define i32 @test1a(i32 %X, i32 %Y) {
%tmp19 = and i32 %X, 65535 ; <i32> [#uses=1] %tmp19 = and i32 %X, 65535 ; <i32> [#uses=1]
%tmp37 = shl i32 %Y, 16 ; <i32> [#uses=1] %tmp37 = shl i32 %Y, 16 ; <i32> [#uses=1]
@ -17,6 +18,8 @@ define i32 @test1a(i32 %X, i32 %Y) {
ret i32 %tmp5 ret i32 %tmp5
} }
; CHECK: test2
; CHECK: pkhbt r0, r0, r1, lsl #12
define i32 @test2(i32 %X, i32 %Y) { define i32 @test2(i32 %X, i32 %Y) {
%tmp1 = and i32 %X, 65535 ; <i32> [#uses=1] %tmp1 = and i32 %X, 65535 ; <i32> [#uses=1]
%tmp3 = shl i32 %Y, 12 ; <i32> [#uses=1] %tmp3 = shl i32 %Y, 12 ; <i32> [#uses=1]
@ -25,6 +28,8 @@ define i32 @test2(i32 %X, i32 %Y) {
ret i32 %tmp57 ret i32 %tmp57
} }
; CHECK: test3
; CHECK: pkhbt r0, r0, r1, lsl #18
define i32 @test3(i32 %X, i32 %Y) { define i32 @test3(i32 %X, i32 %Y) {
%tmp19 = and i32 %X, 65535 ; <i32> [#uses=1] %tmp19 = and i32 %X, 65535 ; <i32> [#uses=1]
%tmp37 = shl i32 %Y, 18 ; <i32> [#uses=1] %tmp37 = shl i32 %Y, 18 ; <i32> [#uses=1]
@ -32,6 +37,8 @@ define i32 @test3(i32 %X, i32 %Y) {
ret i32 %tmp5 ret i32 %tmp5
} }
; CHECK: test4
; CHECK: pkhbt r0, r0, r1, lsl #0
define i32 @test4(i32 %X, i32 %Y) { define i32 @test4(i32 %X, i32 %Y) {
%tmp1 = and i32 %X, 65535 ; <i32> [#uses=1] %tmp1 = and i32 %X, 65535 ; <i32> [#uses=1]
%tmp3 = and i32 %Y, -65536 ; <i32> [#uses=1] %tmp3 = and i32 %Y, -65536 ; <i32> [#uses=1]
@ -39,6 +46,8 @@ define i32 @test4(i32 %X, i32 %Y) {
ret i32 %tmp46 ret i32 %tmp46
} }
; CHECK: test5
; CHECK: pkhtb r0, r0, r1, asr #16
define i32 @test5(i32 %X, i32 %Y) { define i32 @test5(i32 %X, i32 %Y) {
%tmp17 = and i32 %X, -65536 ; <i32> [#uses=1] %tmp17 = and i32 %X, -65536 ; <i32> [#uses=1]
%tmp2 = bitcast i32 %Y to i32 ; <i32> [#uses=1] %tmp2 = bitcast i32 %Y to i32 ; <i32> [#uses=1]
@ -47,6 +56,8 @@ define i32 @test5(i32 %X, i32 %Y) {
ret i32 %tmp5 ret i32 %tmp5
} }
; CHECK: test5a
; CHECK: pkhtb r0, r0, r1, asr #16
define i32 @test5a(i32 %X, i32 %Y) { define i32 @test5a(i32 %X, i32 %Y) {
%tmp110 = and i32 %X, -65536 ; <i32> [#uses=1] %tmp110 = and i32 %X, -65536 ; <i32> [#uses=1]
%tmp37 = lshr i32 %Y, 16 ; <i32> [#uses=1] %tmp37 = lshr i32 %Y, 16 ; <i32> [#uses=1]
@ -55,6 +66,8 @@ define i32 @test5a(i32 %X, i32 %Y) {
ret i32 %tmp5 ret i32 %tmp5
} }
; CHECK: test6
; CHECK: pkhtb r0, r0, r1, asr #12
define i32 @test6(i32 %X, i32 %Y) { define i32 @test6(i32 %X, i32 %Y) {
%tmp1 = and i32 %X, -65536 ; <i32> [#uses=1] %tmp1 = and i32 %X, -65536 ; <i32> [#uses=1]
%tmp37 = lshr i32 %Y, 12 ; <i32> [#uses=1] %tmp37 = lshr i32 %Y, 12 ; <i32> [#uses=1]
@ -64,6 +77,8 @@ define i32 @test6(i32 %X, i32 %Y) {
ret i32 %tmp59 ret i32 %tmp59
} }
; CHECK: test7
; CHECK: pkhtb r0, r0, r1, asr #18
define i32 @test7(i32 %X, i32 %Y) { define i32 @test7(i32 %X, i32 %Y) {
%tmp1 = and i32 %X, -65536 ; <i32> [#uses=1] %tmp1 = and i32 %X, -65536 ; <i32> [#uses=1]
%tmp3 = ashr i32 %Y, 18 ; <i32> [#uses=1] %tmp3 = ashr i32 %Y, 18 ; <i32> [#uses=1]