mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
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:
@@ -2,7 +2,7 @@
|
||||
; is performed. It is not legal to delete the second load instruction because
|
||||
; the value computed by the first load instruction is changed by the store.
|
||||
|
||||
; RUN: opt %s -gvn -instcombine -S | grep DONOTREMOVE
|
||||
; RUN: opt < %s -gvn -instcombine -S | grep DONOTREMOVE
|
||||
|
||||
define i32 @test() {
|
||||
%A = alloca i32
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -basicaa -aa-eval -disable-output 2>/dev/null
|
||||
; RUN: opt < %s -basicaa -aa-eval -disable-output 2>/dev/null
|
||||
; Test for a bug in BasicAA which caused a crash when querying equality of P1&P2
|
||||
define void @test({[2 x i32],[2 x i32]}* %A, i64 %X, i64 %Y) {
|
||||
%P1 = getelementptr {[2 x i32],[2 x i32]}* %A, i64 0, i32 0, i64 %X
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -gvn -instcombine -S | grep sub
|
||||
; RUN: opt < %s -gvn -instcombine -S | grep sub
|
||||
|
||||
; BasicAA was incorrectly concluding that P1 and P2 didn't conflict!
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -basicaa -aa-eval -disable-output 2>/dev/null
|
||||
; RUN: opt < %s -basicaa -aa-eval -disable-output 2>/dev/null
|
||||
; Test for a bug in BasicAA which caused a crash when querying equality of P1&P2
|
||||
define void @test([17 x i16]* %mask_bits) {
|
||||
%P1 = getelementptr [17 x i16]* %mask_bits, i64 0, i64 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -licm -disable-output
|
||||
; RUN: opt < %s -licm -disable-output
|
||||
%struct..apr_array_header_t = type { i32*, i32, i32, i32, i8* }
|
||||
%struct..apr_table_t = type { %struct..apr_array_header_t, i32, [32 x i32], [32 x i32] }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -basicaa -aa-eval -disable-output 2>/dev/null
|
||||
; RUN: opt < %s -basicaa -aa-eval -disable-output 2>/dev/null
|
||||
|
||||
define i32 @MTConcat([3 x i32]* %a.1) {
|
||||
%tmp.961 = getelementptr [3 x i32]* %a.1, i64 0, i64 4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -basicaa -aa-eval -disable-output 2>/dev/null
|
||||
; RUN: opt < %s -basicaa -aa-eval -disable-output 2>/dev/null
|
||||
|
||||
%struct..RefPoint = type { i32, { i32, i8, i8 } }
|
||||
%struct..RefRect = type { %struct..RefPoint, %struct..RefPoint }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; In this test, a local alloca cannot alias an incoming argument.
|
||||
|
||||
; RUN: opt %s -gvn -instcombine -S | not grep sub
|
||||
; RUN: opt < %s -gvn -instcombine -S | not grep sub
|
||||
|
||||
define i32 @test(i32* %P) {
|
||||
%X = alloca i32
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; This testcase consists of alias relations which should be completely
|
||||
; resolvable by basicaa.
|
||||
|
||||
; RUN: opt %s -aa-eval -print-may-aliases -disable-output \
|
||||
; RUN: opt < %s -aa-eval -print-may-aliases -disable-output \
|
||||
; RUN: |& not grep May:
|
||||
|
||||
%T = type { i32, [10 x i8] }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; This testcase consists of alias relations which should be completely
|
||||
; resolvable by basicaa, but require analysis of getelementptr constant exprs.
|
||||
|
||||
; RUN: opt %s -aa-eval -print-may-aliases -disable-output \
|
||||
; RUN: opt < %s -aa-eval -print-may-aliases -disable-output \
|
||||
; RUN: |& not grep May:
|
||||
|
||||
%T = type { i32, [10 x i8] }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -dse -S | grep {store i32 0}
|
||||
; RUN: opt < %s -dse -S | grep {store i32 0}
|
||||
|
||||
define void @test({i32,i32 }* %P) {
|
||||
%Q = getelementptr {i32,i32}* %P, i32 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -licm
|
||||
; RUN: opt < %s -licm
|
||||
|
||||
%"java/lang/Object" = type { %struct.llvm_java_object_base }
|
||||
%"java/lang/StringBuffer" = type { "java/lang/Object", i32, { "java/lang/Object", i32, [0 x i8] }*, i1 }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -dse
|
||||
; RUN: opt < %s -dse
|
||||
|
||||
%"java/lang/Object" = type { %struct.llvm_java_object_base }
|
||||
%"java/lang/StringBuffer" = type { "java/lang/Object", i32, { "java/lang/Object", i32, [0 x i8] }*, i1 }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -basicaa -gvn -instcombine |\
|
||||
; RUN: opt < %s -basicaa -gvn -instcombine |\
|
||||
; RUN: llvm-dis | grep {load i32\\* %A}
|
||||
|
||||
declare double* @useit(i32*)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -aa-eval -disable-output |& grep {2 no alias respon}
|
||||
; RUN: opt < %s -aa-eval -disable-output |& grep {2 no alias respon}
|
||||
; TEST that A[1][0] may alias A[0][i].
|
||||
|
||||
define void @test(i32 %N) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; PR1109
|
||||
; RUN: opt %s -basicaa -gvn -instcombine -S | \
|
||||
; RUN: opt < %s -basicaa -gvn -instcombine -S | \
|
||||
; RUN: grep {sub i32}
|
||||
; RUN: opt %s -basicaa -gvn -instcombine -S | \
|
||||
; RUN: opt < %s -basicaa -gvn -instcombine -S | \
|
||||
; RUN: not grep {ret i32 0}
|
||||
; END.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
; PR1600
|
||||
; RUN: opt %s -basicaa -gvn -instcombine -S | \
|
||||
; RUN: opt < %s -basicaa -gvn -instcombine -S | \
|
||||
; RUN: grep {ret i32 0}
|
||||
; END.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -basicaa -gvn -dce -S | grep tmp7
|
||||
; RUN: opt < %s -basicaa -gvn -dce -S | grep tmp7
|
||||
|
||||
%struct.A = type { i32 }
|
||||
%struct.B = type { %struct.A }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -gvn -disable-output
|
||||
; RUN: opt < %s -gvn -disable-output
|
||||
; PR1774
|
||||
|
||||
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"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -gvn -disable-output
|
||||
; RUN: opt < %s -gvn -disable-output
|
||||
; PR1782
|
||||
|
||||
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"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -std-compile-opts -S | grep store
|
||||
; RUN: opt < %s -std-compile-opts -S | grep store
|
||||
; ModuleID = 'small2.c'
|
||||
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"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -gvn -disable-output
|
||||
; RUN: opt < %s -gvn -disable-output
|
||||
; PR2395
|
||||
|
||||
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 -aa-eval |& grep {1 no alias response}
|
||||
; RUN: opt < %s -aa-eval |& grep {1 no alias response}
|
||||
|
||||
declare noalias i32* @_Znwj(i32 %x) nounwind
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -aa-eval -print-all-alias-modref-info -disable-output |& grep {MustAlias:.*%R,.*%r}
|
||||
; RUN: opt < %s -aa-eval -print-all-alias-modref-info -disable-output |& grep {MustAlias:.*%R,.*%r}
|
||||
; Make sure that basicaa thinks R and r are must aliases.
|
||||
|
||||
define i32 @test(i8 * %P) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -basicaa -gvn -S | grep load
|
||||
; RUN: opt < %s -basicaa -gvn -S | grep load
|
||||
|
||||
declare noalias i32* @noalias()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -gvn -S | grep {ret i32 1}
|
||||
; RUN: opt < %s -gvn -S | grep {ret i32 1}
|
||||
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.x = type { i32, i32, i32, i32 }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -basicaa -gvn -S | grep load | count 1
|
||||
; RUN: opt < %s -basicaa -gvn -S | grep load | count 1
|
||||
|
||||
@flag0 = internal global i32 zeroinitializer
|
||||
@turn = internal global i32 zeroinitializer
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -aa-eval -print-all-alias-modref-info \
|
||||
; RUN: opt < %s -aa-eval -print-all-alias-modref-info \
|
||||
; RUN: |& grep {MayAlias: double\\* \[%\]p.0.i.0, double\\* \[%\]p3\$}
|
||||
; PR4267
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; This testcase tests for various features the basicaa test should be able to
|
||||
; determine, as noted in the comments.
|
||||
|
||||
; RUN: opt %s -basicaa -gvn -instcombine -dce -S | not grep REMOVE
|
||||
; RUN: opt < %s -basicaa -gvn -instcombine -dce -S | not grep REMOVE
|
||||
|
||||
@Global = external global { i32 }
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
; disambiguating some obvious cases. All loads should be removable in
|
||||
; this testcase.
|
||||
|
||||
; RUN: opt %s -basicaa -gvn -instcombine -dce -S \
|
||||
; RUN: opt < %s -basicaa -gvn -instcombine -dce -S \
|
||||
; RUN: | not grep load
|
||||
|
||||
@A = global i32 7
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; A store or load cannot alias a global if the accessed amount is larger then
|
||||
; the global.
|
||||
|
||||
; RUN: opt %s -basicaa -gvn -instcombine -S | not grep load
|
||||
; RUN: opt < %s -basicaa -gvn -instcombine -S | not grep load
|
||||
|
||||
@B = global i16 8 ; <i16*> [#uses=2]
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
; A very rudimentary test on AliasAnalysis::getModRefInfo.
|
||||
; RUN: opt %s -print-all-alias-modref-info -aa-eval -disable-output |& \
|
||||
; RUN: opt < %s -print-all-alias-modref-info -aa-eval -disable-output |& \
|
||||
; RUN: not grep NoModRef
|
||||
|
||||
define i32 @callee() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -basicaa -gvn -instcombine -S | grep {ret i1 true}
|
||||
; RUN: opt < %s -basicaa -gvn -instcombine -S | grep {ret i1 true}
|
||||
; PR2436
|
||||
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"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -basicaa -gvn -instcombine -S | grep {ret i32 0}
|
||||
; RUN: opt < %s -basicaa -gvn -instcombine -S | grep {ret i32 0}
|
||||
|
||||
declare i32* @test(i32* nocapture)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; RUN: opt %s -basicaa -gvn -S | grep TestConst | count 2
|
||||
; RUN: opt %s -basicaa -gvn -S | grep TestPure | count 3
|
||||
; RUN: opt %s -basicaa -gvn -S | grep TestNone | count 4
|
||||
; RUN: opt < %s -basicaa -gvn -S | grep TestConst | count 2
|
||||
; RUN: opt < %s -basicaa -gvn -S | grep TestPure | count 3
|
||||
; RUN: opt < %s -basicaa -gvn -S | grep TestNone | count 4
|
||||
@g = global i32 0 ; <i32*> [#uses=1]
|
||||
|
||||
define i32 @test() {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
; disambiguating some obvious cases. If LICM is able to disambiguate the
|
||||
; two pointers, then the load should be hoisted, and the store sunk.
|
||||
|
||||
; RUN: opt %s -basicaa -licm -S | FileCheck %s
|
||||
; RUN: opt < %s -basicaa -licm -S | FileCheck %s
|
||||
|
||||
@A = global i32 7 ; <i32*> [#uses=3]
|
||||
@B = global i32 8 ; <i32*> [#uses=2]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: opt %s -basicaa -gvn -instcombine |\
|
||||
; RUN: opt < %s -basicaa -gvn -instcombine |\
|
||||
; RUN: llvm-dis | grep {ret i32 0}
|
||||
|
||||
declare void @foo(i32*)
|
||||
|
||||
Reference in New Issue
Block a user