Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- input:
- 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-n8:16:32:64"
- target triple = "x86_64-pc-linux-gnu"
- define float @testcode(float* nocapture %x, float* nocapture %y, float* nocapture %z, i32 %n) nounwind {
- ; <label>:0
- %1 = icmp sgt i32 %n, 0
- br i1 %1, label %bb.nph, label %._crit_edge
- bb.nph: ; preds = %0
- %tmp = zext i32 %n to i64
- br label %2
- ; <label>:2 ; preds = %2, %bb.nph
- %indvar = phi i64 [ 0, %bb.nph ], [ %indvar.next, %2 ]
- %sum.01 = phi float [ 0.000000e+00, %bb.nph ], [ %6, %2 ]
- %scevgep = getelementptr float* %x, i64 %indvar
- %scevgep3 = getelementptr float* %y, i64 %indvar
- %scevgep4 = getelementptr float* %z, i64 %indvar
- %3 = load float* %scevgep
- %4 = load float* %scevgep3
- %5 = fmul float %3, %4
- store float %5, float* %scevgep4
- %6 = fadd float %sum.01, %5
- %indvar.next = add i64 %indvar, 1
- %exitcond = icmp eq i64 %indvar.next, %tmp
- br i1 %exitcond, label %._crit_edge, label %2
- ._crit_edge: ; preds = %2, %0
- %sum.0.lcssa = phi float [ 0.000000e+00, %0 ], [ %6, %2 ]
- ret float %sum.0.lcssa
- }
- dump:
- BB#0: derived from LLVM BB %0
- Live Ins: %R1 %R2 %R3 %R4 %R1 %R2 %R3 %R4
- %R8<def> = MOV %R4
- %R5<def> = MOV %R3
- %R6<def> = MOV %R2
- %R7<def> = MOV %R1
- %R8<def> = MOV %R4<kill>
- %R5<def,dead> = MOV %R3<kill>
- %R6<def,dead> = MOV %R2<kill>
- %R7<def,dead> = MOV %R1<kill>
- %R1<def> = MOV %ALU_LITERAL_X, 1
- %R2<def> = ILT %R8, %R1<kill>
- %R1<def> = MOV %ZERO<kill>
- IF_LOGICALNZ_i32 %R2
- ELSE
- %R2<def> = IL_ASINT_i32 %R8<kill>
- %R1<def> = MOV %ALU_LITERAL_X, 0
- %R2<def> = SHL_i32 %R2<kill>, %R1
- %R2<def> = USHR_i32 %R2<kill>, %R1
- %R8<def> = LCREATE %R2<kill>, %R1<kill>
- %R2<def> = LOADCONST_i64 -1
- %R3<def> = LOADCONST_i64 0
- %R4<def> = MOV %ALU_LITERAL_X, 4
- %R1<def> = MOV %ZERO<kill>
- WHILELOOP
- %R9<def> = PRIVATELOAD_f32 %R6, 0
- %R10<def> = PRIVATELOAD_f32 %R7, 0
- %R9<def> = MUL_IEEE %R10<kill>, %R9<kill>
- PRIVATESTORE_f32 %R9, %R5, 0
- %R10<def> = LHI %R2
- %R11<def> = LHI %R8
- %R10<def> = CUSTOM_ADD_i32 %R11<kill>, %R10<kill>
- %R11<def> = LLO %R2
- %R8<def> = LLO %R8<kill>
- %R8<def> = CUSTOM_ADD_i32 %R8<kill>, %R11
- %R11<def> = ULT %R8, %R11<kill>
- %R11<def> = MOV %R11<kill>[TF=2]
- %R10<def> = CUSTOM_ADD_i32 %R10<kill>, %R11<kill>
- %R8<def> = LCREATE %R8<kill>, %R10<kill>
- %R11<def> = LHI %R8
- %R10<def> = LLO %R8
- %R13<def> = LHI %R3
- %R12<def> = LLO %R3
- %R11<def> = INE %R11<kill>, %R13<kill>
- %R10<def> = INE %R10<kill>, %R12<kill>
- %R10<def> = BINARY_OR_i32 %R11<kill>, %R10<kill>
- %R10<def> = LCREATE %R10<kill>, %R10
- %R7<def> = CUSTOM_ADD_i32 %R7<kill>, %R4
- %R6<def> = CUSTOM_ADD_i32 %R6<kill>, %R4
- %R5<def> = CUSTOM_ADD_i32 %R5<kill>, %R4
- %R1<def> = ADD %R1<kill>, %R9<kill>
- BREAK_LOGICALZ_i64 %R10
- ENDLOOP
- ENDIF
- RETURN %R1<imp-use,kill>
Add Comment
Please, Sign In to add comment