Advertisement
Guest User

Untitled

a guest
May 18th, 2020
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
LLVM 9.47 KB | None | 0 0
  1. ; ModuleID = 'aec_vec.c'
  2. source_filename = "aec_vec.c"
  3. target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
  4. target triple = "x86_64-unknown-linux-gnu"
  5.  
  6. ; Function Attrs: nofree norecurse nounwind uwtable
  7. define dso_local void @vec(i64 %n, i8* nocapture %out, i8* nocapture readonly %in) local_unnamed_addr #0 {
  8. entry:
  9.   %cmp6 = icmp eq i64 %n, 0
  10.   br i1 %cmp6, label %for.cond.cleanup, label %for.body.preheader
  11.  
  12. for.body.preheader:                               ; preds = %entry
  13.   %min.iters.check = icmp ult i64 %n, 128
  14.   br i1 %min.iters.check, label %for.body.preheader12, label %vector.memcheck
  15.  
  16. for.body.preheader12:                             ; preds = %middle.block, %vector.memcheck, %for.body.preheader
  17.   %i.07.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %for.body.preheader ], [ %n.vec, %middle.block ]
  18.   %0 = xor i64 %i.07.ph, -1
  19.   %xtraiter = and i64 %n, 1
  20.   %lcmp.mod = icmp eq i64 %xtraiter, 0
  21.   br i1 %lcmp.mod, label %for.body.prol.loopexit, label %for.body.prol
  22.  
  23. for.body.prol:                                    ; preds = %for.body.preheader12
  24.   %arrayidx.prol = getelementptr inbounds i8, i8* %in, i64 %i.07.ph
  25.   %1 = load i8, i8* %arrayidx.prol, align 1, !tbaa !2
  26.   %.neg.i.prol = ashr i8 %1, 7
  27.   %shl.i.prol = shl i8 %1, 1
  28.   %2 = and i8 %.neg.i.prol, -90
  29.   %xor10.i.prol = xor i8 %2, %shl.i.prol
  30.   %arrayidx1.prol = getelementptr inbounds i8, i8* %out, i64 %i.07.ph
  31.   store i8 %xor10.i.prol, i8* %arrayidx1.prol, align 1, !tbaa !2
  32.   %inc.prol = or i64 %i.07.ph, 1
  33.   br label %for.body.prol.loopexit
  34.  
  35. for.body.prol.loopexit:                           ; preds = %for.body.preheader12, %for.body.prol
  36.   %i.07.unr = phi i64 [ %i.07.ph, %for.body.preheader12 ], [ %inc.prol, %for.body.prol ]
  37.   %3 = sub i64 0, %n
  38.   %4 = icmp eq i64 %0, %3
  39.   br i1 %4, label %for.cond.cleanup, label %for.body
  40.  
  41. vector.memcheck:                                  ; preds = %for.body.preheader
  42.   %scevgep = getelementptr i8, i8* %out, i64 %n
  43.   %scevgep8 = getelementptr i8, i8* %in, i64 %n
  44.   %bound0 = icmp ugt i8* %scevgep8, %out
  45.   %bound1 = icmp ugt i8* %scevgep, %in
  46.   %found.conflict = and i1 %bound0, %bound1
  47.   br i1 %found.conflict, label %for.body.preheader12, label %vector.ph
  48.  
  49. vector.ph:                                        ; preds = %vector.memcheck
  50.   %n.vec = and i64 %n, -128
  51.   br label %vector.body
  52.  
  53. vector.body:                                      ; preds = %vector.body, %vector.ph
  54.   %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  55.   %5 = getelementptr inbounds i8, i8* %in, i64 %index
  56.   %6 = bitcast i8* %5 to <32 x i8>*
  57.   %wide.load = load <32 x i8>, <32 x i8>* %6, align 1, !tbaa !2, !alias.scope !5
  58.   %7 = getelementptr inbounds i8, i8* %5, i64 32
  59.   %8 = bitcast i8* %7 to <32 x i8>*
  60.   %wide.load9 = load <32 x i8>, <32 x i8>* %8, align 1, !tbaa !2, !alias.scope !5
  61.   %9 = getelementptr inbounds i8, i8* %5, i64 64
  62.   %10 = bitcast i8* %9 to <32 x i8>*
  63.   %wide.load10 = load <32 x i8>, <32 x i8>* %10, align 1, !tbaa !2, !alias.scope !5
  64.   %11 = getelementptr inbounds i8, i8* %5, i64 96
  65.   %12 = bitcast i8* %11 to <32 x i8>*
  66.   %wide.load11 = load <32 x i8>, <32 x i8>* %12, align 1, !tbaa !2, !alias.scope !5
  67.   %13 = ashr <32 x i8> %wide.load, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
  68.   %14 = ashr <32 x i8> %wide.load9, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
  69.   %15 = ashr <32 x i8> %wide.load10, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
  70.   %16 = ashr <32 x i8> %wide.load11, <i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7, i8 7>
  71.   %17 = shl <32 x i8> %wide.load, <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
  72.   %18 = shl <32 x i8> %wide.load9, <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
  73.   %19 = shl <32 x i8> %wide.load10, <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
  74.   %20 = shl <32 x i8> %wide.load11, <i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1, i8 1>
  75.   %21 = and <32 x i8> %13, <i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90>
  76.   %22 = and <32 x i8> %14, <i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90>
  77.   %23 = and <32 x i8> %15, <i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90>
  78.   %24 = and <32 x i8> %16, <i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90, i8 -90>
  79.   %25 = xor <32 x i8> %21, %17
  80.   %26 = xor <32 x i8> %22, %18
  81.   %27 = xor <32 x i8> %23, %19
  82.   %28 = xor <32 x i8> %24, %20
  83.   %29 = getelementptr inbounds i8, i8* %out, i64 %index
  84.   %30 = bitcast i8* %29 to <32 x i8>*
  85.   store <32 x i8> %25, <32 x i8>* %30, align 1, !tbaa !2, !alias.scope !8, !noalias !5
  86.   %31 = getelementptr inbounds i8, i8* %29, i64 32
  87.   %32 = bitcast i8* %31 to <32 x i8>*
  88.   store <32 x i8> %26, <32 x i8>* %32, align 1, !tbaa !2, !alias.scope !8, !noalias !5
  89.   %33 = getelementptr inbounds i8, i8* %29, i64 64
  90.   %34 = bitcast i8* %33 to <32 x i8>*
  91.   store <32 x i8> %27, <32 x i8>* %34, align 1, !tbaa !2, !alias.scope !8, !noalias !5
  92.   %35 = getelementptr inbounds i8, i8* %29, i64 96
  93.   %36 = bitcast i8* %35 to <32 x i8>*
  94.   store <32 x i8> %28, <32 x i8>* %36, align 1, !tbaa !2, !alias.scope !8, !noalias !5
  95.   %index.next = add i64 %index, 128
  96.   %37 = icmp eq i64 %index.next, %n.vec
  97.   br i1 %37, label %middle.block, label %vector.body, !llvm.loop !10
  98.  
  99. middle.block:                                     ; preds = %vector.body
  100.   %cmp.n = icmp eq i64 %n.vec, %n
  101.   br i1 %cmp.n, label %for.cond.cleanup, label %for.body.preheader12
  102.  
  103. for.cond.cleanup:                                 ; preds = %for.body.prol.loopexit, %for.body, %middle.block, %entry
  104.   ret void
  105.  
  106. for.body:                                         ; preds = %for.body.prol.loopexit, %for.body
  107.   %i.07 = phi i64 [ %inc.1, %for.body ], [ %i.07.unr, %for.body.prol.loopexit ]
  108.   %arrayidx = getelementptr inbounds i8, i8* %in, i64 %i.07
  109.   %38 = load i8, i8* %arrayidx, align 1, !tbaa !2
  110.   %.neg.i = ashr i8 %38, 7
  111.   %shl.i = shl i8 %38, 1
  112.   %39 = and i8 %.neg.i, -90
  113.   %xor10.i = xor i8 %39, %shl.i
  114.   %arrayidx1 = getelementptr inbounds i8, i8* %out, i64 %i.07
  115.   store i8 %xor10.i, i8* %arrayidx1, align 1, !tbaa !2
  116.   %inc = add nuw i64 %i.07, 1
  117.   %arrayidx.1 = getelementptr inbounds i8, i8* %in, i64 %inc
  118.   %40 = load i8, i8* %arrayidx.1, align 1, !tbaa !2
  119.   %.neg.i.1 = ashr i8 %40, 7
  120.   %shl.i.1 = shl i8 %40, 1
  121.   %41 = and i8 %.neg.i.1, -90
  122.   %xor10.i.1 = xor i8 %41, %shl.i.1
  123.   %arrayidx1.1 = getelementptr inbounds i8, i8* %out, i64 %inc
  124.   store i8 %xor10.i.1, i8* %arrayidx1.1, align 1, !tbaa !2
  125.   %inc.1 = add nuw i64 %i.07, 2
  126.   %exitcond.1 = icmp eq i64 %inc.1, %n
  127.   br i1 %exitcond.1, label %for.cond.cleanup, label %for.body, !llvm.loop !12
  128. }
  129.  
  130. attributes #0 = { nofree norecurse nounwind uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="none" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "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"="x86-64" "target-features"="+avx,+avx2,+cx8,+fxsr,+gfni,+mmx,+popcnt,+sse,+sse2,+sse3,+sse4.1,+sse4.2,+ssse3,+x87,+xsave" "unsafe-fp-math"="false" "use-soft-float"="false" }
  131.  
  132. !llvm.module.flags = !{!0}
  133. !llvm.ident = !{!1}
  134.  
  135. !0 = !{i32 1, !"wchar_size", i32 4}
  136. !1 = !{!"clang version 11.0.0 (https://github.com/llvm/llvm-project 37c4ce5877804fd8bbd99f753a0517ea01b27405)"}
  137. !2 = !{!3, !3, i64 0}
  138. !3 = !{!"omnipotent char", !4, i64 0}
  139. !4 = !{!"Simple C/C++ TBAA"}
  140. !5 = !{!6}
  141. !6 = distinct !{!6, !7}
  142. !7 = distinct !{!7, !"LVerDomain"}
  143. !8 = !{!9}
  144. !9 = distinct !{!9, !7}
  145. !10 = distinct !{!10, !11}
  146. !11 = !{!"llvm.loop.isvectorized", i32 1}
  147. !12 = distinct !{!12, !11}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement