[llvm] r180837 - More rewrites of x86 codegen regression tests with FileCheck

Michael Liao michael.liao at intel.com
Tue Apr 30 22:34:31 PDT 2013


Author: hliao
Date: Wed May  1 00:34:30 2013
New Revision: 180837

URL: http://llvm.org/viewvc/llvm-project?rev=180837&view=rev
Log:
More rewrites of x86 codegen regression tests with FileCheck


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

Modified: llvm/trunk/test/CodeGen/X86/2003-08-03-CallArgLiveRanges.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2003-08-03-CallArgLiveRanges.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2003-08-03-CallArgLiveRanges.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2003-08-03-CallArgLiveRanges.ll Wed May  1 00:34:30 2013
@@ -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"
 

Modified: llvm/trunk/test/CodeGen/X86/2006-11-27-SelectLegalize.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2006-11-27-SelectLegalize.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2006-11-27-SelectLegalize.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2006-11-27-SelectLegalize.ll Wed May  1 00:34:30 2013
@@ -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]

Modified: llvm/trunk/test/CodeGen/X86/2007-04-24-Huge-Stack.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-04-24-Huge-Stack.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2007-04-24-Huge-Stack.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2007-04-24-Huge-Stack.ll Wed May  1 00:34:30 2013
@@ -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) {

Modified: llvm/trunk/test/CodeGen/X86/2007-06-15-IntToMMX.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-06-15-IntToMMX.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2007-06-15-IntToMMX.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2007-06-15-IntToMMX.ll Wed May  1 00:34:30 2013
@@ -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) {

Modified: llvm/trunk/test/CodeGen/X86/2007-08-01-LiveVariablesBug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2007-08-01-LiveVariablesBug.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2007-08-01-LiveVariablesBug.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2007-08-01-LiveVariablesBug.ll Wed May  1 00:34:30 2013
@@ -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

Modified: llvm/trunk/test/CodeGen/X86/2008-01-09-LongDoubleSin.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2008-01-09-LongDoubleSin.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2008-01-09-LongDoubleSin.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2008-01-09-LongDoubleSin.ll Wed May  1 00:34:30 2013
@@ -1,4 +1,6 @@
-; RUN: llc < %s -o - | grep sinl
+; RUN: llc < %s -o - | FileCheck %s
+
+; CHECK: sinl
 
 target triple = "i686-pc-linux-gnu"
 

Modified: llvm/trunk/test/CodeGen/X86/2009-02-25-CommuteBug.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-02-25-CommuteBug.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2009-02-25-CommuteBug.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2009-02-25-CommuteBug.ll Wed May  1 00:34:30 2013
@@ -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]

Modified: llvm/trunk/test/CodeGen/X86/2009-04-16-SpillerUnfold.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-04-16-SpillerUnfold.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2009-04-16-SpillerUnfold.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2009-04-16-SpillerUnfold.ll Wed May  1 00:34:30 2013
@@ -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]

Modified: llvm/trunk/test/CodeGen/X86/2009-04-24.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/2009-04-24.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/2009-04-24.ll (original)
+++ llvm/trunk/test/CodeGen/X86/2009-04-24.ll Wed May  1 00:34:30 2013
@@ -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() {

Modified: llvm/trunk/test/CodeGen/X86/bswap-inline-asm.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/bswap-inline-asm.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/bswap-inline-asm.ll (original)
+++ llvm/trunk/test/CodeGen/X86/bswap-inline-asm.ll Wed May  1 00:34:30 2013
@@ -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

Modified: llvm/trunk/test/CodeGen/X86/long-setcc.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/long-setcc.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/long-setcc.ll (original)
+++ llvm/trunk/test/CodeGen/X86/long-setcc.ll Wed May  1 00:34:30 2013
@@ -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

Modified: llvm/trunk/test/CodeGen/X86/lsr-normalization.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/lsr-normalization.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/lsr-normalization.ll (original)
+++ llvm/trunk/test/CodeGen/X86/lsr-normalization.ll Wed May  1 00:34:30 2013
@@ -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]

Modified: llvm/trunk/test/CodeGen/X86/mul-legalize.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/mul-legalize.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/mul-legalize.ll (original)
+++ llvm/trunk/test/CodeGen/X86/mul-legalize.ll Wed May  1 00:34:30 2013
@@ -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"		

Modified: llvm/trunk/test/CodeGen/X86/negative_zero.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/negative_zero.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/negative_zero.ll (original)
+++ llvm/trunk/test/CodeGen/X86/negative_zero.ll Wed May  1 00:34:30 2013
@@ -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() {

Modified: llvm/trunk/test/CodeGen/X86/optimize-max-2.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/optimize-max-2.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/optimize-max-2.ll (original)
+++ llvm/trunk/test/CodeGen/X86/optimize-max-2.ll Wed May  1 00:34:30 2013
@@ -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.

Modified: llvm/trunk/test/CodeGen/X86/phys_subreg_coalesce.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/phys_subreg_coalesce.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/phys_subreg_coalesce.ll (original)
+++ llvm/trunk/test/CodeGen/X86/phys_subreg_coalesce.ll Wed May  1 00:34:30 2013
@@ -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 }
 

Modified: llvm/trunk/test/CodeGen/X86/vec_set-D.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_set-D.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vec_set-D.ll (original)
+++ llvm/trunk/test/CodeGen/X86/vec_set-D.ll Wed May  1 00:34:30 2013
@@ -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

Modified: llvm/trunk/test/CodeGen/X86/vec_set-I.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/vec_set-I.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/vec_set-I.ll (original)
+++ llvm/trunk/test/CodeGen/X86/vec_set-I.ll Wed May  1 00:34:30 2013
@@ -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

Modified: llvm/trunk/test/CodeGen/X86/x86-64-shortint.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/x86-64-shortint.ll?rev=180837&r1=180836&r2=180837&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/x86-64-shortint.ll (original)
+++ llvm/trunk/test/CodeGen/X86/x86-64-shortint.ll Wed May  1 00:34:30 2013
@@ -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"





More information about the llvm-commits mailing list