mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-23 22:23:00 +00:00
Change these tests to feed the assembly files to opt directly, instead
of using llvm-as, now that opt supports this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81226 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
; Induction variable pass is doing bad things with pointer induction vars,
|
||||
; trying to do arithmetic on them directly.
|
||||
;
|
||||
; RUN: llvm-as < %s | opt -indvars
|
||||
; RUN: opt %s -indvars
|
||||
;
|
||||
define void @test(i32 %A, i32 %S, i8* %S.upgrd.1) {
|
||||
; <label>:0
|
||||
|
||||
@@ -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: llvm-as < %s | opt -indvars
|
||||
; RUN: opt %s -indvars
|
||||
|
||||
@X = global i32 7 ; <i32*> [#uses=1]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep indvar
|
||||
; RUN: opt %s -indvars | llvm-dis | grep indvar
|
||||
|
||||
define i32 @test() {
|
||||
; <label>:0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; The induction variable canonicalization pass shouldn't leave dead
|
||||
; instructions laying around!
|
||||
;
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | \
|
||||
; RUN: opt %s -indvars | llvm-dis | \
|
||||
; RUN: not grep {#uses=0}
|
||||
|
||||
define i32 @mul(i32 %x, i32 %y) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -disable-output
|
||||
; RUN: opt %s -indvars -disable-output
|
||||
|
||||
define void @test() {
|
||||
entry:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -disable-output
|
||||
; RUN: opt %s -indvars -disable-output
|
||||
define void @_ZN17CoinFactorization7cleanupEv() {
|
||||
entry:
|
||||
br i1 false, label %loopexit.14, label %cond_continue.3
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep indvar | not grep i32
|
||||
; RUN: opt %s -indvars | llvm-dis | grep indvar | not grep i32
|
||||
|
||||
@G = global i64 0 ; <i64*> [#uses=1]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -disable-output
|
||||
; RUN: opt %s -indvars -disable-output
|
||||
|
||||
define void @test() {
|
||||
br label %endif.0.i
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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"* }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -disable-output
|
||||
; RUN: opt %s -indvars -disable-output
|
||||
|
||||
define void @.outPlank_21() {
|
||||
entry:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -disable-output
|
||||
; RUN: opt %s -indvars -disable-output
|
||||
|
||||
define void @_ZN5ArrayISt7complexIdEEC2ERK10dim_vector() {
|
||||
entry:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -disable-output
|
||||
; RUN: opt %s -indvars -disable-output
|
||||
|
||||
declare void @q_atomic_increment()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | \
|
||||
; RUN: opt %s -indvars | llvm-dis | \
|
||||
; RUN: grep {ret i32 152}
|
||||
|
||||
define i32 @main() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -disable-output
|
||||
; RUN: opt %s -indvars -disable-output
|
||||
|
||||
define void @main() {
|
||||
entry:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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]
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
; PR726
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | \
|
||||
; RUN: opt %s -indvars | llvm-dis | \
|
||||
; RUN: grep {ret i32 27}
|
||||
|
||||
; Make sure to compute the right exit value based on negative strides.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -disable-output
|
||||
; RUN: opt %s -indvars -disable-output
|
||||
|
||||
define void @get_block() {
|
||||
endif.0:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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]] }
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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* }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
; PR1015
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | not grep {ret i32 0}
|
||||
; RUN: opt %s -indvars | llvm-dis | not grep {ret i32 0}
|
||||
|
||||
target datalayout = "e-p:32:32"
|
||||
target triple = "i686-apple-darwin8"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
; RUN: llvm-as < %s | llc -march=x86-64 | grep {(%rdi,%rax,8)}
|
||||
; RUN: llvm-as < %s | llc -march=x86-64 | not grep {addq.*8}
|
||||
; RUN: llc %s -o - -march=x86-64 | grep {(%rdi,%rax,8)}
|
||||
; RUN: llc %s -o - -march=x86-64 | not grep {addq.*8}
|
||||
|
||||
define void @foo(double* %y) nounwind {
|
||||
entry:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -disable-output
|
||||
; RUN: opt %s -indvars -disable-output
|
||||
; PR1487
|
||||
|
||||
%struct.AVClass = type { i8*, i8* (i8*)*, %struct.AVOption* }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -disable-output
|
||||
; RUN: opt %s -indvars -disable-output
|
||||
; PR2434
|
||||
|
||||
define fastcc void @regcppop() nounwind {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep sext | count 1
|
||||
; RUN: opt %s -indvars | llvm-dis | grep sext | count 1
|
||||
; ModuleID = '<stdin>'
|
||||
|
||||
%struct.App1Marker = type <{ i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars
|
||||
; RUN: opt %s -indvars
|
||||
; PR2857
|
||||
|
||||
@foo = external global i32 ; <i32*> [#uses=1]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep icmp | count 4
|
||||
; RUN: opt %s -indvars | llvm-dis | grep icmp | count 4
|
||||
define void @bar() nounwind {
|
||||
entry:
|
||||
br label %bb
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep icmp | count 2
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep sitofp | count 1
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep uitofp | count 1
|
||||
; RUN: opt %s -indvars | llvm-dis | grep icmp | count 2
|
||||
; RUN: opt %s -indvars | llvm-dis | grep sitofp | count 1
|
||||
; RUN: opt %s -indvars | llvm-dis | grep uitofp | count 1
|
||||
|
||||
define void @bar() nounwind {
|
||||
entry:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars
|
||||
; RUN: opt %s -indvars
|
||||
|
||||
define void @t() nounwind {
|
||||
entry:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | not grep {sext}
|
||||
; RUN: opt %s -indvars | llvm-dis | 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"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -instcombine | llvm-dis | not grep {\[sz\]ext}
|
||||
; RUN: opt %s -indvars -instcombine | llvm-dis | not grep {\[sz\]ext}
|
||||
; ModuleID = '<stdin>'
|
||||
;extern int *a, *b, *c, *d, *e, *f; /* 64 bit */
|
||||
;extern int K[256];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars
|
||||
; RUN: opt %s -indvars
|
||||
; rdar://6817574
|
||||
|
||||
define i32 @t1() nounwind ssp {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep icmp | grep next
|
||||
; RUN: opt %s -indvars | llvm-dis | grep icmp | grep next
|
||||
; PR4086
|
||||
declare void @foo()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t
|
||||
; RUN: opt %s -indvars | llvm-dis > %t
|
||||
; RUN: grep phi %t | count 4
|
||||
; RUN: grep {= phi i32} %t | count 4
|
||||
; RUN: not grep {sext i} %t
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t
|
||||
; RUN: opt %s -indvars | llvm-dis > %t
|
||||
; RUN: grep getelementptr %t | count 1
|
||||
; RUN: grep {mul .*, 37} %t | count 1
|
||||
; RUN: grep {add .*, 5203} %t | count 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t
|
||||
; RUN: opt %s -indvars | llvm-dis > %t
|
||||
; RUN: grep sext %t | count 1
|
||||
|
||||
; Indvars should be able to eliminate all of the sign extensions
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars
|
||||
; RUN: opt %s -indvars
|
||||
; PR4052
|
||||
; PR4054
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -disable-output
|
||||
; RUN: opt %s -indvars -disable-output
|
||||
; PR4009
|
||||
; PR4038
|
||||
|
||||
|
||||
@@ -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: llvm-as < %s | opt -indvars | llvm-dis | grep phi | count 1
|
||||
; RUN: opt %s -indvars | llvm-dis | grep phi | count 1
|
||||
|
||||
define void @foo() {
|
||||
entry:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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"
|
||||
|
||||
@@ -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: llvm-as < %s | opt -indvars -loop-deletion -simplifycfg | \
|
||||
; RUN: opt %s -indvars -loop-deletion -simplifycfg | \
|
||||
; RUN: llvm-dis | not grep br
|
||||
|
||||
define i32 @polynomial_constant() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t
|
||||
; RUN: opt %s -indvars | llvm-dis > %t
|
||||
; RUN: grep add %t | count 8
|
||||
; RUN: grep mul %t | count 7
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t
|
||||
; RUN: opt %s -indvars | llvm-dis > %t
|
||||
; RUN: grep {= sext} %t | count 4
|
||||
; RUN: grep {phi i64} %t | count 2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t
|
||||
; RUN: opt %s -indvars | llvm-dis > %t
|
||||
; RUN: not grep and %t
|
||||
; RUN: not grep zext %t
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep add | count 1
|
||||
; RUN: opt %s -indvars | llvm-dis | 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
|
||||
|
||||
@@ -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: llvm-as < %s | opt -indvars -dce | llvm-dis | not grep mul
|
||||
; RUN: opt %s -indvars -dce | llvm-dis | not grep mul
|
||||
|
||||
@A = external global i32 ; <i32*> [#uses=1]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis \
|
||||
; RUN: opt %s -indvars | llvm-dis \
|
||||
; RUN: | grep {%b.1 = phi i32 \\\[ 2, %bb \\\], \\\[ 1, %bb2 \\\]}
|
||||
|
||||
; This loop has multiple exits, and the value of %b1 depends on which
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | not grep select
|
||||
; RUN: opt %s -indvars | llvm-dis | not grep select
|
||||
|
||||
; This loop has backedge-taken-count zero. Indvars shouldn't expand any
|
||||
; instructions to compute a trip count.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t
|
||||
; RUN: opt %s -indvars | llvm-dis > %t
|
||||
; RUN: grep {\[%\]tmp7 = icmp eq i8 -28, -28} %t
|
||||
; RUN: grep {\[%\]tmp8 = icmp eq i8 63, 63} %t
|
||||
; PR4477
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -loop-deletion -simplifycfg | llvm-dis | not grep br
|
||||
; RUN: opt %s -indvars -loop-deletion -simplifycfg | llvm-dis | not grep br
|
||||
;
|
||||
; Testcase distilled from 256.bzip2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -loop-deletion -simplifycfg | opt \
|
||||
; RUN: opt %s -indvars -loop-deletion -simplifycfg | opt \
|
||||
; RUN: -analyze -loops | not grep "^Loop Containing"
|
||||
; PR1179
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep {ret i32 600000}
|
||||
; RUN: opt %s -indvars | llvm-dis | grep {ret i32 600000}
|
||||
; PR1179
|
||||
|
||||
define i32 @foo() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep {ret i32 9900}
|
||||
; RUN: opt %s -indvars | llvm-dis | grep {ret i32 9900}
|
||||
; PR1179
|
||||
|
||||
define i32 @test4() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep {120, %bb2.bb3_crit_edge}
|
||||
; RUN: opt %s -indvars | llvm-dis | 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"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -loop-deletion | llvm-dis | grep phi | count 1
|
||||
; RUN: opt %s -indvars -loop-deletion | llvm-dis | grep phi | count 1
|
||||
; XFAIL: *
|
||||
|
||||
; Indvars can't evaluate this loop, because ScalarEvolution can't compute
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t
|
||||
; RUN: opt %s -indvars | llvm-dis > %t
|
||||
; RUN: not grep trunc %t
|
||||
; RUN: grep and %t | count 1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t
|
||||
; RUN: opt %s -indvars | llvm-dis > %t
|
||||
; RUN: grep {icmp ugt i8\\\*} %t | count 1
|
||||
; RUN: grep {icmp sgt i8\\\*} %t | count 1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep indvar
|
||||
; RUN: opt %s -indvars | llvm-dis | grep indvar
|
||||
@G = global i32* null ; <i32**> [#uses=1]
|
||||
@Array = external global [40 x i32] ; <[40 x i32]*> [#uses=1]
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t
|
||||
; RUN: opt %s -indvars | llvm-dis > %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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t
|
||||
; RUN: opt %s -indvars | llvm-dis > %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*.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis \
|
||||
; RUN: opt %s -indvars | llvm-dis \
|
||||
; 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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t
|
||||
; RUN: opt %s -indvars | llvm-dis > %t
|
||||
; RUN: not grep ptrtoint %t
|
||||
; RUN: not grep inttoptr %t
|
||||
; RUN: grep getelementptr %t | count 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t
|
||||
; RUN: opt %s -indvars | llvm-dis > %t
|
||||
; RUN: grep sext %t | count 1
|
||||
; RUN: grep phi %t | count 1
|
||||
; RUN: grep {phi i64} %t
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t
|
||||
; RUN: opt %s -indvars | llvm-dis > %t
|
||||
; RUN: not grep sext %t
|
||||
|
||||
define i64 @test(i64* nocapture %first, i32 %count) nounwind readonly {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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 {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis > %t
|
||||
; RUN: opt %s -indvars | llvm-dis > %t
|
||||
; RUN: not grep sext %t
|
||||
; RUN: grep phi %t | count 1
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | FileCheck %s
|
||||
; RUN: opt %s -indvars | llvm-dis | FileCheck %s
|
||||
; PR4775
|
||||
|
||||
; Indvars shouldn't sink the alloca out of the entry block, even though
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | FileCheck %s --check-prefix=CHECK
|
||||
; RUN: opt %s -indvars | llvm-dis | FileCheck %s --check-prefix=CHECK
|
||||
|
||||
declare i1 @b()
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars | llvm-dis | grep indvar
|
||||
; RUN: opt %s -indvars | llvm-dis | grep indvar
|
||||
|
||||
@G = global i64 0 ; <i64*> [#uses=1]
|
||||
|
||||
|
||||
@@ -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: llvm-as < %s | opt -indvars -loop-deletion -simplifycfg | llvm-dis | not grep br
|
||||
; RUN: opt %s -indvars -loop-deletion -simplifycfg | llvm-dis | not grep br
|
||||
|
||||
define i32 @linear_setne() {
|
||||
entry:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; These tests have an infinite trip count. We obviously shouldn't remove the
|
||||
; loops! :)
|
||||
;
|
||||
; RUN: llvm-as < %s | opt -indvars -adce -simplifycfg | llvm-dis | grep icmp | wc -l > %t2
|
||||
; RUN: opt %s -indvars -adce -simplifycfg | llvm-dis | grep icmp | wc -l > %t2
|
||||
; RUN: llvm-as < %s | llvm-dis | grep icmp | wc -l > %t1
|
||||
; RUN: diff %t1 %t2
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -indvars -instcombine | llvm-dis | \
|
||||
; RUN: opt %s -indvars -instcombine | llvm-dis | \
|
||||
; 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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -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"
|
||||
|
||||
Reference in New Issue
Block a user