Fix test cases to use FileCheck.
authorAkira Hatanaka <ahatanaka@mips.com>
Fri, 2 Dec 2011 22:28:09 +0000 (22:28 +0000)
committerAkira Hatanaka <ahatanaka@mips.com>
Fri, 2 Dec 2011 22:28:09 +0000 (22:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145716 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/Mips/2008-06-05-Carry.ll
test/CodeGen/Mips/2008-07-03-SRet.ll
test/CodeGen/Mips/2008-07-07-Float2Int.ll
test/CodeGen/Mips/2008-07-22-Cstpool.ll
test/CodeGen/Mips/2008-08-01-AsmInline.ll
test/CodeGen/Mips/2008-08-04-Bitconvert.ll
test/CodeGen/Mips/2008-08-06-Alloca.ll
test/CodeGen/Mips/2008-08-08-ctlz.ll
test/CodeGen/Mips/private.ll

index 9d8e391f874ee75ab5cff50ff6d130aba837e7d8..c61e1cdedea78d2f1c06fbe3467024fbecb7ede8 100644 (file)
@@ -1,19 +1,22 @@
-; RUN: llc < %s -march=mips -o %t
-; RUN: grep subu %t | count 2
-; RUN: grep addu %t | count 4
-
-target datalayout =
-"e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
-target triple = "mipsallegrexel-unknown-psp-elf"
+; RUN: llc -march=mips < %s | FileCheck %s
 
 define i64 @add64(i64 %u, i64 %v) nounwind  {
 entry:
-       %tmp2 = add i64 %u, %v  
+; CHECK: addu
+; CHECK: sltu 
+; CHECK: addu
+; CHECK: addu
+  %tmp2 = add i64 %u, %v  
   ret i64 %tmp2
 }
 
 define i64 @sub64(i64 %u, i64 %v) nounwind  {
 entry:
+; CHECK: sub64
+; CHECK: subu
+; CHECK: sltu 
+; CHECK: addu
+; CHECK: subu
   %tmp2 = sub i64 %u, %v
   ret i64 %tmp2
 }
index b1d20d93f1871c7b50471b72a29d0d89f368b1c5..afec7f65d60733e4fdd6c151ba899a6a2d532c4a 100644 (file)
@@ -1,17 +1,18 @@
-; RUN: llc < %s -march=mips | grep {sw.*(\$4)} | count 3
+; RUN: llc -march=mips < %s | FileCheck %s
 
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
-target triple = "mipsallegrexel-unknown-psp-elf"
-       %struct.sret0 = type { i32, i32, i32 }
+%struct.sret0 = type { i32, i32, i32 }
 
 define void @test0(%struct.sret0* noalias sret %agg.result, i32 %dummy) nounwind {
 entry:
-       getelementptr %struct.sret0* %agg.result, i32 0, i32 0          ; <i32*>:0 [#uses=1]
-       store i32 %dummy, i32* %0, align 4
-       getelementptr %struct.sret0* %agg.result, i32 0, i32 1          ; <i32*>:1 [#uses=1]
-       store i32 %dummy, i32* %1, align 4
-       getelementptr %struct.sret0* %agg.result, i32 0, i32 2          ; <i32*>:2 [#uses=1]
-       store i32 %dummy, i32* %2, align 4
-       ret void
+; CHECK: sw ${{[0-9]+}}, {{[0-9]+}}($4)
+; CHECK: sw ${{[0-9]+}}, {{[0-9]+}}($4)
+; CHECK: sw ${{[0-9]+}}, {{[0-9]+}}($4)
+  getelementptr %struct.sret0* %agg.result, i32 0, i32 0    ; <i32*>:0 [#uses=1]
+  store i32 %dummy, i32* %0, align 4
+  getelementptr %struct.sret0* %agg.result, i32 0, i32 1    ; <i32*>:1 [#uses=1]
+  store i32 %dummy, i32* %1, align 4
+  getelementptr %struct.sret0* %agg.result, i32 0, i32 2    ; <i32*>:2 [#uses=1]
+  store i32 %dummy, i32* %2, align 4
+  ret void
 }
 
index d804c7dcf317f6d91b9a6dfab0e0edd6224fa953..4c552361d9da6080b360af8e2297045bc41594cf 100644 (file)
@@ -1,16 +1,17 @@
-; RUN: llc < %s -march=mips | grep trunc.w.s | count 3
-
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
-target triple = "mipsallegrexel-unknown-psp-elf"
+; RUN: llc -march=mips < %s | FileCheck %s
 
 define i32 @fptoint(float %a) nounwind {
 entry:
-       fptosi float %a to i32          ; <i32>:0 [#uses=1]
-       ret i32 %0
+; CHECK: trunc.w.s 
+  fptosi float %a to i32               ; <i32>:0 [#uses=1]
+  ret i32 %0
 }
 
 define i32 @fptouint(float %a) nounwind {
 entry:
-       fptoui float %a to i32          ; <i32>:0 [#uses=1]
-       ret i32 %0
+; CHECK: fptouint
+; CHECK: trunc.w.s 
+; CHECK: trunc.w.s 
+  fptoui float %a to i32               ; <i32>:0 [#uses=1]
+  ret i32 %0
 }
index 94dfe35faba1a3c799a87bf07c216a0a95086e37..a8e54707ddb214c5155ba9393d1f9e3d4a586d81 100644 (file)
@@ -1,12 +1,13 @@
-; RUN: llc < %s -march=mips -o %t
-; RUN: grep {CPI\[01\]_\[01\]:} %t | count 2
-; RUN: grep {.rodata.cst4,"aM",@progbits} %t | count 1
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
-target triple = "mipsallegrexel-unknown-psp-elf"
+; RUN: llc -march=mips < %s | FileCheck %s
 
 define float @F(float %a) nounwind {
+; CHECK: .rodata.cst4,"aM",@progbits 
 entry:
-       fadd float %a, 0x4011333340000000               ; <float>:0 [#uses=1]
-       fadd float %0, 0x4010666660000000               ; <float>:1 [#uses=1]
-       ret float %1
+; CHECK: ($CPI0_{{[0-1]}})
+; CHECK: ($CPI0_{{[0,1]}}) 
+; CHECK: ($CPI0_{{[0,1]}}) 
+; CHECK: ($CPI0_{{[0,1]}}) 
+  fadd float %a, 0x4011333340000000            ; <float>:0 [#uses=1]
+  fadd float %0, 0x4010666660000000            ; <float>:1 [#uses=1]
+  ret float %1
 }
index 23ed64a96d8e8595890629c753b78fd5d967594c..f701bf17c6bbc84e2129878ed1a4fc81497031e0 100644 (file)
@@ -1,17 +1,15 @@
-; RUN: llc < %s -march=mips -o %t
-; RUN: grep mfhi  %t | count 1
-; RUN: grep mflo  %t | count 1
-; RUN: grep multu %t | count 1
+; RUN: llc -march=mips < %s | FileCheck %s
 
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
-target triple = "mipsallegrexel-unknown-psp-elf"
-       %struct.DWstruct = type { i32, i32 }
+%struct.DWstruct = type { i32, i32 }
 
 define i32 @A0(i32 %u, i32 %v) nounwind  {
 entry:
-       %asmtmp = tail call %struct.DWstruct asm "multu $2,$3", "={lo},={hi},d,d"( i32 %u, i32 %v ) nounwind
-       %asmresult = extractvalue %struct.DWstruct %asmtmp, 0
-       %asmresult1 = extractvalue %struct.DWstruct %asmtmp, 1          ; <i32> [#uses=1]
+; CHECK: multu 
+; CHECK: mflo
+; CHECK: mfhi
+  %asmtmp = tail call %struct.DWstruct asm "multu $2,$3", "={lo},={hi},d,d"( i32 %u, i32 %v ) nounwind
+  %asmresult = extractvalue %struct.DWstruct %asmtmp, 0
+  %asmresult1 = extractvalue %struct.DWstruct %asmtmp, 1    ; <i32> [#uses=1]
   %res = add i32 %asmresult, %asmresult1
-       ret i32 %res
+  ret i32 %res
 }
index f8eb0285597929e36ed7441d5c7e5a941178618b..78a49ffbe44430cb3e0cb37cb8d1299be1f44d4a 100644 (file)
@@ -1,18 +1,15 @@
-; RUN: llc < %s -march=mips -o %t
-; RUN: grep mtc1 %t | count 1
-; RUN: grep mfc1 %t | count 1
-
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
-target triple = "mipsallegrexel-unknown-psp-elf"
+; RUN: llc -march=mips < %s | FileCheck %s
 
 define float @A(i32 %u) nounwind  {
 entry:
-       bitcast i32 %u to float
-       ret float %0
+; CHECK: mtc1 
+  bitcast i32 %u to float
+  ret float %0
 }
 
 define i32 @B(float %u) nounwind  {
 entry:
-       bitcast float %u to i32
-       ret i32 %0
+; CHECK: mfc1 
+  bitcast float %u to i32
+  ret i32 %0
 }
index 6dd4af111cd9b6b67c0f2c3d4f56b146c6b75223..0d94b19e46291575a40bab8437dddfcfb7ed35e5 100644 (file)
@@ -1,17 +1,15 @@
-; RUN: llc < %s -march=mips | grep {subu.*sp} | count 2
-; RUN: llc < %s -march=mips -regalloc=basic | grep {subu.*sp} | count 2
-
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
-target triple = "mipsallegrexel-unknown-psp-elf"
+; RUN: llc -march=mips < %s | FileCheck %s
 
 define i32 @twoalloca(i32 %size) nounwind {
 entry:
-       alloca i8, i32 %size            ; <i8*>:0 [#uses=1]
-       alloca i8, i32 %size            ; <i8*>:1 [#uses=1]
-       call i32 @foo( i8* %0 ) nounwind                ; <i32>:2 [#uses=1]
-       call i32 @foo( i8* %1 ) nounwind                ; <i32>:3 [#uses=1]
-       add i32 %3, %2          ; <i32>:4 [#uses=1]
-       ret i32 %4
+; CHECK: subu ${{[0-9]+}}, $sp
+; CHECK: subu ${{[0-9]+}}, $sp
+  alloca i8, i32 %size    ; <i8*>:0 [#uses=1]
+  alloca i8, i32 %size    ; <i8*>:1 [#uses=1]
+  call i32 @foo( i8* %0 ) nounwind    ; <i32>:2 [#uses=1]
+  call i32 @foo( i8* %1 ) nounwind    ; <i32>:3 [#uses=1]
+  add i32 %3, %2    ; <i32>:4 [#uses=1]
+  ret i32 %4
 }
 
 declare i32 @foo(i8*)
index fb3332329d6c8953506c045ae66ff8570ce6ba70..522018365269946aa33cf4e5edeb0095dcc47ff9 100644 (file)
@@ -1,11 +1,9 @@
-; RUN: llc < %s -march=mips | grep clz | count 1
-
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64"
-target triple = "mipsallegrexel-unknown-psp-elf"
+; RUN: llc -march=mips < %s | FileCheck %s
 
 define i32 @A0(i32 %u) nounwind  {
 entry:
-       call i32 @llvm.ctlz.i32( i32 %u )
+; CHECK: clz 
+  call i32 @llvm.ctlz.i32( i32 %u )
   ret i32 %0
 }
 
index 4cc48f098a9e777ee29d2b46b29417ba58e81407..d1a67fd9f4bf66b7763d28441a3f2064793885bd 100644 (file)
@@ -1,19 +1,20 @@
 ; Test to make sure that the 'private' is used correctly.
 ;
-; RUN: llc < %s -march=mips > %t
-; RUN: grep \\\$foo: %t
-; RUN: grep call.*\\\$foo %t
-; RUN: grep \\\$baz: %t
-; RUN: grep lw.*\\\$baz %t
+; RUN: llc -march=mips < %s | FileCheck %s
 
 define private void @foo() {
-        ret void
+; CHECK: foo:
+  ret void
 }
 
 @baz = private global i32 4
 
 define i32 @bar() {
-        call void @foo()
-       %1 = load i32* @baz, align 4
-        ret i32 %1
+; CHECK: bar:
+; CHECK: call16($foo)
+; CHECK: lw $[[R0:[0-9]+]], %got($baz)($
+; CHECK: lw ${{[0-9]+}}, %lo($baz)($[[R0]])
+  call void @foo()
+  %1 = load i32* @baz, align 4
+  ret i32 %1
 }