Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.93 KB | None | 0 0
  1. ; ModuleID = 'test_out.ll'
  2. source_filename = "test.c"
  3. target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
  4. target triple = "x86_64-apple-macosx10.14.0"
  5.  
  6. ; Function Attrs: noinline norecurse nounwind readnone ssp uwtable
  7. define i32 @f(i32) local_unnamed_addr #0 {
  8. .preheader:
  9. %1 = icmp sgt i32 %0, 60
  10. br i1 %1, label %.lr.ph.preheader, label %._crit_edge
  11.  
  12. .lr.ph.preheader: ; preds = %.preheader
  13. %2 = add i32 %0, -61
  14. %3 = lshr i32 %2, 1
  15. %4 = add nuw i32 %3, 1
  16. %min.iters.check = icmp ult i32 %4, 8
  17. br i1 %min.iters.check, label %.lr.ph.preheader9, label %vector.ph
  18.  
  19. vector.ph: ; preds = %.lr.ph.preheader
  20. %n.vec = and i32 %4, -8
  21. %5 = shl i32 %n.vec, 1
  22. %ind.end = add i32 %5, 60
  23. %6 = add i32 %n.vec, -8
  24. %7 = lshr exact i32 %6, 3
  25. %8 = add nuw nsw i32 %7, 1
  26. %xtraiter = and i32 %8, 3
  27. %9 = icmp ult i32 %6, 24
  28. br i1 %9, label %middle.block.unr-lcssa, label %vector.ph.new
  29.  
  30. vector.ph.new: ; preds = %vector.ph
  31. %unroll_iter = sub nsw i32 %8, %xtraiter
  32. br label %vector.body
  33.  
  34. vector.body: ; preds = %vector.body, %vector.ph.new
  35. %vec.ind = phi <4 x i32> [ <i32 60, i32 62, i32 64, i32 66>, %vector.ph.new ], [ %vec.ind.next.3, %vector.body ]
  36. %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph.new ], [ %16, %vector.body ]
  37. %vec.phi5 = phi <4 x i32> [ zeroinitializer, %vector.ph.new ], [ %17, %vector.body ]
  38. %niter = phi i32 [ %unroll_iter, %vector.ph.new ], [ %niter.nsub.3, %vector.body ]
  39. %step.add = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
  40. %10 = add nuw nsw <4 x i32> %vec.ind, %vec.phi
  41. %11 = add nuw nsw <4 x i32> %step.add, %vec.phi5
  42. %vec.ind.next = add <4 x i32> %vec.ind, <i32 16, i32 16, i32 16, i32 16>
  43. %step.add.1 = add <4 x i32> %vec.ind, <i32 24, i32 24, i32 24, i32 24>
  44. %12 = add nuw nsw <4 x i32> %vec.ind.next, %10
  45. %13 = add nuw nsw <4 x i32> %step.add.1, %11
  46. %vec.ind.next.1 = add <4 x i32> %vec.ind, <i32 32, i32 32, i32 32, i32 32>
  47. %step.add.2 = add <4 x i32> %vec.ind, <i32 40, i32 40, i32 40, i32 40>
  48. %14 = add nuw nsw <4 x i32> %vec.ind.next.1, %12
  49. %15 = add nuw nsw <4 x i32> %step.add.2, %13
  50. %vec.ind.next.2 = add <4 x i32> %vec.ind, <i32 48, i32 48, i32 48, i32 48>
  51. %step.add.3 = add <4 x i32> %vec.ind, <i32 56, i32 56, i32 56, i32 56>
  52. %16 = add nuw nsw <4 x i32> %vec.ind.next.2, %14
  53. %17 = add nuw nsw <4 x i32> %step.add.3, %15
  54. %vec.ind.next.3 = add <4 x i32> %vec.ind, <i32 64, i32 64, i32 64, i32 64>
  55. %niter.nsub.3 = add i32 %niter, -4
  56. %niter.ncmp.3 = icmp eq i32 %niter.nsub.3, 0
  57. br i1 %niter.ncmp.3, label %middle.block.unr-lcssa, label %vector.body, !llvm.loop !4
  58.  
  59. middle.block.unr-lcssa: ; preds = %vector.body, %vector.ph
  60. %.lcssa11.ph = phi <4 x i32> [ undef, %vector.ph ], [ %16, %vector.body ]
  61. %.lcssa10.ph = phi <4 x i32> [ undef, %vector.ph ], [ %17, %vector.body ]
  62. %vec.ind.unr = phi <4 x i32> [ <i32 60, i32 62, i32 64, i32 66>, %vector.ph ], [ %vec.ind.next.3, %vector.body ]
  63. %vec.phi.unr = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %16, %vector.body ]
  64. %vec.phi5.unr = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %17, %vector.body ]
  65. %lcmp.mod = icmp eq i32 %xtraiter, 0
  66. br i1 %lcmp.mod, label %middle.block, label %vector.body.epil
  67.  
  68. vector.body.epil: ; preds = %middle.block.unr-lcssa, %vector.body.epil
  69. %vec.ind.epil = phi <4 x i32> [ %vec.ind.next.epil, %vector.body.epil ], [ %vec.ind.unr, %middle.block.unr-lcssa ]
  70. %vec.phi.epil = phi <4 x i32> [ %18, %vector.body.epil ], [ %vec.phi.unr, %middle.block.unr-lcssa ]
  71. %vec.phi5.epil = phi <4 x i32> [ %19, %vector.body.epil ], [ %vec.phi5.unr, %middle.block.unr-lcssa ]
  72. %epil.iter = phi i32 [ %epil.iter.sub, %vector.body.epil ], [ %xtraiter, %middle.block.unr-lcssa ]
  73. %step.add.epil = add <4 x i32> %vec.ind.epil, <i32 8, i32 8, i32 8, i32 8>
  74. %18 = add nuw nsw <4 x i32> %vec.ind.epil, %vec.phi.epil
  75. %19 = add nuw nsw <4 x i32> %step.add.epil, %vec.phi5.epil
  76. %vec.ind.next.epil = add <4 x i32> %vec.ind.epil, <i32 16, i32 16, i32 16, i32 16>
  77. %epil.iter.sub = add i32 %epil.iter, -1
  78. %epil.iter.cmp = icmp eq i32 %epil.iter.sub, 0
  79. br i1 %epil.iter.cmp, label %middle.block, label %vector.body.epil, !llvm.loop !6
  80.  
  81. middle.block: ; preds = %vector.body.epil, %middle.block.unr-lcssa
  82. %.lcssa11 = phi <4 x i32> [ %.lcssa11.ph, %middle.block.unr-lcssa ], [ %18, %vector.body.epil ]
  83. %.lcssa10 = phi <4 x i32> [ %.lcssa10.ph, %middle.block.unr-lcssa ], [ %19, %vector.body.epil ]
  84. %bin.rdx = add <4 x i32> %.lcssa10, %.lcssa11
  85. %rdx.shuf = shufflevector <4 x i32> %bin.rdx, <4 x i32> undef, <4 x i32> <i32 2, i32 3, i32 undef, i32 undef>
  86. %bin.rdx6 = add <4 x i32> %bin.rdx, %rdx.shuf
  87. %rdx.shuf7 = shufflevector <4 x i32> %bin.rdx6, <4 x i32> undef, <4 x i32> <i32 1, i32 undef, i32 undef, i32 undef>
  88. %bin.rdx8 = add <4 x i32> %bin.rdx6, %rdx.shuf7
  89. %20 = extractelement <4 x i32> %bin.rdx8, i32 0
  90. %cmp.n = icmp eq i32 %4, %n.vec
  91. br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader9
  92.  
  93. .lr.ph.preheader9: ; preds = %middle.block, %.lr.ph.preheader
  94. %.0newLoop3.ph = phi i32 [ 60, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  95. %.01newLoop2.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %20, %middle.block ]
  96. br label %.lr.ph
  97.  
  98. .lr.ph: ; preds = %.lr.ph.preheader9, %.lr.ph
  99. %.0newLoop3 = phi i32 [ %22, %.lr.ph ], [ %.0newLoop3.ph, %.lr.ph.preheader9 ]
  100. %.01newLoop2 = phi i32 [ %21, %.lr.ph ], [ %.01newLoop2.ph, %.lr.ph.preheader9 ]
  101. %21 = add nuw nsw i32 %.0newLoop3, %.01newLoop2
  102. %22 = add nuw nsw i32 %.0newLoop3, 2
  103. %23 = icmp slt i32 %22, %0
  104. br i1 %23, label %.lr.ph, label %._crit_edge, !llvm.loop !8
  105.  
  106. ._crit_edge: ; preds = %.lr.ph, %middle.block, %.preheader
  107. %.01newLoop.lcssa = phi i32 [ 0, %.preheader ], [ %20, %middle.block ], [ %21, %.lr.ph ]
  108. ret i32 %.01newLoop.lcssa
  109. }
  110.  
  111. attributes #0 = { noinline norecurse nounwind readnone ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sahf,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
  112.  
  113. !llvm.module.flags = !{!0, !1, !2}
  114. !llvm.ident = !{!3}
  115.  
  116. !0 = !{i32 2, !"SDK Version", [2 x i32] [i32 10, i32 14]}
  117. !1 = !{i32 1, !"wchar_size", i32 4}
  118. !2 = !{i32 7, !"PIC Level", i32 2}
  119. !3 = !{!"Apple LLVM version 10.0.1 (clang-1001.0.46.4)"}
  120. !4 = distinct !{!4, !5}
  121. !5 = !{!"llvm.loop.isvectorized", i32 1}
  122. !6 = distinct !{!6, !7}
  123. !7 = !{!"llvm.loop.unroll.disable"}
  124. !8 = distinct !{!8, !9, !5}
  125. !9 = !{!"llvm.loop.unroll.runtime.disable"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement