Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ModuleID = 'test_out.ll'
- source_filename = "test.c"
- target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
- target triple = "x86_64-apple-macosx10.14.0"
- ; Function Attrs: noinline norecurse nounwind readnone ssp uwtable
- define i32 @f(i32) local_unnamed_addr #0 {
- .preheader:
- %1 = icmp sgt i32 %0, 60
- br i1 %1, label %.lr.ph.preheader, label %._crit_edge
- .lr.ph.preheader: ; preds = %.preheader
- %2 = add i32 %0, -61
- %3 = lshr i32 %2, 1
- %4 = add nuw i32 %3, 1
- %min.iters.check = icmp ult i32 %4, 8
- br i1 %min.iters.check, label %.lr.ph.preheader9, label %vector.ph
- vector.ph: ; preds = %.lr.ph.preheader
- %n.vec = and i32 %4, -8
- %5 = shl i32 %n.vec, 1
- %ind.end = add i32 %5, 60
- %6 = add i32 %n.vec, -8
- %7 = lshr exact i32 %6, 3
- %8 = add nuw nsw i32 %7, 1
- %xtraiter = and i32 %8, 3
- %9 = icmp ult i32 %6, 24
- br i1 %9, label %middle.block.unr-lcssa, label %vector.ph.new
- vector.ph.new: ; preds = %vector.ph
- %unroll_iter = sub nsw i32 %8, %xtraiter
- br label %vector.body
- vector.body: ; preds = %vector.body, %vector.ph.new
- %vec.ind = phi <4 x i32> [ <i32 60, i32 62, i32 64, i32 66>, %vector.ph.new ], [ %vec.ind.next.3, %vector.body ]
- %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph.new ], [ %16, %vector.body ]
- %vec.phi5 = phi <4 x i32> [ zeroinitializer, %vector.ph.new ], [ %17, %vector.body ]
- %niter = phi i32 [ %unroll_iter, %vector.ph.new ], [ %niter.nsub.3, %vector.body ]
- %step.add = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8>
- %10 = add nuw nsw <4 x i32> %vec.ind, %vec.phi
- %11 = add nuw nsw <4 x i32> %step.add, %vec.phi5
- %vec.ind.next = add <4 x i32> %vec.ind, <i32 16, i32 16, i32 16, i32 16>
- %step.add.1 = add <4 x i32> %vec.ind, <i32 24, i32 24, i32 24, i32 24>
- %12 = add nuw nsw <4 x i32> %vec.ind.next, %10
- %13 = add nuw nsw <4 x i32> %step.add.1, %11
- %vec.ind.next.1 = add <4 x i32> %vec.ind, <i32 32, i32 32, i32 32, i32 32>
- %step.add.2 = add <4 x i32> %vec.ind, <i32 40, i32 40, i32 40, i32 40>
- %14 = add nuw nsw <4 x i32> %vec.ind.next.1, %12
- %15 = add nuw nsw <4 x i32> %step.add.2, %13
- %vec.ind.next.2 = add <4 x i32> %vec.ind, <i32 48, i32 48, i32 48, i32 48>
- %step.add.3 = add <4 x i32> %vec.ind, <i32 56, i32 56, i32 56, i32 56>
- %16 = add nuw nsw <4 x i32> %vec.ind.next.2, %14
- %17 = add nuw nsw <4 x i32> %step.add.3, %15
- %vec.ind.next.3 = add <4 x i32> %vec.ind, <i32 64, i32 64, i32 64, i32 64>
- %niter.nsub.3 = add i32 %niter, -4
- %niter.ncmp.3 = icmp eq i32 %niter.nsub.3, 0
- br i1 %niter.ncmp.3, label %middle.block.unr-lcssa, label %vector.body, !llvm.loop !4
- middle.block.unr-lcssa: ; preds = %vector.body, %vector.ph
- %.lcssa11.ph = phi <4 x i32> [ undef, %vector.ph ], [ %16, %vector.body ]
- %.lcssa10.ph = phi <4 x i32> [ undef, %vector.ph ], [ %17, %vector.body ]
- %vec.ind.unr = phi <4 x i32> [ <i32 60, i32 62, i32 64, i32 66>, %vector.ph ], [ %vec.ind.next.3, %vector.body ]
- %vec.phi.unr = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %16, %vector.body ]
- %vec.phi5.unr = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %17, %vector.body ]
- %lcmp.mod = icmp eq i32 %xtraiter, 0
- br i1 %lcmp.mod, label %middle.block, label %vector.body.epil
- vector.body.epil: ; preds = %middle.block.unr-lcssa, %vector.body.epil
- %vec.ind.epil = phi <4 x i32> [ %vec.ind.next.epil, %vector.body.epil ], [ %vec.ind.unr, %middle.block.unr-lcssa ]
- %vec.phi.epil = phi <4 x i32> [ %18, %vector.body.epil ], [ %vec.phi.unr, %middle.block.unr-lcssa ]
- %vec.phi5.epil = phi <4 x i32> [ %19, %vector.body.epil ], [ %vec.phi5.unr, %middle.block.unr-lcssa ]
- %epil.iter = phi i32 [ %epil.iter.sub, %vector.body.epil ], [ %xtraiter, %middle.block.unr-lcssa ]
- %step.add.epil = add <4 x i32> %vec.ind.epil, <i32 8, i32 8, i32 8, i32 8>
- %18 = add nuw nsw <4 x i32> %vec.ind.epil, %vec.phi.epil
- %19 = add nuw nsw <4 x i32> %step.add.epil, %vec.phi5.epil
- %vec.ind.next.epil = add <4 x i32> %vec.ind.epil, <i32 16, i32 16, i32 16, i32 16>
- %epil.iter.sub = add i32 %epil.iter, -1
- %epil.iter.cmp = icmp eq i32 %epil.iter.sub, 0
- br i1 %epil.iter.cmp, label %middle.block, label %vector.body.epil, !llvm.loop !6
- middle.block: ; preds = %vector.body.epil, %middle.block.unr-lcssa
- %.lcssa11 = phi <4 x i32> [ %.lcssa11.ph, %middle.block.unr-lcssa ], [ %18, %vector.body.epil ]
- %.lcssa10 = phi <4 x i32> [ %.lcssa10.ph, %middle.block.unr-lcssa ], [ %19, %vector.body.epil ]
- %bin.rdx = add <4 x i32> %.lcssa10, %.lcssa11
- %rdx.shuf = shufflevector <4 x i32> %bin.rdx, <4 x i32> undef, <4 x i32> <i32 2, i32 3, i32 undef, i32 undef>
- %bin.rdx6 = add <4 x i32> %bin.rdx, %rdx.shuf
- %rdx.shuf7 = shufflevector <4 x i32> %bin.rdx6, <4 x i32> undef, <4 x i32> <i32 1, i32 undef, i32 undef, i32 undef>
- %bin.rdx8 = add <4 x i32> %bin.rdx6, %rdx.shuf7
- %20 = extractelement <4 x i32> %bin.rdx8, i32 0
- %cmp.n = icmp eq i32 %4, %n.vec
- br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader9
- .lr.ph.preheader9: ; preds = %middle.block, %.lr.ph.preheader
- %.0newLoop3.ph = phi i32 [ 60, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
- %.01newLoop2.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %20, %middle.block ]
- br label %.lr.ph
- .lr.ph: ; preds = %.lr.ph.preheader9, %.lr.ph
- %.0newLoop3 = phi i32 [ %22, %.lr.ph ], [ %.0newLoop3.ph, %.lr.ph.preheader9 ]
- %.01newLoop2 = phi i32 [ %21, %.lr.ph ], [ %.01newLoop2.ph, %.lr.ph.preheader9 ]
- %21 = add nuw nsw i32 %.0newLoop3, %.01newLoop2
- %22 = add nuw nsw i32 %.0newLoop3, 2
- %23 = icmp slt i32 %22, %0
- br i1 %23, label %.lr.ph, label %._crit_edge, !llvm.loop !8
- ._crit_edge: ; preds = %.lr.ph, %middle.block, %.preheader
- %.01newLoop.lcssa = phi i32 [ 0, %.preheader ], [ %20, %middle.block ], [ %21, %.lr.ph ]
- ret i32 %.01newLoop.lcssa
- }
- 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" }
- !llvm.module.flags = !{!0, !1, !2}
- !llvm.ident = !{!3}
- !0 = !{i32 2, !"SDK Version", [2 x i32] [i32 10, i32 14]}
- !1 = !{i32 1, !"wchar_size", i32 4}
- !2 = !{i32 7, !"PIC Level", i32 2}
- !3 = !{!"Apple LLVM version 10.0.1 (clang-1001.0.46.4)"}
- !4 = distinct !{!4, !5}
- !5 = !{!"llvm.loop.isvectorized", i32 1}
- !6 = distinct !{!6, !7}
- !7 = !{!"llvm.loop.unroll.disable"}
- !8 = distinct !{!8, !9, !5}
- !9 = !{!"llvm.loop.unroll.runtime.disable"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement