mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
Bunch of tests to check loop passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40629 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c64a1a921c
commit
fee0a9c7ef
13
test/Analysis/Dominators/2007-07-12-SplitBlock.ll
Normal file
13
test/Analysis/Dominators/2007-07-12-SplitBlock.ll
Normal file
@ -0,0 +1,13 @@
|
||||
; RUN: llvm-as < %s | opt -loop-rotate -licm -loop-unswitch -disable-output
|
||||
|
||||
define i32 @main(i32 %argc, i8** %argv) {
|
||||
entry:
|
||||
br label %bb7
|
||||
|
||||
bb7: ; preds = %bb7, %entry
|
||||
%tmp54 = icmp slt i32 0, 2000000 ; <i1> [#uses=1]
|
||||
br i1 %tmp54, label %bb7, label %bb56
|
||||
|
||||
bb56: ; preds = %bb7
|
||||
ret i32 0
|
||||
}
|
17
test/Transforms/LCSSA/2007-07-12-LICM-2.ll
Normal file
17
test/Transforms/LCSSA/2007-07-12-LICM-2.ll
Normal file
@ -0,0 +1,17 @@
|
||||
; RUN: llvm-as < %s | opt -loop-rotate -licm -loop-unswitch -disable-output
|
||||
define i32 @main(i32 %argc, i8** %argv) {
|
||||
entry:
|
||||
br label %bb7
|
||||
|
||||
bb7: ; preds = %bb7, %entry
|
||||
%tmp39 = load <4 x float>* null ; <<4 x float>> [#uses=1]
|
||||
%tmp40 = add <4 x float> %tmp39, < float 2.000000e+00, float 3.000000e+00, float 1.000000e+00, float 0.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||
%tmp43 = add <4 x float> %tmp40, < float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 2.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||
%tmp46 = add <4 x float> %tmp43, < float 3.000000e+00, float 0.000000e+00, float 2.000000e+00, float 4.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||
%tmp49 = add <4 x float> %tmp46, < float 0.000000e+00, float 4.000000e+00, float 6.000000e+00, float 1.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||
store <4 x float> %tmp49, <4 x float>* null
|
||||
br i1 false, label %bb7, label %bb56
|
||||
|
||||
bb56: ; preds = %bb7
|
||||
ret i32 0
|
||||
}
|
24
test/Transforms/LCSSA/2007-07-12-LICM-3.ll
Normal file
24
test/Transforms/LCSSA/2007-07-12-LICM-3.ll
Normal file
@ -0,0 +1,24 @@
|
||||
; RUN: llvm-as < %s | opt -loop-rotate -licm -loop-unswitch -disable-output
|
||||
|
||||
define i32 @main(i32 %argc, i8** %argv) {
|
||||
entry:
|
||||
br label %bb
|
||||
|
||||
bb: ; preds = %bb56, %entry
|
||||
br label %bb7
|
||||
|
||||
bb7: ; preds = %bb7, %bb
|
||||
%tmp39 = load <4 x float>* null ; <<4 x float>> [#uses=1]
|
||||
%tmp40 = add <4 x float> %tmp39, < float 2.000000e+00, float 3.000000e+00, float 1.000000e+00, float 0.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||
%tmp43 = add <4 x float> %tmp40, < float 1.000000e+00, float 1.000000e+00, float 0.000000e+00, float 2.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||
%tmp46 = add <4 x float> %tmp43, < float 3.000000e+00, float 0.000000e+00, float 2.000000e+00, float 4.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||
%tmp49 = add <4 x float> %tmp46, < float 0.000000e+00, float 4.000000e+00, float 6.000000e+00, float 1.000000e+00 > ; <<4 x float>> [#uses=1]
|
||||
store <4 x float> %tmp49, <4 x float>* null
|
||||
br i1 false, label %bb7, label %bb56
|
||||
|
||||
bb56: ; preds = %bb7
|
||||
br i1 false, label %bb, label %bb64
|
||||
|
||||
bb64: ; preds = %bb56
|
||||
ret i32 0
|
||||
}
|
14
test/Transforms/LCSSA/2007-07-12-LICM.ll
Normal file
14
test/Transforms/LCSSA/2007-07-12-LICM.ll
Normal file
@ -0,0 +1,14 @@
|
||||
; RUN: llvm-as < %s | opt -loop-rotate -licm -loop-unswitch -disable-output
|
||||
define i32 @main(i32 %argc, i8** %argv) {
|
||||
entry:
|
||||
br label %bb7
|
||||
|
||||
bb7: ; preds = %bb7, %entry
|
||||
%tmp39 = load <4 x float>* null ; <<4 x float>> [#uses=1]
|
||||
%tmp40 = add <4 x float> %tmp39, < float 2.000000e+00, float 3.000000e+00, float 1.000000e+00, float 0.000000e+00 > ; <<4 x float>> [#uses=0]
|
||||
store <4 x float> zeroinitializer, <4 x float>* null
|
||||
br i1 false, label %bb7, label %bb56
|
||||
|
||||
bb56: ; preds = %bb7
|
||||
ret i32 0
|
||||
}
|
39
test/Transforms/LICM/2007-07-30-AliasSet.ll
Normal file
39
test/Transforms/LICM/2007-07-30-AliasSet.ll
Normal file
@ -0,0 +1,39 @@
|
||||
; RUN: llvm-as < %s | opt -licm -loop-unswitch -disable-output
|
||||
%struct.III_scalefac_t = type { [22 x i32], [13 x [3 x i32]] }
|
||||
%struct.gr_info = type { i32, i32, i32, i32, i32, i32, i32, i32, [3 x i32], [3 x i32], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32*, [4 x i32] }
|
||||
|
||||
define i32 @scale_bitcount_lsf(%struct.III_scalefac_t* %scalefac, %struct.gr_info* %cod_info) {
|
||||
entry:
|
||||
br i1 false, label %bb28, label %bb133.preheader
|
||||
|
||||
bb133.preheader: ; preds = %entry
|
||||
ret i32 0
|
||||
|
||||
bb28: ; preds = %entry
|
||||
br i1 false, label %bb63.outer, label %bb79
|
||||
|
||||
bb63.outer: ; preds = %bb73, %bb28
|
||||
br i1 false, label %bb35, label %bb73
|
||||
|
||||
bb35: ; preds = %cond_next60, %bb63.outer
|
||||
%window.34 = phi i32 [ %tmp62, %cond_next60 ], [ 0, %bb63.outer ] ; <i32> [#uses=1]
|
||||
%tmp44 = getelementptr [4 x i32]* null, i32 0, i32 0 ; <i32*> [#uses=1]
|
||||
%tmp46 = load i32* %tmp44, align 4 ; <i32> [#uses=0]
|
||||
br i1 false, label %cond_true50, label %cond_next60
|
||||
|
||||
cond_true50: ; preds = %bb35
|
||||
%tmp59 = getelementptr [4 x i32]* null, i32 0, i32 0 ; <i32*> [#uses=1]
|
||||
store i32 0, i32* %tmp59, align 4
|
||||
br label %cond_next60
|
||||
|
||||
cond_next60: ; preds = %cond_true50, %bb35
|
||||
%tmp62 = add i32 %window.34, 1 ; <i32> [#uses=1]
|
||||
br i1 false, label %bb35, label %bb73
|
||||
|
||||
bb73: ; preds = %cond_next60, %bb63.outer
|
||||
%tmp76 = icmp slt i32 0, 0 ; <i1> [#uses=1]
|
||||
br i1 %tmp76, label %bb63.outer, label %bb79
|
||||
|
||||
bb79: ; preds = %bb73, %bb28
|
||||
ret i32 0
|
||||
}
|
25
test/Transforms/LICM/Preserve-LCSSA.ll
Normal file
25
test/Transforms/LICM/Preserve-LCSSA.ll
Normal file
@ -0,0 +1,25 @@
|
||||
; RUN: llvm-as < %s | opt -loop-rotate -licm -loop-unswitch -disable-output
|
||||
|
||||
define i32 @stringSearch_Clib(i32 %count) {
|
||||
entry:
|
||||
br i1 false, label %bb36, label %bb44
|
||||
|
||||
bb4: ; preds = %bb36
|
||||
br i1 false, label %cond_next, label %cond_true
|
||||
|
||||
cond_true: ; preds = %bb4
|
||||
ret i32 0
|
||||
|
||||
cond_next: ; preds = %bb4
|
||||
ret i32 0
|
||||
|
||||
bb36: ; preds = %bb41, %entry
|
||||
br i1 false, label %bb4, label %bb41
|
||||
|
||||
bb41: ; preds = %bb36
|
||||
%ttmp2 = icmp slt i32 0, %count ; <i1> [#uses=1]
|
||||
br i1 %ttmp2, label %bb36, label %bb44
|
||||
|
||||
bb44: ; preds = %bb41, %entry
|
||||
ret i32 0
|
||||
}
|
45
test/Transforms/LoopUnswitch/2007-07-12-ExitDomInfo.ll
Normal file
45
test/Transforms/LoopUnswitch/2007-07-12-ExitDomInfo.ll
Normal file
@ -0,0 +1,45 @@
|
||||
; RUN: llvm-as < %s | opt -loop-unswitch -instcombine -disable-output
|
||||
|
||||
@str3 = external constant [3 x i8] ; <[3 x i8]*> [#uses=1]
|
||||
|
||||
define i32 @stringSearch_Clib(i32 %count) {
|
||||
entry:
|
||||
%ttmp25 = icmp sgt i32 %count, 0 ; <i1> [#uses=1]
|
||||
br i1 %ttmp25, label %bb36.preheader, label %bb44
|
||||
|
||||
bb36.preheader: ; preds = %entry
|
||||
%ttmp33 = icmp slt i32 0, 250 ; <i1> [#uses=1]
|
||||
br label %bb36.outer
|
||||
|
||||
bb36.outer: ; preds = %bb41, %bb36.preheader
|
||||
br i1 %ttmp33, label %bb.nph, label %bb41
|
||||
|
||||
bb.nph: ; preds = %bb36.outer
|
||||
%ttmp8 = icmp eq i8* null, null ; <i1> [#uses=1]
|
||||
%ttmp6 = icmp eq i8* null, null ; <i1> [#uses=1]
|
||||
%tmp31 = call i32 @strcspn( i8* null, i8* getelementptr ([3 x i8]* @str3, i64 0, i64 0) ) ; <i32> [#uses=1]
|
||||
br i1 %ttmp8, label %cond_next, label %cond_true
|
||||
|
||||
cond_true: ; preds = %bb.nph
|
||||
ret i32 0
|
||||
|
||||
cond_next: ; preds = %bb.nph
|
||||
br i1 %ttmp6, label %cond_next28, label %cond_true20
|
||||
|
||||
cond_true20: ; preds = %cond_next
|
||||
ret i32 0
|
||||
|
||||
cond_next28: ; preds = %cond_next
|
||||
%tmp33 = add i32 %tmp31, 0 ; <i32> [#uses=1]
|
||||
br label %bb41
|
||||
|
||||
bb41: ; preds = %cond_next28, %bb36.outer
|
||||
%c.2.lcssa = phi i32 [ 0, %bb36.outer ], [ %tmp33, %cond_next28 ] ; <i32> [#uses=1]
|
||||
br i1 false, label %bb36.outer, label %bb44
|
||||
|
||||
bb44: ; preds = %bb41, %entry
|
||||
%c.01.1 = phi i32 [ 0, %entry ], [ %c.2.lcssa, %bb41 ] ; <i32> [#uses=1]
|
||||
ret i32 %c.01.1
|
||||
}
|
||||
|
||||
declare i32 @strcspn(i8*, i8*)
|
27
test/Transforms/LoopUnswitch/2007-07-13-DomInfo.ll
Normal file
27
test/Transforms/LoopUnswitch/2007-07-13-DomInfo.ll
Normal file
@ -0,0 +1,27 @@
|
||||
; RUN: llvm-as < %s | opt -loop-unswitch -disable-output
|
||||
|
||||
define i32 @main(i32 %argc, i8** %argv) {
|
||||
entry:
|
||||
%tmp1785365 = icmp ult i32 0, 100 ; <i1> [#uses=1]
|
||||
br label %bb
|
||||
|
||||
bb: ; preds = %cond_true, %entry
|
||||
br i1 false, label %cond_true, label %cond_next
|
||||
|
||||
cond_true: ; preds = %bb
|
||||
br i1 %tmp1785365, label %bb, label %bb1788
|
||||
|
||||
cond_next: ; preds = %bb
|
||||
%iftmp.1.0 = select i1 false, i32 0, i32 0 ; <i32> [#uses=1]
|
||||
br i1 false, label %cond_true47, label %cond_next74
|
||||
|
||||
cond_true47: ; preds = %cond_next
|
||||
%tmp53 = urem i32 %iftmp.1.0, 0 ; <i32> [#uses=0]
|
||||
ret i32 0
|
||||
|
||||
cond_next74: ; preds = %cond_next
|
||||
ret i32 0
|
||||
|
||||
bb1788: ; preds = %cond_true
|
||||
ret i32 0
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user