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
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -instcombine -S | not grep alloca
; RUN: opt < %s -scalarrepl -instcombine -S | not grep alloca
; Test that an array is not incorrectly deconstructed.
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl
; RUN: opt < %s -scalarrepl
define void @main() {
%E = alloca { { i32, float, double, i64 }, { i32, float, double, i64 } } ; <{ { i32, float, double, i64 }, { i32, float, double, i64 } }*> [#uses=1]
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl
; RUN: opt < %s -scalarrepl
define i32 @test() {
%X = alloca { [4 x i32] } ; <{ [4 x i32] }*> [#uses=1]
@@ -1,6 +1,6 @@
; Scalar replacement was incorrectly promoting this alloca!!
;
; RUN: opt %s -scalarrepl -S | \
; RUN: opt < %s -scalarrepl -S | \
; RUN: sed {s/;.*//g} | grep {\\\[}
define i8* @test() {
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -S | grep {alloca %T}
; RUN: opt < %s -scalarrepl -S | grep {alloca %T}
%T = type { [80 x i8], i32, i32 }
declare i32 @.callback_1(i8*)
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -disable-output
; RUN: opt < %s -scalarrepl -disable-output
target datalayout = "E-p:32:32"
%struct.rtx_def = type { [2 x i8], i32, [1 x %union.rtunion_def] }
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -disable-output
; RUN: opt < %s -scalarrepl -disable-output
target datalayout = "E-p:32:32"
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -disable-output
; RUN: opt < %s -scalarrepl -disable-output
define void @output_toc() {
entry:
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -disable-output
; RUN: opt < %s -scalarrepl -disable-output
; END.
target datalayout = "e-p:32:32"
target triple = "i686-apple-darwin8.7.2"
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -S | not grep alloca
; RUN: opt < %s -scalarrepl -S | not grep alloca
define i32 @func(<4 x float> %v0, <4 x float> %v1) nounwind {
%vsiidx = alloca [2 x <4 x i32>], align 16 ; <[2 x <4 x i32>]*> [#uses=3]
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -disable-output
; RUN: opt < %s -scalarrepl -disable-output
; PR1045
target datalayout = "e-p:32:32"
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -disable-output
; RUN: opt < %s -scalarrepl -disable-output
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 = "arm-apple-darwin8"
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -S | grep {alloca.*client_t}
; RUN: opt < %s -scalarrepl -S | grep {alloca.*client_t}
; PR1446
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"
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -S | grep memcpy
; RUN: opt < %s -scalarrepl -S | grep memcpy
; PR1421
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"
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -S | not grep shr
; RUN: opt < %s -scalarrepl -S | not grep shr
%struct.S = type { i16 }
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -instcombine -S | grep {ret i8 17}
; RUN: opt < %s -scalarrepl -instcombine -S | grep {ret i8 17}
; rdar://5707076
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"
target triple = "i386-apple-darwin9.1.0"
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -S | not grep alloca
; RUN: opt < %s -scalarrepl -S | not grep alloca
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"
target triple = "i686-apple-darwin8"
%struct..0anon = type { <1 x i64> }
@@ -3,7 +3,7 @@
; instruction, which was not possible before aggregrates were first class
; values. This checks of scalarrepl splits up the struct and array properly.
; RUN: opt %s -scalarrepl -S | not grep alloca
; RUN: opt < %s -scalarrepl -S | not grep alloca
define i32 @foo() {
%target = alloca { i32, i32 } ; <{ i32, i32 }*> [#uses=1]
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -S | grep {call.*mem}
; RUN: opt < %s -scalarrepl -S | grep {call.*mem}
; PR2369
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"
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -S | grep {s = alloca .struct.x}
; RUN: opt < %s -scalarrepl -S | grep {s = alloca .struct.x}
; PR2423
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"
target triple = "i386-apple-darwin8"
@@ -3,7 +3,7 @@
; this would not work when there was a vector involved in the struct, preventing
; scalarrepl from removing the alloca below.
; RUN: opt %s -scalarrepl -S > %t
; RUN: opt < %s -scalarrepl -S > %t
; RUN: cat %t | not grep alloca
%struct.two = type <{ < 2 x i8 >, i16 }>
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl | llvm-dis
; RUN: opt < %s -scalarrepl | llvm-dis
; PR3304
%struct.c37304a__vrec = type { i8, %struct.c37304a__vrec___disc___XVN }
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -instcombine -S | grep {ret i32 %x}
; RUN: opt < %s -scalarrepl -instcombine -S | grep {ret i32 %x}
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"
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -instcombine -inline -instcombine -S | grep {ret i32 42}
; RUN: opt < %s -scalarrepl -instcombine -inline -instcombine -S | grep {ret i32 42}
; PR3489
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"
target triple = "x86_64-apple-darwin10.0"
@@ -1,6 +1,6 @@
; The store into %p should end up with a known alignment of 1, since the memcpy
; is only known to access it with 1-byte alignment.
; RUN: opt %s -scalarrepl -S | grep {store i16 1, .*, align 1}
; RUN: opt < %s -scalarrepl -S | grep {store i16 1, .*, align 1}
; PR3720
%struct.st = type { i16 }
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -disable-output -stats |& grep "Number of aggregates converted to scalar"
; RUN: opt < %s -scalarrepl -disable-output -stats |& grep "Number of aggregates converted to scalar"
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"
target triple = "i386-apple-darwin9.6"
type { } ; type %0
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -S | grep store | not grep undef
; RUN: opt < %s -scalarrepl -S | grep store | not grep undef
; ModuleID = '<stdin>'
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"
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl | llvm-dis
; RUN: opt < %s -scalarrepl | llvm-dis
; rdar://6808691
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"
target triple = "x86_64-apple-darwin9.0"
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl | llvm-dis
; RUN: opt < %s -scalarrepl | llvm-dis
; PR4146
%wrapper = type { i1 }
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl
; RUN: opt < %s -scalarrepl
; PR4286
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"
+1 -1
View File
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -disable-opt
; RUN: opt < %s -scalarrepl -disable-opt
%struct.Item = type { [4 x i16], %struct.rule* }
%struct.rule = type { [4 x i16], i32, i32, i32, %struct.nonterminal*, %struct.pattern*, i8 }
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -S | \
; RUN: opt < %s -scalarrepl -S | \
; RUN: not grep alloca
target datalayout = "E-p:32:32"
+1 -1
View File
@@ -1,7 +1,7 @@
; This is a feature test. Hopefully one day this will be implemented. The
; generated code should perform the appropriate masking operations required
; depending on the endianness of the target...
; RUN: opt %s -scalarrepl -S | \
; RUN: opt < %s -scalarrepl -S | \
; RUN: not grep alloca
define i32 @testfunc(i32 %i, i8 %j) {
+1 -1
View File
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -mem2reg -S | not grep alloca
; RUN: opt < %s -scalarrepl -mem2reg -S | not grep alloca
define i32 @test() {
%X = alloca [4 x i32] ; <[4 x i32]*> [#uses=1]
+1 -1
View File
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -instcombine -S | not grep alloca
; RUN: opt < %s -scalarrepl -instcombine -S | not grep alloca
; PR3466
define i32 @test() {
+1 -1
View File
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -mem2reg -S | not grep alloca
; RUN: opt < %s -scalarrepl -mem2reg -S | not grep alloca
define i32 @test() {
%X = alloca { i32, float } ; <{ i32, float }*> [#uses=1]
+1 -1
View File
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -S | not grep alloca
; RUN: opt < %s -scalarrepl -S | not grep alloca
; rdar://6532315
%t = type { { i32, i16, i8, i8 } }
+1 -1
View File
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -S | not grep alloca
; RUN: opt < %s -scalarrepl -S | not grep alloca
; PR3290
;; Store of integer to whole alloca struct.
+1 -1
View File
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -S | not grep alloca
; RUN: opt < %s -scalarrepl -S | not grep alloca
%llvm.dbg.anchor.type = type { i32, i32 }
%llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, i32 }
%llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8*, i1, i1, i8* }
@@ -2,7 +2,7 @@
; are directly loaded from or stored to (using the first class aggregates
; feature).
; RUN: opt %s -scalarrepl -S > %t
; RUN: opt < %s -scalarrepl -S > %t
; RUN: cat %t | not grep alloca
%struct.foo = type { i32, i32 }
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -S | not grep {call.*memcpy}
; RUN: opt < %s -scalarrepl -S | not grep {call.*memcpy}
@C.0.1248 = internal constant [128 x float] [ float -1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float -1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float -1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float -1.000000e+00, float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00 ], align 32 ; <[128 x float]*> [#uses=1]
define float @grad4(i32 %hash, float %x, float %y, float %z, float %w) {
@@ -1,7 +1,7 @@
; PR1226
; RUN: opt %s -scalarrepl -S | \
; RUN: opt < %s -scalarrepl -S | \
; RUN: not grep {call void @llvm.memcpy.i32}
; RUN: opt %s -scalarrepl -S | grep getelementptr
; RUN: opt < %s -scalarrepl -S | grep getelementptr
; END.
target datalayout = "E-p:32:32"
@@ -1,7 +1,7 @@
; PR1226
; RUN: opt %s -scalarrepl -S | grep {ret i32 16843009}
; RUN: opt %s -scalarrepl -S | not grep alloca
; RUN: opt %s -scalarrepl -instcombine -S | grep {ret i16 514}
; RUN: opt < %s -scalarrepl -S | grep {ret i32 16843009}
; RUN: opt < %s -scalarrepl -S | not grep alloca
; RUN: opt < %s -scalarrepl -instcombine -S | grep {ret i16 514}
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-apple-darwin8"
+3 -3
View File
@@ -1,6 +1,6 @@
; RUN: opt %s -scalarrepl -S | not grep alloca
; RUN: opt %s -scalarrepl -S | not grep {7 x double}
; RUN: opt %s -scalarrepl -instcombine -S | grep {ret double %B}
; RUN: opt < %s -scalarrepl -S | not grep alloca
; RUN: opt < %s -scalarrepl -S | not grep {7 x double}
; RUN: opt < %s -scalarrepl -instcombine -S | grep {ret double %B}
define double @test(double %A, double %B) {
%ARR = alloca [7 x i64]
+1 -1
View File
@@ -1,4 +1,4 @@
; RUN: opt %s -simplifycfg -instcombine -mem2reg -S | not grep alloca
; RUN: opt < %s -simplifycfg -instcombine -mem2reg -S | not grep alloca
;
; This tests to see if mem2reg can promote alloca instructions whose addresses
; are used by PHI nodes that are immediately loaded. The LLVM C++ front-end
+1 -1
View File
@@ -1,7 +1,7 @@
; Test promotion of loads that use the result of a select instruction. This
; should be simplified by the instcombine pass.
; RUN: opt %s -instcombine -mem2reg -S | not grep alloca
; RUN: opt < %s -instcombine -mem2reg -S | not grep alloca
define i32 @main() {
%mem_tmp.0 = alloca i32 ; <i32*> [#uses=3]
+1 -1
View File
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl | llvm-dis
; RUN: opt < %s -scalarrepl | llvm-dis
; Make sure that SROA "scalar conversion" can handle first class aggregates.
define i64 @test({i32, i32} %A) {
+1 -1
View File
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl | llvm-dis
; RUN: opt < %s -scalarrepl | llvm-dis
define i32 @test(i32 %X) {
%Arr = alloca [2 x i32] ; <[2 x i32]*> [#uses=3]
+2 -2
View File
@@ -1,6 +1,6 @@
; RUN: opt %s -scalarrepl -S | \
; RUN: opt < %s -scalarrepl -S | \
; RUN: not grep alloca
; RUN: opt %s -scalarrepl -S | \
; RUN: opt < %s -scalarrepl -S | \
; RUN: grep {bitcast.*float.*i32}
define i32 @test(float %X) {
+2 -2
View File
@@ -1,6 +1,6 @@
; RUN: opt %s -scalarrepl -S | \
; RUN: opt < %s -scalarrepl -S | \
; RUN: not grep alloca
; RUN: opt %s -scalarrepl -S | \
; RUN: opt < %s -scalarrepl -S | \
; RUN: grep bitcast
define <4 x i32> @test(<4 x float> %X) {
+2 -2
View File
@@ -1,7 +1,7 @@
; PR892
; RUN: opt %s -scalarrepl -S | \
; RUN: opt < %s -scalarrepl -S | \
; RUN: not grep alloca
; RUN: opt %s -scalarrepl -S | grep {ret i8}
; RUN: opt < %s -scalarrepl -S | grep {ret i8}
target datalayout = "e-p:32:32"
target triple = "i686-apple-darwin8.7.2"
+1 -1
View File
@@ -1,4 +1,4 @@
; RUN: opt %s -scalarrepl -S > %t
; RUN: opt < %s -scalarrepl -S > %t
; RUN: grep {ret <16 x float> %A} %t
; RUN: grep {ret <16 x float> zeroinitializer} %t
+2 -2
View File
@@ -1,5 +1,5 @@
; RUN: opt %s -scalarrepl -S | not grep alloca
; RUN: opt %s -scalarrepl -S | grep {load <4 x float>}
; RUN: opt < %s -scalarrepl -S | not grep alloca
; RUN: opt < %s -scalarrepl -S | grep {load <4 x float>}
define void @test(<4 x float>* %F, float %f) {
entry:
+2 -2
View File
@@ -1,5 +1,5 @@
; RUN: opt %s -scalarrepl -S | grep {volatile load}
; RUN: opt %s -scalarrepl -S | grep {volatile store}
; RUN: opt < %s -scalarrepl -S | grep {volatile load}
; RUN: opt < %s -scalarrepl -S | grep {volatile store}
define i32 @voltest(i32 %T) {
%A = alloca {i32, i32}