From: Sanjoy Das Date: Wed, 3 Aug 2016 20:53:23 +0000 (+0000) Subject: [IndVars] Un-grepify test; NFC X-Git-Tag: llvmorg-4.0.0-rc1~13394 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac5bf59b6e5eee1ef41cb9e63bc7b0c6709f234e;p=platform%2Fupstream%2Fllvm.git [IndVars] Un-grepify test; NFC Some of these tests need to be cleaned up further to make it obvious what they're testing, but as a first step remove all instances of "grep". llvm-svn: 277648 --- diff --git a/llvm/test/Transforms/IndVarSimplify/2005-02-26-ExitValueCompute.ll b/llvm/test/Transforms/IndVarSimplify/2005-02-26-ExitValueCompute.ll index edeead1..0c48a63 100644 --- a/llvm/test/Transforms/IndVarSimplify/2005-02-26-ExitValueCompute.ll +++ b/llvm/test/Transforms/IndVarSimplify/2005-02-26-ExitValueCompute.ll @@ -1,7 +1,8 @@ -; RUN: opt < %s -indvars -S | \ -; RUN: grep "ret i32 152" +; RUN: opt < %s -indvars -S | FileCheck %s define i32 @main() { +; CHECK-LABEL: @main( +; CHECK: ret i32 152 entry: br label %no_exit diff --git a/llvm/test/Transforms/IndVarSimplify/2006-03-31-NegativeStride.ll b/llvm/test/Transforms/IndVarSimplify/2006-03-31-NegativeStride.ll index c4e6cd4..c5e95ba 100644 --- a/llvm/test/Transforms/IndVarSimplify/2006-03-31-NegativeStride.ll +++ b/llvm/test/Transforms/IndVarSimplify/2006-03-31-NegativeStride.ll @@ -1,10 +1,11 @@ ; PR726 -; RUN: opt < %s -indvars -S | \ -; RUN: grep "ret i32 27" +; RUN: opt < %s -indvars -S | FileCheck %s ; Make sure to compute the right exit value based on negative strides. define i32 @test() { +; CHECK-LABEL: @test( +; CHECK: ret i32 27 entry: br label %cond_true diff --git a/llvm/test/Transforms/IndVarSimplify/2007-01-06-TripCount.ll b/llvm/test/Transforms/IndVarSimplify/2007-01-06-TripCount.ll index 3dda657..e6986ca 100644 --- a/llvm/test/Transforms/IndVarSimplify/2007-01-06-TripCount.ll +++ b/llvm/test/Transforms/IndVarSimplify/2007-01-06-TripCount.ll @@ -1,5 +1,5 @@ ; PR1015 -; RUN: opt < %s -indvars -S | not grep "ret i32 0" +; RUN: opt < %s -indvars -S | FileCheck %s target datalayout = "e-p:32:32" target triple = "i686-apple-darwin8" @@ -8,6 +8,8 @@ target triple = "i686-apple-darwin8" define i32 @test(i32 %J) { +; CHECK-LABEL: @test( +; CHECK-NOT: ret i32 0 entry: br label %bb2 diff --git a/llvm/test/Transforms/IndVarSimplify/2008-09-02-IVType.ll b/llvm/test/Transforms/IndVarSimplify/2008-09-02-IVType.ll index 58934f5..a5669c5 100644 --- a/llvm/test/Transforms/IndVarSimplify/2008-09-02-IVType.ll +++ b/llvm/test/Transforms/IndVarSimplify/2008-09-02-IVType.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -indvars -S | grep sext | count 1 +; RUN: opt < %s -indvars -S | FileCheck %s ; ModuleID = '' ; Provide legal integer types. @@ -21,6 +21,9 @@ target datalayout = "n8:16:32:64" @llvm.used = appending global [1 x i8*] [ i8* bitcast (i16 (%struct.JPEGGlobals*)* @ExtractBufferedBlocksIgnored to i8*) ], section "llvm.metadata" ; <[1 x i8*]*> [#uses=0] define signext i16 @ExtractBufferedBlocksIgnored(%struct.JPEGGlobals* %globp) nounwind { +; CHECK-LABEL: @ExtractBufferedBlocksIgnored( +; CHECK: sext +; CHECK-NOT: sext entry: %tmp4311 = getelementptr %struct.JPEGGlobals, %struct.JPEGGlobals* %globp, i32 0, i32 70 ; [#uses=1] %tmp4412 = load i32, i32* %tmp4311, align 16 ; [#uses=2] diff --git a/llvm/test/Transforms/IndVarSimplify/2009-04-14-shorten_iv_vars.ll b/llvm/test/Transforms/IndVarSimplify/2009-04-14-shorten_iv_vars.ll index ab2af32..9226088 100644 --- a/llvm/test/Transforms/IndVarSimplify/2009-04-14-shorten_iv_vars.ll +++ b/llvm/test/Transforms/IndVarSimplify/2009-04-14-shorten_iv_vars.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -indvars -S | not grep "sext" +; RUN: opt < %s -indvars -S | FileCheck %s ; ModuleID = '' target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n32:64" target triple = "x86_64-apple-darwin9.6" @@ -10,6 +10,8 @@ target triple = "x86_64-apple-darwin9.6" @f = external global i32* ; [#uses=3] define void @foo() nounwind { +; CHECK-LABEL: @foo( +; CHECK-NOT: sext bb1.thread: br label %bb1 diff --git a/llvm/test/Transforms/IndVarSimplify/2009-04-15-shorten-iv-vars-2.ll b/llvm/test/Transforms/IndVarSimplify/2009-04-15-shorten-iv-vars-2.ll index 921a393..67a971a 100644 --- a/llvm/test/Transforms/IndVarSimplify/2009-04-15-shorten-iv-vars-2.ll +++ b/llvm/test/Transforms/IndVarSimplify/2009-04-15-shorten-iv-vars-2.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -indvars -instcombine -S | not grep "[sz]ext" +; RUN: opt < %s -indvars -instcombine -S | FileCheck %s ; ModuleID = '' ;extern int *a, *b, *c, *d, *e, *f; /* 64 bit */ ;extern int K[256]; @@ -24,6 +24,9 @@ target triple = "x86_64-apple-darwin9.6" @K = external global [256 x i32] ; <[256 x i32]*> [#uses=3] define void @foo() nounwind { +; CHECK-LABEL: @foo( +; CHECK-NOT: sext +; CHECK-NOT: zext bb1.thread: br label %bb1 diff --git a/llvm/test/Transforms/IndVarSimplify/ashr-tripcount.ll b/llvm/test/Transforms/IndVarSimplify/ashr-tripcount.ll index 5f33730..19065db 100644 --- a/llvm/test/Transforms/IndVarSimplify/ashr-tripcount.ll +++ b/llvm/test/Transforms/IndVarSimplify/ashr-tripcount.ll @@ -1,5 +1,4 @@ -; RUN: opt < %s -indvars -S > %t -; RUN: grep sext %t | count 1 +; RUN: opt < %s -indvars -S | FileCheck %s ; Indvars should be able to eliminate all of the sign extensions ; inside the loop. @@ -11,6 +10,9 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 @i_pow_2_025_tab = external constant [0 x float] ; <[0 x float]*> [#uses=1] define void @foo(i32 %gain, i32 %noOfLines, i32* %quaSpectrum, float* %iquaSpectrum, float* %pow4_3_tab_ptr) nounwind { +; CHECK-LABEL: @foo( +; CHECK: sext +; CHECK-NOT: sext entry: %t0 = icmp slt i32 %gain, 0 ; [#uses=1] br i1 %t0, label %bb1, label %bb2 diff --git a/llvm/test/Transforms/IndVarSimplify/eliminate-max.ll b/llvm/test/Transforms/IndVarSimplify/eliminate-max.ll index 5831b93..6d07c2c 100644 --- a/llvm/test/Transforms/IndVarSimplify/eliminate-max.ll +++ b/llvm/test/Transforms/IndVarSimplify/eliminate-max.ll @@ -1,4 +1,4 @@ -; RUN: opt < %s -S -indvars | grep "= icmp" | count 3 +; RUN: opt < %s -S -indvars | FileCheck %s ; PR4914.ll ; Indvars should be able to do range analysis and eliminate icmps. @@ -10,6 +10,11 @@ @0 = private constant [4 x i8] c"%d\0A\00", align 1 ; <[4 x i8]*> [#uses=1] define i32 @main() nounwind { +; CHECK-LABEL: @main( +; CHECK: = icmp +; CHECK: = icmp +; CHECK: = icmp +; CHECK-NOT: = icmp bb: br label %bb1 diff --git a/llvm/test/Transforms/IndVarSimplify/exit_value_tests.ll b/llvm/test/Transforms/IndVarSimplify/exit_value_tests.ll index 737e733..e491524 100644 --- a/llvm/test/Transforms/IndVarSimplify/exit_value_tests.ll +++ b/llvm/test/Transforms/IndVarSimplify/exit_value_tests.ll @@ -2,8 +2,9 @@ ; these loops all have predictable exit values we can replace the use outside ; of the loop with a closed-form computation, making the loop dead. ; -; RUN: opt < %s -indvars -loop-deletion -simplifycfg | \ -; RUN: llvm-dis | not grep br +; RUN: opt < %s -indvars -loop-deletion -simplifycfg -S | FileCheck %s + +; CHECK-NOT: br define i32 @polynomial_constant() { ;