Change tests from "opt %s" to "opt < %s" so that opt doesn't see the

input filename so that opt doesn't print the input filename in the
output so that grep lines in the tests don't unintentionally match
strings in the input filename.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81537 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2009-09-11 18:01:28 +00:00
parent 597f9797fd
commit f2f6ce65b7
1273 changed files with 1366 additions and 1366 deletions

View File

@@ -1,7 +1,7 @@
; Induction variable pass is doing bad things with pointer induction vars,
; trying to do arithmetic on them directly.
;
; RUN: opt %s -indvars
; RUN: opt < %s -indvars
;
define void @test(i32 %A, i32 %S, i8* %S.upgrd.1) {
; <label>:0

View File

@@ -1,7 +1,7 @@
; This is a test case for the expression analysis code, not really indvars.
; It was assuming any constant of int type was a ConstantInteger.
;
; RUN: opt %s -indvars
; RUN: opt < %s -indvars
@X = global i32 7 ; <i32*> [#uses=1]

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S | grep indvar
; RUN: opt < %s -indvars -S | grep indvar
define i32 @test() {
; <label>:0

View File

@@ -1,7 +1,7 @@
; The induction variable canonicalization pass shouldn't leave dead
; instructions laying around!
;
; RUN: opt %s -indvars -S | \
; RUN: opt < %s -indvars -S | \
; RUN: not grep {#uses=0}
define i32 @mul(i32 %x, i32 %y) {

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
define void @test() {
entry:

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
define void @_ZN17CoinFactorization7cleanupEv() {
entry:
br i1 false, label %loopexit.14, label %cond_continue.3

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S | grep indvar | not grep i32
; RUN: opt < %s -indvars -S | grep indvar | not grep i32
@G = global i64 0 ; <i64*> [#uses=1]

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
define void @test() {
br label %endif.0.i

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
; ModuleID = '2004-04-05-InvokeCastCrash.ll'
%struct.__false_type = type { i8 }
%"struct.__gnu_cxx::_Hashtable_node<const llvm::Constant*>" = type { %"struct.__gnu_cxx::_Hashtable_node<const llvm::Constant*>"*, %"struct.llvm::Constant"* }

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
define void @.outPlank_21() {
entry:

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
define void @_ZN5ArrayISt7complexIdEEC2ERK10dim_vector() {
entry:

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
declare void @q_atomic_increment()

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S | \
; RUN: opt < %s -indvars -S | \
; RUN: grep {ret i32 152}
define i32 @main() {

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
define void @main() {
entry:

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
@fixtab = external global [29 x [29 x [2 x i32]]] ; <[29 x [29 x [2 x i32]]]*> [#uses=1]

View File

@@ -1,5 +1,5 @@
; PR726
; RUN: opt %s -indvars -S | \
; RUN: opt < %s -indvars -S | \
; RUN: grep {ret i32 27}
; Make sure to compute the right exit value based on negative strides.

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
define void @get_block() {
endif.0:

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
; ModuleID = '2006-09-20-LFTR-Crash.ll'
%struct.p7prior_s = type { i32, i32, [200 x float], [200 x [7 x float]], i32, [200 x float], [200 x [20 x float]], i32, [200 x float], [200 x [20 x float]] }

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
target datalayout = "e-p:32:32"
target triple = "i686-apple-darwin8"
%struct.vorbis_dsp_state = type { i32, %struct.vorbis_info*, float**, float**, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, i64, i64, i64, i64, i64, i8* }

View File

@@ -1,5 +1,5 @@
; PR1015
; RUN: opt %s -indvars -S | not grep {ret i32 0}
; RUN: opt < %s -indvars -S | not grep {ret i32 0}
target datalayout = "e-p:32:32"
target triple = "i686-apple-darwin8"

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
; PR1487
%struct.AVClass = type { i8*, i8* (i8*)*, %struct.AVOption* }

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
; PR1814
target datalayout = "e-p:32:32-f64:32:64-i64:32:64-f80:32:32"

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
; PR2434
define fastcc void @regcppop() nounwind {

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S | grep sext | count 1
; RUN: opt < %s -indvars -S | grep sext | count 1
; ModuleID = '<stdin>'
%struct.App1Marker = type <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }>

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars
; RUN: opt < %s -indvars
; PR2857
@foo = external global i32 ; <i32*> [#uses=1]

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S | grep icmp | count 4
; RUN: opt < %s -indvars -S | grep icmp | count 4
define void @bar() nounwind {
entry:
br label %bb

View File

@@ -1,6 +1,6 @@
; RUN: opt %s -indvars -S | grep icmp | count 2
; RUN: opt %s -indvars -S | grep sitofp | count 1
; RUN: opt %s -indvars -S | grep uitofp | count 1
; RUN: opt < %s -indvars -S | grep icmp | count 2
; RUN: opt < %s -indvars -S | grep sitofp | count 1
; RUN: opt < %s -indvars -S | grep uitofp | count 1
define void @bar() nounwind {
entry:

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars
; RUN: opt < %s -indvars
define void @t() nounwind {
entry:

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S | not grep {sext}
; RUN: opt < %s -indvars -S | not grep {sext}
; ModuleID = '<stdin>'
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"
target triple = "x86_64-apple-darwin9.6"

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -instcombine -S | not grep {\[sz\]ext}
; RUN: opt < %s -indvars -instcombine -S | not grep {\[sz\]ext}
; ModuleID = '<stdin>'
;extern int *a, *b, *c, *d, *e, *f; /* 64 bit */
;extern int K[256];

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars
; RUN: opt < %s -indvars
; rdar://6817574
define i32 @t1() nounwind ssp {

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S | grep icmp | grep next
; RUN: opt < %s -indvars -S | grep icmp | grep next
; PR4086
declare void @foo()

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars
; RUN: opt < %s -indvars
; PR4258
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-linux-gnu"

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S > %t
; RUN: opt < %s -indvars -S > %t
; RUN: grep phi %t | count 4
; RUN: grep {= phi i32} %t | count 4
; RUN: not grep {sext i} %t

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S > %t
; RUN: opt < %s -indvars -S > %t
; RUN: grep getelementptr %t | count 1
; RUN: grep {mul .*, 37} %t | count 1
; RUN: grep {add .*, 5203} %t | count 1

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S > %t
; RUN: opt < %s -indvars -S > %t
; RUN: grep sext %t | count 1
; Indvars should be able to eliminate all of the sign extensions

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars
; RUN: opt < %s -indvars
; PR4052
; PR4054

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
; PR4009
; PR4038

View File

@@ -1,7 +1,7 @@
; The i induction variable looks like a wrap-around, but it really is just
; a simple affine IV. Make sure that indvars eliminates it.
; RUN: opt %s -indvars -S | grep phi | count 1
; RUN: opt < %s -indvars -S | grep phi | count 1
define void @foo() {
entry:

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars
; RUN: opt < %s -indvars
; PR4271
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:128:128"

View File

@@ -2,7 +2,7 @@
; 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: opt < %s -indvars -loop-deletion -simplifycfg | \
; RUN: llvm-dis | not grep br
define i32 @polynomial_constant() {

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars
; RUN: opt < %s -indvars
; An invoke has a result value which is used in an "Interesting"
; expression inside the loop. IndVars should be able to rewrite

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
; ModuleID = 'testcase.bc'
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"

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S > %t
; RUN: opt < %s -indvars -S > %t
; RUN: grep {= sext} %t | count 4
; RUN: grep {phi i64} %t | count 2

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -disable-output
; RUN: opt < %s -indvars -disable-output
; Don't RAUW the loop's original comparison instruction if it has
; other uses which aren't dominated by the new comparison instruction.

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S | grep add | count 1
; RUN: opt < %s -indvars -S | grep add | count 1
; Indvars should be able to compute the exit value of this loop
; without any additional arithmetic. The only add needed should

View File

@@ -1,6 +1,6 @@
; LFTR should eliminate the need for the computation of i*i completely. It
; is only used to compute the exit value.
; RUN: opt %s -indvars -dce -S | not grep mul
; RUN: opt < %s -indvars -dce -S | not grep mul
@A = external global i32 ; <i32*> [#uses=1]

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -loop-index-split -instcombine -indvars -disable-output
; RUN: opt < %s -loop-index-split -instcombine -indvars -disable-output
; PR4455
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"

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S \
; RUN: opt < %s -indvars -S \
; RUN: | grep {%b.1 = phi i32 \\\[ 2, %bb \\\], \\\[ 1, %bb2 \\\]}
; This loop has multiple exits, and the value of %b1 depends on which

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -domfrontier -indvars -loop-deletion
; RUN: opt < %s -domfrontier -indvars -loop-deletion
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:128:128"

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars
; RUN: opt < %s -indvars
; PR4436
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"

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S | not grep select
; RUN: opt < %s -indvars -S | not grep select
; This loop has backedge-taken-count zero. Indvars shouldn't expand any
; instructions to compute a trip count.

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S > %t
; RUN: opt < %s -indvars -S > %t
; RUN: grep {\[%\]tmp7 = icmp eq i8 -28, -28} %t
; RUN: grep {\[%\]tmp8 = icmp eq i8 63, 63} %t
; PR4477

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -loop-deletion -simplifycfg -S | not grep br
; RUN: opt < %s -indvars -loop-deletion -simplifycfg -S | not grep br
;
; Testcase distilled from 256.bzip2

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -loop-deletion -simplifycfg | opt \
; RUN: opt < %s -indvars -loop-deletion -simplifycfg | opt \
; RUN: -analyze -loops | not grep "^Loop Containing"
; PR1179

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S | grep {ret i32 600000}
; RUN: opt < %s -indvars -S | grep {ret i32 600000}
; PR1179
define i32 @foo() {

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S | grep {ret i32 9900}
; RUN: opt < %s -indvars -S | grep {ret i32 9900}
; PR1179
define i32 @test4() {

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S | grep {120, %bb2.bb3_crit_edge}
; RUN: opt < %s -indvars -S | grep {120, %bb2.bb3_crit_edge}
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"
target triple = "i686-pc-linux-gnu"

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -loop-deletion -S | grep phi | count 1
; RUN: opt < %s -indvars -loop-deletion -S | grep phi | count 1
; XFAIL: *
; Indvars can't evaluate this loop, because ScalarEvolution can't compute

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S > %t
; RUN: opt < %s -indvars -S > %t
; RUN: grep {icmp ugt i8\\\*} %t | count 1
; RUN: grep {icmp sgt i8\\\*} %t | count 1

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars
; RUN: opt < %s -indvars
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"
@ue = external global i64

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S | grep indvar
; RUN: opt < %s -indvars -S | grep indvar
@G = global i32* null ; <i32**> [#uses=1]
@Array = external global [40 x i32] ; <[40 x i32]*> [#uses=1]

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S > %t
; RUN: opt < %s -indvars -S > %t
; RUN: grep {%exitcond = icmp eq i64 %indvar.next, %n} %t
; RUN: grep {getelementptr i8\\* %A, i64 %indvar} %t
; RUN: grep getelementptr %t | count 1

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S > %t
; RUN: opt < %s -indvars -S > %t
; Exactly one getelementptr for each load+store.
; RUN: grep getelementptr %t | count 6
; Each getelementptr using %struct.Q* %s as a base and not i8*.

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S \
; RUN: opt < %s -indvars -S \
; RUN: | grep {\[%\]p.2.ip.1 = getelementptr \\\[3 x \\\[3 x double\\\]\\\]\\* \[%\]p, i64 2, i64 \[%\]tmp, i64 1}
; Indvars shouldn't expand this to

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S > %t
; RUN: opt < %s -indvars -S > %t
; RUN: not grep ptrtoint %t
; RUN: not grep inttoptr %t
; RUN: grep getelementptr %t | count 1

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S > %t
; RUN: opt < %s -indvars -S > %t
; RUN: grep sext %t | count 1
; RUN: grep phi %t | count 1
; RUN: grep {phi i64} %t

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S > %t
; RUN: opt < %s -indvars -S > %t
; RUN: not grep sext %t
define i64 @test(i64* nocapture %first, i32 %count) nounwind readonly {

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -scalar-evolution -analyze -disable-output \
; RUN: opt < %s -scalar-evolution -analyze -disable-output \
; RUN: | grep {\\--> (zext i4 {-7,+,-8}<loop> to i32)}
define fastcc void @foo() nounwind {

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S > %t
; RUN: opt < %s -indvars -S > %t
; RUN: not grep sext %t
; RUN: grep phi %t | count 1

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars
; RUN: opt < %s -indvars
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:64"
target triple = "armv6-apple-darwin10"

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S | FileCheck %s
; RUN: opt < %s -indvars -S | FileCheck %s
; PR4775
; Indvars shouldn't sink the alloca out of the entry block, even though

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S | FileCheck %s --check-prefix=CHECK
; RUN: opt < %s -indvars -S | FileCheck %s --check-prefix=CHECK
declare i1 @b()

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -S | grep indvar
; RUN: opt < %s -indvars -S | grep indvar
@G = global i64 0 ; <i64*> [#uses=1]

View File

@@ -3,7 +3,7 @@
; the exit value of the loop will be for some value, allowing us to substitute
; it directly into users outside of the loop, making the loop dead.
;
; RUN: opt %s -indvars -loop-deletion -simplifycfg -S | not grep br
; RUN: opt < %s -indvars -loop-deletion -simplifycfg -S | not grep br
define i32 @linear_setne() {
entry:

View File

@@ -1,7 +1,7 @@
; These tests have an infinite trip count. We obviously shouldn't remove the
; loops! :)
;
; RUN: opt %s -indvars -adce -simplifycfg -S | grep icmp | wc -l > %t2
; RUN: opt < %s -indvars -adce -simplifycfg -S | grep icmp | wc -l > %t2
; RUN: llvm-as < %s | llvm-dis | grep icmp | wc -l > %t1
; RUN: diff %t1 %t2

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars -instcombine -S | \
; RUN: opt < %s -indvars -instcombine -S | \
; RUN: grep {store i32 0}
; Test that -indvars can reduce variable stride IVs. If it can reduce variable
; stride iv's, it will make %iv. and %m.0.0 isomorphic to each other without

View File

@@ -1,4 +1,4 @@
; RUN: opt %s -indvars
; RUN: opt < %s -indvars
; PR4315
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-f80:128:128"