mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
Simplify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48163 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b8f198af1b
commit
3e030e41ae
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -inline -sretpromotion -disable-output
|
||||
; RUN: llvm-as < %s | opt -inline -disable-output
|
||||
%struct.Demand = type { double, double }
|
||||
%struct.branch = type { %struct.Demand, double, double, double, double, %struct.branch*, [12 x %struct.leaf*] }
|
||||
%struct.leaf = type { %struct.Demand, double, double }
|
||||
@ -9,38 +9,45 @@ entry:
|
||||
unreachable
|
||||
}
|
||||
|
||||
define void @Compute_Branch(%struct.Demand* sret %agg.result, %struct.branch* %br, double %theta_R, double %theta_I, double %pi_R, double %pi_I) nounwind {
|
||||
define %struct.Demand @Compute_Branch2(%struct.branch* %br, double %theta_R, double %theta_I, double %pi_R, double %pi_I) nounwind {
|
||||
entry:
|
||||
%a2 = alloca %struct.Demand ; <%struct.Demand*> [#uses=2]
|
||||
%mrv = alloca %struct.Demand ; <%struct.Demand*> [#uses=4]
|
||||
%a2 = alloca %struct.Demand ; <%struct.Demand*> [#uses=0]
|
||||
br i1 false, label %bb46, label %bb
|
||||
|
||||
bb: ; preds = %entry
|
||||
ret void
|
||||
|
||||
%mrv.gep = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
|
||||
%mrv.ld = load double* %mrv.gep ; <double> [#uses=1]
|
||||
%mrv.gep1 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
|
||||
%mrv.ld2 = load double* %mrv.gep1 ; <double> [#uses=1]
|
||||
ret double %mrv.ld, double %mrv.ld2
|
||||
bb46: ; preds = %entry
|
||||
br label %bb72
|
||||
|
||||
bb49: ; preds = %bb72
|
||||
call void @Compute_Leaf( %struct.Demand* sret %a2, %struct.leaf* null, double 0.000000e+00, double 0.000000e+00 ) nounwind
|
||||
%tmp66 = getelementptr %struct.Demand* %a2, i32 0, i32 1 ; <double*> [#uses=0]
|
||||
call %struct.Demand @Compute_Leaf1( %struct.leaf* null, double 0.000000e+00, double 0.000000e+00 ) nounwind ; <%struct.Demand>:0 [#uses=1]
|
||||
%gr = getresult %struct.Demand %0, 1 ; <double> [#uses=0]
|
||||
br label %bb72
|
||||
|
||||
bb72: ; preds = %bb49, %bb46
|
||||
br i1 false, label %bb49, label %bb77
|
||||
|
||||
bb77: ; preds = %bb72
|
||||
ret void
|
||||
%mrv.gep3 = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
|
||||
%mrv.ld4 = load double* %mrv.gep3 ; <double> [#uses=1]
|
||||
%mrv.gep5 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
|
||||
%mrv.ld6 = load double* %mrv.gep5 ; <double> [#uses=1]
|
||||
ret double %mrv.ld4, double %mrv.ld6
|
||||
}
|
||||
|
||||
define void @Compute_Leaf(%struct.Demand* sret %agg.result, %struct.leaf* %l, double %pi_R, double %pi_I) nounwind {
|
||||
define %struct.Demand @Compute_Leaf1(%struct.leaf* %l, double %pi_R, double %pi_I) nounwind {
|
||||
entry:
|
||||
%mrv = alloca %struct.Demand ; <%struct.Demand*> [#uses=2]
|
||||
%tmp10 = load double* @P, align 8 ; <double> [#uses=1]
|
||||
%tmp11 = fcmp olt double %tmp10, 0.000000e+00 ; <i1> [#uses=1]
|
||||
br i1 %tmp11, label %bb, label %bb13
|
||||
|
||||
bb: ; preds = %entry
|
||||
br label %bb13
|
||||
|
||||
bb13: ; preds = %bb, %entry
|
||||
ret void
|
||||
%mrv.gep = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
|
||||
%mrv.ld = load double* %mrv.gep ; <double> [#uses=1]
|
||||
%mrv.gep1 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
|
||||
%mrv.ld2 = load double* %mrv.gep1 ; <double> [#uses=1]
|
||||
ret double %mrv.ld, double %mrv.ld2
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: llvm-as < %s | opt -inline -sretpromotion -disable-output
|
||||
; RUN: llvm-as < %s | opt -inline -disable-output
|
||||
%struct.Demand = type { double, double }
|
||||
%struct.branch = type { %struct.Demand, double, double, double, double, %struct.branch*, [12 x %struct.leaf*] }
|
||||
%struct.leaf = type { %struct.Demand, double, double }
|
||||
@ -9,38 +9,49 @@ entry:
|
||||
unreachable
|
||||
}
|
||||
|
||||
define void @Compute_Branch(%struct.Demand* sret %agg.result, %struct.branch* %br, double %theta_R, double %theta_I, double %pi_R, double %pi_I) nounwind {
|
||||
define %struct.Demand @Compute_Branch2(%struct.branch* %br, double %theta_R, double %theta_I, double %pi_R, double %pi_I) nounwind {
|
||||
entry:
|
||||
%a2 = alloca %struct.Demand ; <%struct.Demand*> [#uses=2]
|
||||
%mrv = alloca %struct.Demand ; <%struct.Demand*> [#uses=4]
|
||||
%a2 = alloca %struct.Demand ; <%struct.Demand*> [#uses=0]
|
||||
br i1 false, label %bb46, label %bb
|
||||
|
||||
bb: ; preds = %entry
|
||||
ret void
|
||||
|
||||
%mrv.gep = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
|
||||
%mrv.ld = load double* %mrv.gep ; <double> [#uses=1]
|
||||
%mrv.gep1 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
|
||||
%mrv.ld2 = load double* %mrv.gep1 ; <double> [#uses=1]
|
||||
ret double %mrv.ld, double %mrv.ld2
|
||||
bb46: ; preds = %entry
|
||||
br label %bb72
|
||||
|
||||
bb49: ; preds = %bb72
|
||||
call void @Compute_Leaf( %struct.Demand* sret %a2, %struct.leaf* null, double 0.000000e+00, double 0.000000e+00 ) nounwind
|
||||
%tmp66 = getelementptr %struct.Demand* %a2, i32 0, i32 1 ; <double*> [#uses=0]
|
||||
call %struct.Demand @Compute_Leaf1( %struct.leaf* null, double 0.000000e+00, double 0.000000e+00 ) nounwind ; <%struct.Demand>:0 [#uses=1]
|
||||
%gr = getresult %struct.Demand %0, 1 ; <double> [#uses=0]
|
||||
br label %bb72
|
||||
|
||||
bb72: ; preds = %bb49, %bb46
|
||||
br i1 false, label %bb49, label %bb77
|
||||
|
||||
bb77: ; preds = %bb72
|
||||
ret void
|
||||
%mrv.gep3 = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
|
||||
%mrv.ld4 = load double* %mrv.gep3 ; <double> [#uses=1]
|
||||
%mrv.gep5 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
|
||||
%mrv.ld6 = load double* %mrv.gep5 ; <double> [#uses=1]
|
||||
ret double %mrv.ld4, double %mrv.ld6
|
||||
}
|
||||
|
||||
define void @Compute_Leaf(%struct.Demand* sret %agg.result, %struct.leaf* %l, double %pi_R, double %pi_I) nounwind {
|
||||
define %struct.Demand @Compute_Leaf1(%struct.leaf* %l, double %pi_R, double %pi_I) nounwind {
|
||||
entry:
|
||||
%mrv = alloca %struct.Demand ; <%struct.Demand*> [#uses=4]
|
||||
%tmp10 = load double* @P, align 8 ; <double> [#uses=1]
|
||||
%tmp11 = fcmp olt double %tmp10, 0.000000e+00 ; <i1> [#uses=1]
|
||||
br i1 %tmp11, label %bb, label %bb13
|
||||
|
||||
bb: ; preds = %entry
|
||||
ret void
|
||||
|
||||
%mrv.gep = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
|
||||
%mrv.ld = load double* %mrv.gep ; <double> [#uses=1]
|
||||
%mrv.gep1 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
|
||||
%mrv.ld2 = load double* %mrv.gep1 ; <double> [#uses=1]
|
||||
ret double %mrv.ld, double %mrv.ld2
|
||||
bb13: ; preds = %entry
|
||||
ret void
|
||||
%mrv.gep3 = getelementptr %struct.Demand* %mrv, i32 0, i32 0 ; <double*> [#uses=1]
|
||||
%mrv.ld4 = load double* %mrv.gep3 ; <double> [#uses=1]
|
||||
%mrv.gep5 = getelementptr %struct.Demand* %mrv, i32 0, i32 1 ; <double*> [#uses=1]
|
||||
%mrv.ld6 = load double* %mrv.gep5 ; <double> [#uses=1]
|
||||
ret double %mrv.ld4, double %mrv.ld6
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user