Convert to FileCheck
authorJim Grosbach <grosbach@apple.com>
Tue, 17 Nov 2009 00:20:26 +0000 (00:20 +0000)
committerJim Grosbach <grosbach@apple.com>
Tue, 17 Nov 2009 00:20:26 +0000 (00:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89007 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/Thumb2/thumb2-select_xform.ll
test/CodeGen/Thumb2/thumb2-smla.ll
test/CodeGen/Thumb2/thumb2-smul.ll
test/CodeGen/Thumb2/thumb2-str_pre.ll
test/CodeGen/Thumb2/thumb2-uxtb.ll

index b4274adb58233c4a98fc45c0e0ee3a3a6330f9d3..44fa2458c1e4ecc7c8a27183071051564176e406 100644 (file)
@@ -1,8 +1,12 @@
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep mov | count 3
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep mvn | count 1
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | grep it  | count 3
+; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
 
 define i32 @t1(i32 %a, i32 %b, i32 %c) nounwind {
+; CHECK: t1
+; CHECK: mvn  r0, #-2147483648
+; CHECK: cmp r2, #10
+; CHECK: add.w r0, r1, r0
+; CHECK: it  gt
+; CHECK: movgt r0, r1
         %tmp1 = icmp sgt i32 %c, 10
         %tmp2 = select i1 %tmp1, i32 0, i32 2147483647
         %tmp3 = add i32 %tmp2, %b
@@ -10,6 +14,12 @@ define i32 @t1(i32 %a, i32 %b, i32 %c) nounwind {
 }
 
 define i32 @t2(i32 %a, i32 %b, i32 %c) nounwind {
+; CHECK: t2
+; CHECK: add.w r0, r1, #-2147483648
+; CHECK: cmp r2, #10
+; CHECK: it  gt
+; CHECK: movgt r0, r1
+
         %tmp1 = icmp sgt i32 %c, 10
         %tmp2 = select i1 %tmp1, i32 0, i32 2147483648
         %tmp3 = add i32 %tmp2, %b
@@ -17,6 +27,11 @@ define i32 @t2(i32 %a, i32 %b, i32 %c) nounwind {
 }
 
 define i32 @t3(i32 %a, i32 %b, i32 %c, i32 %d) nounwind {
+; CHECK: t3
+; CHECK: sub.w r0, r1, #10
+; CHECK: cmp r2, #10
+; CHECK: it  gt
+; CHECK: movgt r0, r1
         %tmp1 = icmp sgt i32 %c, 10
         %tmp2 = select i1 %tmp1, i32 0, i32 10
         %tmp3 = sub i32 %b, %tmp2
index 66cc88402fc581d3b477e36390c3ff250fab2e93..092ec27de4cad34f71555b649d7266ecbf522c98 100644 (file)
@@ -1,7 +1,8 @@
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | \
-; RUN:   grep smlabt | count 1
+; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
 
 define i32 @f3(i32 %a, i16 %x, i32 %y) {
+; CHECK: f3
+; CHECK: smlabt r0, r1, r2, r0
         %tmp = sext i16 %x to i32               ; <i32> [#uses=1]
         %tmp2 = ashr i32 %y, 16         ; <i32> [#uses=1]
         %tmp3 = mul i32 %tmp2, %tmp             ; <i32> [#uses=1]
index cdbf4ca7bf678e17a25505591d1f566b8dac4d06..16ea85db69c4cc7099b98c029c6bc2d3a1f3196e 100644 (file)
@@ -1,12 +1,11 @@
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | \
-; RUN:   grep smulbt | count 1
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | \
-; RUN:   grep smultt | count 1
+; RUN: llc < %s -march=thumb -mattr=+thumb2 |  FileCheck %s
 
 @x = weak global i16 0          ; <i16*> [#uses=1]
 @y = weak global i16 0          ; <i16*> [#uses=0]
 
 define i32 @f1(i32 %y) {
+; CHECK: f1
+; CHECK: smulbt r0, r1, r0
         %tmp = load i16* @x             ; <i16> [#uses=1]
         %tmp1 = add i16 %tmp, 2         ; <i16> [#uses=1]
         %tmp2 = sext i16 %tmp1 to i32           ; <i32> [#uses=1]
@@ -16,6 +15,8 @@ define i32 @f1(i32 %y) {
 }
 
 define i32 @f2(i32 %x, i32 %y) {
+; CHECK: f2
+; CHECK: smultt r0, r1, r0
         %tmp1 = ashr i32 %x, 16         ; <i32> [#uses=1]
         %tmp3 = ashr i32 %y, 16         ; <i32> [#uses=1]
         %tmp4 = mul i32 %tmp3, %tmp1            ; <i32> [#uses=1]
index 6c804eea634c65049a88ccb10c7f477ef5fa5855..9af960bbebdec69c3dd2531bfbde09727ec463c0 100644 (file)
@@ -1,7 +1,8 @@
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | \
-; RUN:   grep {str.*\\!} | count 2
+; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
 
 define void @test1(i32* %X, i32* %A, i32** %dest) {
+; CHECK: test1
+; CHECK: str  r1, [r0, #+16]!
         %B = load i32* %A               ; <i32> [#uses=1]
         %Y = getelementptr i32* %X, i32 4               ; <i32*> [#uses=2]
         store i32 %B, i32* %Y
@@ -10,6 +11,8 @@ define void @test1(i32* %X, i32* %A, i32** %dest) {
 }
 
 define i16* @test2(i16* %X, i32* %A) {
+; CHECK: test2
+; CHECK: strh r1, [r0, #+8]!
         %B = load i32* %A               ; <i32> [#uses=1]
         %Y = getelementptr i16* %X, i32 4               ; <i16*> [#uses=2]
         %tmp = trunc i32 %B to i16              ; <i16> [#uses=1]
index 4022d95ed475483fb9024053eaf8e15a128758e7..4e23f5356cf9407d1db43844915cf6111de595cc 100644 (file)
@@ -1,36 +1,47 @@
-; RUN: llc < %s -march=thumb -mattr=+thumb2 | \
-; RUN:   grep uxt | count 10
+; RUN: llc < %s -march=thumb -mattr=+thumb2 | FileCheck %s
 
 define i32 @test1(i32 %x) {
+; CHECK: test1
+; CHECK: uxtb16.w  r0, r0
        %tmp1 = and i32 %x, 16711935            ; <i32> [#uses=1]
        ret i32 %tmp1
 }
 
 define i32 @test2(i32 %x) {
+; CHECK: test2
+; CHECK: uxtb16.w  r0, r0, ror #8
        %tmp1 = lshr i32 %x, 8          ; <i32> [#uses=1]
        %tmp2 = and i32 %tmp1, 16711935         ; <i32> [#uses=1]
        ret i32 %tmp2
 }
 
 define i32 @test3(i32 %x) {
+; CHECK: test3
+; CHECK: uxtb16.w  r0, r0, ror #8
        %tmp1 = lshr i32 %x, 8          ; <i32> [#uses=1]
        %tmp2 = and i32 %tmp1, 16711935         ; <i32> [#uses=1]
        ret i32 %tmp2
 }
 
 define i32 @test4(i32 %x) {
+; CHECK: test4
+; CHECK: uxtb16.w  r0, r0, ror #8
        %tmp1 = lshr i32 %x, 8          ; <i32> [#uses=1]
        %tmp6 = and i32 %tmp1, 16711935         ; <i32> [#uses=1]
        ret i32 %tmp6
 }
 
 define i32 @test5(i32 %x) {
+; CHECK: test5
+; CHECK: uxtb16.w  r0, r0, ror #8
        %tmp1 = lshr i32 %x, 8          ; <i32> [#uses=1]
        %tmp2 = and i32 %tmp1, 16711935         ; <i32> [#uses=1]
        ret i32 %tmp2
 }
 
 define i32 @test6(i32 %x) {
+; CHECK: test6
+; CHECK: uxtb16.w  r0, r0, ror #16
        %tmp1 = lshr i32 %x, 16         ; <i32> [#uses=1]
        %tmp2 = and i32 %tmp1, 255              ; <i32> [#uses=1]
        %tmp4 = shl i32 %x, 16          ; <i32> [#uses=1]
@@ -40,6 +51,8 @@ define i32 @test6(i32 %x) {
 }
 
 define i32 @test7(i32 %x) {
+; CHECK: test7
+; CHECK: uxtb16.w  r0, r0, ror #16
        %tmp1 = lshr i32 %x, 16         ; <i32> [#uses=1]
        %tmp2 = and i32 %tmp1, 255              ; <i32> [#uses=1]
        %tmp4 = shl i32 %x, 16          ; <i32> [#uses=1]
@@ -49,6 +62,8 @@ define i32 @test7(i32 %x) {
 }
 
 define i32 @test8(i32 %x) {
+; CHECK: test8
+; CHECK: uxtb16.w  r0, r0, ror #24
        %tmp1 = shl i32 %x, 8           ; <i32> [#uses=1]
        %tmp2 = and i32 %tmp1, 16711680         ; <i32> [#uses=1]
        %tmp5 = lshr i32 %x, 24         ; <i32> [#uses=1]
@@ -57,6 +72,8 @@ define i32 @test8(i32 %x) {
 }
 
 define i32 @test9(i32 %x) {
+; CHECK: test9
+; CHECK: uxtb16.w  r0, r0, ror #24
        %tmp1 = lshr i32 %x, 24         ; <i32> [#uses=1]
        %tmp4 = shl i32 %x, 8           ; <i32> [#uses=1]
        %tmp5 = and i32 %tmp4, 16711680         ; <i32> [#uses=1]
@@ -65,6 +82,13 @@ define i32 @test9(i32 %x) {
 }
 
 define i32 @test10(i32 %p0) {
+; CHECK: test10
+; CHECK: mov.w r1, #16253176
+; CHECK: and.w r0, r1, r0, lsr #7
+; CHECK: lsrs  r1, r0, #5
+; CHECK: uxtb16.w  r1, r1
+; CHECK: orr.w r0, r1, r0
+
        %tmp1 = lshr i32 %p0, 7         ; <i32> [#uses=1]
        %tmp2 = and i32 %tmp1, 16253176         ; <i32> [#uses=2]
        %tmp4 = lshr i32 %tmp2, 5               ; <i32> [#uses=1]