More rewrites of x86 codegen regression tests with FileCheck
authorMichael Liao <michael.liao@intel.com>
Wed, 1 May 2013 05:34:30 +0000 (05:34 +0000)
committerMichael Liao <michael.liao@intel.com>
Wed, 1 May 2013 05:34:30 +0000 (05:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180837 91177308-0d34-0410-b5e6-96231b3b80d8

19 files changed:
test/CodeGen/X86/2003-08-03-CallArgLiveRanges.ll
test/CodeGen/X86/2006-11-27-SelectLegalize.ll
test/CodeGen/X86/2007-04-24-Huge-Stack.ll
test/CodeGen/X86/2007-06-15-IntToMMX.ll
test/CodeGen/X86/2007-08-01-LiveVariablesBug.ll
test/CodeGen/X86/2008-01-09-LongDoubleSin.ll
test/CodeGen/X86/2009-02-25-CommuteBug.ll
test/CodeGen/X86/2009-04-16-SpillerUnfold.ll
test/CodeGen/X86/2009-04-24.ll
test/CodeGen/X86/bswap-inline-asm.ll
test/CodeGen/X86/long-setcc.ll
test/CodeGen/X86/lsr-normalization.ll
test/CodeGen/X86/mul-legalize.ll
test/CodeGen/X86/negative_zero.ll
test/CodeGen/X86/optimize-max-2.ll
test/CodeGen/X86/phys_subreg_coalesce.ll
test/CodeGen/X86/vec_set-D.ll
test/CodeGen/X86/vec_set-I.ll
test/CodeGen/X86/x86-64-shortint.ll

index 2e4cb1fe7eda013e596cf07d963f3f2bd15abbfb..cb90bf644d5f21782962a90438c297bf18d68154 100644 (file)
@@ -4,7 +4,9 @@
 ; it makes a ton of annoying overlapping live ranges.  This code should not
 ; cause spills!
 ;
-; RUN: llc < %s -march=x86 -stats 2>&1 | not grep spilled
+; RUN: llc < %s -march=x86 -stats 2>&1 | FileCheck %s
+
+; CHECK-NOT: spilled
 
 target datalayout = "e-p:32:32"
 
index ea2e6db61e1afeea2091117172cc6ba78c63172f..ba83a8db839962515a33ad3611a08a3582bba32a 100644 (file)
@@ -1,6 +1,8 @@
-; RUN: llc < %s -march=x86 | grep test.*1
+; RUN: llc < %s -march=x86 | FileCheck %s
 ; PR1016
 
+; CHECK: {{test.*1}}
+
 define i32 @test(i32 %A, i32 %B, i32 %C) {
         %a = trunc i32 %A to i1         ; <i1> [#uses=1]
         %D = select i1 %a, i32 %B, i32 %C               ; <i32> [#uses=1]
index 7528129971ab1fb45977bfc14af485375d734080..648718cc7223d87328ff96f8c70fc6c41afe04fc 100644 (file)
@@ -1,6 +1,8 @@
-; RUN: llc < %s -march=x86-64 | not grep 4294967112
+; RUN: llc < %s -march=x86-64 | FileCheck %s
 ; PR1348
 
+; CHECK-NOT: 4294967112
+
        %struct.md5_ctx = type { i32, i32, i32, i32, [2 x i32], i32, [128 x i8], [4294967288 x i8] }
 
 define i8* @md5_buffer(i8* %buffer, i64 %len, i8* %resblock) {
index 660d4fe7b19e5da6b58c58f57f1d77f3119ee677..5612d9eb282c9fdfc4a500cd1523965d98d80a9f 100644 (file)
@@ -1,4 +1,7 @@
-; RUN: llc < %s -march=x86-64 -mattr=+mmx | grep paddusw
+; RUN: llc < %s -march=x86-64 -mattr=+mmx | FileCheck %s
+
+; CHECK: paddusw
+
 @R = external global x86_mmx          ; <x86_mmx*> [#uses=1]
 
 define void @foo(<1 x i64> %A, <1 x i64> %B) {
index 62624a7e34477d0711e1d8d670bf40aa71f8e61e..4f7ae327d1fdd712da71088144133fe1ca08e905 100644 (file)
@@ -1,4 +1,6 @@
-; RUN: llc < %s -march=x86 | not grep movl
+; RUN: llc < %s -march=x86 | FileCheck %s
+
+; CHECK-NOT: movl
 
 define zeroext i8 @t(i8 zeroext  %x, i8 zeroext  %y)   {
        %tmp2 = add i8 %x, 2
index 6997d535ff92bd1fcd9c780408ddb69d4edc7268..e8c957b1ff647efbc477f36242cd5888c1eb6b01 100644 (file)
@@ -1,4 +1,6 @@
-; RUN: llc < %s -o - | grep sinl
+; RUN: llc < %s -o - | FileCheck %s
+
+; CHECK: sinl
 
 target triple = "i686-pc-linux-gnu"
 
index 9ea34e27a17ee825b39f2ca246c80d808ea41fc5..5bec179534b957acd6645f6d9cd72b3aa8b531f1 100644 (file)
@@ -1,7 +1,9 @@
 ; REQUIRES: asserts
-; RUN: llc < %s -march=x86 -mattr=+sse2 -stats 2>&1 | not grep commuted
+; RUN: llc < %s -march=x86 -mattr=+sse2 -stats 2>&1 | FileCheck %s
 ; rdar://6608609
 
+; CHECK-NOT: commuted
+
 define <2 x double> @t(<2 x double> %A, <2 x double> %B, <2 x double> %C) nounwind readnone {
 entry:
        %tmp.i2 = bitcast <2 x double> %B to <2 x i64>          ; <<2 x i64>> [#uses=1]
index 0607eda271afa9639cec018d6b0ef534c2110b6c..679a65d93d09004a171670d0d43bec4d32ee9913 100644 (file)
@@ -1,8 +1,10 @@
 ; REQUIRES: asserts
-; RUN: llc < %s -mtriple=x86_64-apple-darwin10.0 -relocation-model=pic -disable-fp-elim -stats 2>&1 | grep "Number of modref unfolded"
+; RUN: llc < %s -mtriple=x86_64-apple-darwin10.0 -relocation-model=pic -disable-fp-elim -stats 2>&1 | FileCheck %s
 ; XFAIL: *
 ; 69408 removed the opportunity for this optimization to work
 
+; CHECK: {{Number of modref unfolded}}
+
        %struct.SHA512_CTX = type { [8 x i64], i64, i64, %struct.anon, i32, i32 }
        %struct.anon = type { [16 x i64] }
 @K512 = external constant [80 x i64], align 32         ; <[80 x i64]*> [#uses=2]
index 08bf9e3f9f36c43900ad8fdcc3be15d1f07de5da..d104c875760a1d25b1d55316faaf61c1ff9a1986 100644 (file)
@@ -1,8 +1,9 @@
-; RUN: llc < %s -march=x86-64 -mtriple=x86_64-linux-gnu -regalloc=fast -optimize-regalloc=0 -relocation-model=pic > %t2
-; RUN: grep "leaq.*TLSGD" %t2
-; RUN: grep "__tls_get_addr" %t2
+; RUN: llc < %s -march=x86-64 -mtriple=x86_64-linux-gnu -regalloc=fast -optimize-regalloc=0 -relocation-model=pic | FileCheck %s
 ; PR4004
 
+; CHECK: {{leaq.*TLSGD}}
+; CHECK: {{__tls_get_addr}}
+
 @i = thread_local global i32 15
 
 define i32 @f() {
index 3bb9124633d6b97af0d16d224758fec07290b1ec..d69bfa6e7eb710680237103548c8a33780536c73 100644 (file)
@@ -1,6 +1,7 @@
-; RUN: llc < %s -mtriple=x86_64-apple-darwin > %t
-; RUN: not grep InlineAsm %t
-; RUN: FileCheck %s < %t
+; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck -check-prefix CHK %s
+; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s
+
+; CHK-NOT: InlineAsm
 
 ; CHECK: foo:
 ; CHECK: bswapq
index e0165fb01b53677cbd76b4b9d4f9f1031ef187a6..13046d8b3dec62da51c7eed3c7f8881102239f72 100644 (file)
@@ -1,18 +1,31 @@
-; RUN: llc < %s -march=x86 | grep cmp | count 1
-; RUN: llc < %s -march=x86 | grep shr | count 1
-; RUN: llc < %s -march=x86 | grep xor | count 1
+; RUN: llc < %s -march=x86 | FileCheck %s
 
 define i1 @t1(i64 %x) nounwind {
        %B = icmp slt i64 %x, 0
        ret i1 %B
 }
 
+; CHECK: t1
+; CHECK: shrl
+; CHECK-NOT: shrl
+; CHECK: ret
+
 define i1 @t2(i64 %x) nounwind {
        %tmp = icmp ult i64 %x, 4294967296
        ret i1 %tmp
 }
 
+; CHECK: t2
+; CHECK: cmp
+; CHECK-NOT: cmp
+; CHECK: ret
+
 define i1 @t3(i32 %x) nounwind {
        %tmp = icmp ugt i32 %x, -1
        ret i1 %tmp
 }
+
+; CHECK: t3
+; CHECK: xor
+; CHECK-NOT: xor
+; CHECK: ret
index 932141d0448edb5889c70249808fc94c3bc4ec50..bbf8f010efde995c5b46782187f0c4728075da59 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86-64 | grep div | count 1
+; RUN: llc < %s -march=x86-64 | FileCheck %s
 ; rdar://8168938
 
 ; This testcase involves SCEV normalization with the exit value from
@@ -6,6 +6,9 @@
 ; loop. The expression should be properly normalized and simplified,
 ; and require only a single division.
 
+; CHECK: div
+; CHECK-NOT: div
+
 %0 = type { %0*, %0* }
 
 @0 = private constant [13 x i8] c"Result: %lu\0A\00" ; <[13 x i8]*> [#uses=1]
index 069737d4d10da585a9862905d86901a3c3b815e8..339de3104335a71119f96af4249441d7a32b344e 100644 (file)
@@ -1,6 +1,8 @@
-; RUN: llc < %s -march=x86 | grep 24576
+; RUN: llc < %s -march=x86 | FileCheck %s
 ; PR2135
 
+; CHECK: 24576
+
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
 target triple = "i386-pc-linux-gnu"
 @.str = constant [13 x i8] c"c45531m.adb\00\00"                
index 29474c21f2444c6dc735b97b16648e09358eefa3..c8c2cd753e080f065713c77b04a2cce43b42b329 100644 (file)
@@ -1,4 +1,6 @@
-; RUN: llc < %s -march=x86 -mattr=-sse2,-sse3 | grep fchs
+; RUN: llc < %s -march=x86 -mattr=-sse2,-sse3 | FileCheck %s
+
+; CHECK: fchs
 
 
 define double @T() {
index 8851c5b1a305686e320a4b954a7c496eab9d49f8..ce0843e4252b7b3ff24842777885374dea22ef12 100644 (file)
@@ -1,6 +1,8 @@
-; RUN: llc < %s -march=x86-64 > %t
-; RUN: grep cmov %t | count 2
-; RUN: grep jne %t | count 1
+; RUN: llc < %s -march=x86-64 | grep cmov %t | count 2
+; RUN: llc < %s -march=x86-64 | FileCheck %s
+
+; CHECK: jne
+; CHECK-NOT: jne
 
 ; LSR's OptimizeMax function shouldn't try to eliminate this max, because
 ; it has three operands.
index 2c855ce8da6375b5c4bd328cca500caf585ea478..8b2f61e1e2d260e1c57ac829e2012b5b293ac098 100644 (file)
@@ -1,4 +1,6 @@
-; RUN: llc < %s -mtriple=x86_64-apple-darwin9 -mattr=+sse2 | not grep movl
+; RUN: llc < %s -mtriple=x86_64-apple-darwin9 -mattr=+sse2 | FileCheck %s
+
+; CHECK-NOT: movl
 
        %struct.dpoint = type { double, double }
 
index 3d6369e1c76ae3d4cfea560b5740a955ea185ebe..9c1e1acf0bab60a75eeb16ecb634f83fa1383141 100644 (file)
@@ -1,4 +1,6 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 | grep movq
+; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s
+
+; CHECK: movq
 
 define <4 x i32> @t(i32 %x, i32 %y) nounwind  {
        %tmp1 = insertelement <4 x i32> zeroinitializer, i32 %x, i32 0
index 64f36f99e4d267909bfcdad15f824814a40b3194..c5d6ab88a35d12b1f0bdedc2826f348c6949c90b 100644 (file)
@@ -1,5 +1,8 @@
-; RUN: llc < %s -march=x86 -mattr=+sse2 | grep movd
-; RUN: llc < %s -march=x86 -mattr=+sse2 | not grep xorp
+; RUN: llc < %s -march=x86 -mattr=+sse2 | FileCheck %s
+
+; CHECK-NOT: xorp
+; CHECK: movd
+; CHECK-NOT: xorp
 
 define void @t1() nounwind  {
        %tmp298.i.i = load <4 x float>* null, align 16
index cbf658888ceda3e31b2f1a2a370b8cf62fefa20b..75f89023509dd33896d10ee0b3e4b2799287232c 100644 (file)
@@ -1,4 +1,6 @@
-; RUN: llc < %s | grep movswl
+; RUN: llc < %s | FileCheck %s
+
+; CHECK: movswl
 
 target datalayout = "e-p:64:64"
 target triple = "x86_64-apple-darwin8"