Convert tests to FileCheck
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 28 Aug 2013 23:04:41 +0000 (23:04 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Wed, 28 Aug 2013 23:04:41 +0000 (23:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189529 91177308-0d34-0410-b5e6-96231b3b80d8

14 files changed:
test/Transforms/InstCombine/2002-05-14-SubFailure.ll
test/Transforms/InstCombine/2002-12-05-MissedConstProp.ll
test/Transforms/InstCombine/2003-08-12-AllocaNonNull.ll
test/Transforms/InstCombine/2006-10-20-mask.ll
test/Transforms/InstCombine/2006-10-26-VectorReassoc.ll
test/Transforms/InstCombine/2006-12-08-Select-ICmp.ll
test/Transforms/InstCombine/2008-01-27-FloatSelect.ll
test/Transforms/InstCombine/2008-02-13-MulURem.ll
test/Transforms/InstCombine/2008-05-31-AddBool.ll
test/Transforms/InstCombine/apint-select.ll
test/Transforms/InstCombine/fold-vector-select.ll
test/Transforms/InstCombine/select-2.ll
test/Transforms/InstCombine/vec_extract_elt.ll
test/Transforms/InstCombine/vec_insertelt.ll

index d2b2b0027a52c51c6332af24f3dd79084ca5b0a0..854ec604d01a5b41091b5031a5c07066a5552367 100644 (file)
@@ -1,7 +1,8 @@
 ; Instcombine was missing a test that caused it to make illegal transformations
 ; sometimes.  In this case, it transforms the sub into an add:
-; RUN: opt < %s -instcombine -S | grep sub
-;
+; RUN: opt < %s -instcombine -S | FileCheck %s
+; CHECK: sub
+
 define i32 @test(i32 %i, i32 %j) {
         %A = mul i32 %i, %j
         %B = sub i32 2, %A
index 22574f77f1d90de95aa673b736c69da0a25bd38b..49e55c620a4949321296502c3f86594b97f5f84d 100644 (file)
@@ -1,4 +1,6 @@
-; RUN: opt < %s -instcombine -S | not grep add
+; RUN: opt < %s -instcombine -S | FileCheck %s
+
+; CHECK-NOT: add
 
 define i32 @test(i32 %A) {
         %A.neg = sub i32 0, %A          ; <i32> [#uses=1]
index c02d33ccc1b70dd1c7c2c4cdf580d9bafb10a6ca..bb9a8181ccd460396cc43bacbbe023643adfc200 100644 (file)
@@ -1,6 +1,7 @@
-; This testcase can be simplified by "realizing" that alloca can never return 
+; This testcase can be simplified by "realizing" that alloca can never return
 ; null.
-; RUN: opt < %s -instcombine -simplifycfg -S | not grep br
+; RUN: opt < %s -instcombine -simplifycfg -S | FileCheck %s
+; CHECK-NOT: br
 
 declare i32 @bitmap_clear(...)
 
index 0aaa5e8c21b4b806d46994ece48bbbff44fd8ac2..e9797ae50c95834450a3f8394818c3cd60cc8bdd 100644 (file)
@@ -1,5 +1,5 @@
-; RUN: opt < %s -instcombine -S | \
-; RUN:    grep and
+; RUN: opt < %s -instcombine -S | FileCheck %s
+; CHECK: and
 
 define i64 @foo(i64 %tmp, i64 %tmp2) {
         %tmp.upgrd.1 = trunc i64 %tmp to i32            ; <i32> [#uses=1]
index d3ba1e2287a3dd29d9a61862d7e9b2de6ade77ff..8ab50e2227450d85119b53f8ebff7f5783c4ec2a 100644 (file)
@@ -1,5 +1,6 @@
-; RUN: opt < %s -instcombine -S | \
-; RUN:   grep mul | count 2
+; RUN: opt < %s -instcombine -S | FileCheck %s
+; CHECK: mul
+; CHECK: mul
 
 define <4 x float> @test(<4 x float> %V) {
         %Y = fmul <4 x float> %V, < float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00 >                ; <<4 x float>> [#uses=1]
index 2665791fe086a46f7f6430d78c0b04659298236c..272753cc98d665abdd3e30d870c5baeaaf7c4a0a 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: opt < %s -instcombine -S | grep select
+; RUN: opt < %s -instcombine -S | FileCheck %s
+; CHECK: select
 ; END.
 
 target datalayout = "e-p:32:32"
index c161bcc9045dca18f0ce50b6225c1f79a8bd241d..6b4e89dbbe6051ec1903f3a15882c7c964ca263d 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: opt < %s -instcombine -S | grep select
+; RUN: opt < %s -instcombine -S | FileCheck %s
+; CHECK: select
 
 define double @fold(i1 %a, double %b) {
 %s = select i1 %a, double 0., double 1.
index a88c510972475872cac31e40375651d39b6088d1..d85ef97553abab3b804a3bc4f786e66ec3be7311 100644 (file)
@@ -1,6 +1,8 @@
-; RUN: opt < %s -instcombine -S | grep rem
+; RUN: opt < %s -instcombine -S | FileCheck %s
 ; PR1933
 
+; CHECK: rem
+
 define i32 @fold(i32 %a) {
   %s = mul i32 %a, 3
   %c = urem i32 %s, 3
index ed2069041d1ba953b41215f049dbf5b627d28f8b..31b17196d8f5a41557ab91b1543ff9371bc82827 100644 (file)
@@ -1,6 +1,8 @@
-; RUN: opt < %s -instcombine -S | grep "xor"
+; RUN: opt < %s -instcombine -S | FileCheck %s
 ; PR2389
 
+; CHECK: xor
+
 define i1 @test(i1 %a, i1 %b) {
   %A = add i1 %a, %b
   ret i1 %A
index f2ea60101c5f9663990a6d14b90a6495072a4a40..cf24a44d628838fe2e5b30cf728870e69dd650cb 100644 (file)
@@ -1,6 +1,7 @@
 ; This test makes sure that these instructions are properly eliminated.
 
-; RUN: opt < %s -instcombine -S | not grep select
+; RUN: opt < %s -instcombine -S | FileCheck %s
+; CHECK-NOT: select
 
 
 define i41 @test1(i1 %C) {
@@ -37,7 +38,7 @@ define i41 @test5(i41 %X) {
 
 define i1023 @test6(i1023 %X) {
     ;; ((X & 27) ? 27 : 0)
-    %Y = and i1023 %X, 64 
+    %Y = and i1023 %X, 64
     %t = icmp ne i1023 %Y, 0
     %V = select i1 %t, i1023 64, i1023 0
     ret i1023 %V
index 2cb970bf41774e6e0bd6652f886ff18efc0a9cb4..b58d9dc90acc1edcc2d6edf23a61031dbbd2bce5 100644 (file)
@@ -1,4 +1,6 @@
-; RUN: opt < %s -instcombine -S | not grep select
+; RUN: opt < %s -instcombine -S | FileCheck %s
+
+; CHECK-NOT: select
 
 define void @foo(<4 x i32> *%A, <4 x i32> *%B, <4 x i32> *%C, <4 x i32> *%D,
                  <4 x i32> *%E, <4 x i32> *%F, <4 x i32> *%G, <4 x i32> *%H,
index a76addc9942b09b588616deebb781b6dc68af67f..5b9deb4515a8f8369b9ba24fdea94237bf6e0419 100644 (file)
@@ -1,4 +1,7 @@
-; RUN: opt < %s -instcombine -S | grep select | count 2
+; RUN: opt < %s -instcombine -S | FileCheck %s
+
+; CHECK: select
+; CHECK: select
 
 ; Make sure instcombine don't fold select into operands. We don't want to emit
 ; select of two integers unless it's selecting 0 / 1.
index 166066a201bf6b0ebd89dc98a6e09cea4b5c16b6..3daf72ede509a0f8f797d399255d7d17ee282a4f 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: opt < %s -instcombine -S | not grep extractelement
+; RUN: opt < %s -instcombine -S | FileCheck %s
+; CHECK-NOT: extractelement
 
 define i32 @test(float %f) {
         %tmp7 = insertelement <4 x float> undef, float %f, i32 0                ; <<4 x float>> [#uses=1]
index e35fa5e551fb140fd986a1c1b1ba79af74cb3916..3b949209c4d7693b05a7d5b42f27617dbe9a148a 100644 (file)
@@ -1,4 +1,5 @@
-; RUN: opt < %s -instcombine -S | grep "ret <4 x i32> %A"
+; RUN: opt < %s -instcombine -S | FileCheck %s
+; CHECK: ret <4 x i32> %A
 
 ; PR1286
 define <4 x i32> @test1(<4 x i32> %A) {