Guest User

Untitled

a guest
Jun 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. input:
  2. 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"
  3. target triple = "x86_64-pc-linux-gnu"
  4.  
  5. define float @testcode(float* nocapture %x, float* nocapture %y, float* nocapture %z, i32 %n) nounwind {
  6. ; <label>:0
  7. %1 = icmp sgt i32 %n, 0
  8. br i1 %1, label %bb.nph, label %._crit_edge
  9.  
  10. bb.nph: ; preds = %0
  11. %tmp = zext i32 %n to i64
  12. br label %2
  13.  
  14. ; <label>:2 ; preds = %2, %bb.nph
  15. %indvar = phi i64 [ 0, %bb.nph ], [ %indvar.next, %2 ]
  16. %sum.01 = phi float [ 0.000000e+00, %bb.nph ], [ %6, %2 ]
  17. %scevgep = getelementptr float* %x, i64 %indvar
  18. %scevgep3 = getelementptr float* %y, i64 %indvar
  19. %scevgep4 = getelementptr float* %z, i64 %indvar
  20. %3 = load float* %scevgep
  21. %4 = load float* %scevgep3
  22. %5 = fmul float %3, %4
  23. store float %5, float* %scevgep4
  24. %6 = fadd float %sum.01, %5
  25. %indvar.next = add i64 %indvar, 1
  26. %exitcond = icmp eq i64 %indvar.next, %tmp
  27. br i1 %exitcond, label %._crit_edge, label %2
  28.  
  29. ._crit_edge: ; preds = %2, %0
  30. %sum.0.lcssa = phi float [ 0.000000e+00, %0 ], [ %6, %2 ]
  31. ret float %sum.0.lcssa
  32. }
  33.  
  34. dump:
  35. BB#0: derived from LLVM BB %0
  36. Live Ins: %R1 %R2 %R3 %R4 %R1 %R2 %R3 %R4
  37. %R8<def> = MOV %R4
  38. %R5<def> = MOV %R3
  39. %R6<def> = MOV %R2
  40. %R7<def> = MOV %R1
  41. %R8<def> = MOV %R4<kill>
  42. %R5<def,dead> = MOV %R3<kill>
  43. %R6<def,dead> = MOV %R2<kill>
  44. %R7<def,dead> = MOV %R1<kill>
  45. %R1<def> = MOV %ALU_LITERAL_X, 1
  46. %R2<def> = ILT %R8, %R1<kill>
  47. %R1<def> = MOV %ZERO<kill>
  48. IF_LOGICALNZ_i32 %R2
  49. ELSE
  50. %R2<def> = IL_ASINT_i32 %R8<kill>
  51. %R1<def> = MOV %ALU_LITERAL_X, 0
  52. %R2<def> = SHL_i32 %R2<kill>, %R1
  53. %R2<def> = USHR_i32 %R2<kill>, %R1
  54. %R8<def> = LCREATE %R2<kill>, %R1<kill>
  55. %R2<def> = LOADCONST_i64 -1
  56. %R3<def> = LOADCONST_i64 0
  57. %R4<def> = MOV %ALU_LITERAL_X, 4
  58. %R1<def> = MOV %ZERO<kill>
  59. WHILELOOP
  60. %R9<def> = PRIVATELOAD_f32 %R6, 0
  61. %R10<def> = PRIVATELOAD_f32 %R7, 0
  62. %R9<def> = MUL_IEEE %R10<kill>, %R9<kill>
  63. PRIVATESTORE_f32 %R9, %R5, 0
  64. %R10<def> = LHI %R2
  65. %R11<def> = LHI %R8
  66. %R10<def> = CUSTOM_ADD_i32 %R11<kill>, %R10<kill>
  67. %R11<def> = LLO %R2
  68. %R8<def> = LLO %R8<kill>
  69. %R8<def> = CUSTOM_ADD_i32 %R8<kill>, %R11
  70. %R11<def> = ULT %R8, %R11<kill>
  71. %R11<def> = MOV %R11<kill>[TF=2]
  72. %R10<def> = CUSTOM_ADD_i32 %R10<kill>, %R11<kill>
  73. %R8<def> = LCREATE %R8<kill>, %R10<kill>
  74. %R11<def> = LHI %R8
  75. %R10<def> = LLO %R8
  76. %R13<def> = LHI %R3
  77. %R12<def> = LLO %R3
  78. %R11<def> = INE %R11<kill>, %R13<kill>
  79. %R10<def> = INE %R10<kill>, %R12<kill>
  80. %R10<def> = BINARY_OR_i32 %R11<kill>, %R10<kill>
  81. %R10<def> = LCREATE %R10<kill>, %R10
  82. %R7<def> = CUSTOM_ADD_i32 %R7<kill>, %R4
  83. %R6<def> = CUSTOM_ADD_i32 %R6<kill>, %R4
  84. %R5<def> = CUSTOM_ADD_i32 %R5<kill>, %R4
  85. %R1<def> = ADD %R1<kill>, %R9<kill>
  86. BREAK_LOGICALZ_i64 %R10
  87. ENDLOOP
  88. ENDIF
  89. RETURN %R1<imp-use,kill>
Add Comment
Please, Sign In to add comment