brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · a06c5a7 Raw
43 lines · plain
1; REQUIRES: asserts2; RUN: opt -passes=loop-vectorize -force-ordered-reductions=true -force-vector-width=1 -S < %s -debug 2> %t.debug | FileCheck %s3; RUN: cat %t.debug | FileCheck %s --check-prefix=CHECK-DEBUG4 5target triple = "aarch64-unknown-linux-gnu"6 7; CHECK-DEBUG: LV: Not interleaving scalar ordered reductions.8 9define void @foo(ptr noalias nocapture %dst, ptr noalias nocapture readonly %src, i64 %M, i64 %N) {10; CHECK-LABEL: @foo(11; CHECK-NOT: vector.body12 13entry:14  br label %for.body.us15 16for.body.us:                                      ; preds = %entry, %for.cond317  %i.023.us = phi i64 [ %inc8.us, %for.cond3 ], [ 0, %entry ]18  %arrayidx.us = getelementptr inbounds float, ptr %dst, i64 %i.023.us19  %mul.us = mul nsw i64 %i.023.us, %N20  br label %for.body3.us21 22for.body3.us:                                     ; preds = %for.body.us, %for.body3.us23  %0 = phi float [ 0.000000e+00, %for.body.us ], [ %add6.us, %for.body3.us ]24  %j.021.us = phi i64 [ 0, %for.body.us ], [ %inc.us, %for.body3.us ]25  %add.us = add nsw i64 %j.021.us, %mul.us26  %arrayidx4.us = getelementptr inbounds float, ptr %src, i64 %add.us27  %1 = load float, ptr %arrayidx4.us, align 428  %add6.us = fadd float %1, %029  %inc.us = add nuw nsw i64 %j.021.us, 130  %exitcond.not = icmp eq i64 %inc.us, %N31  br i1 %exitcond.not, label %for.cond3, label %for.body3.us32 33for.cond3:                                        ; preds = %for.body3.us34  %add6.us.lcssa = phi float [ %add6.us, %for.body3.us ]35  store float %add6.us.lcssa, ptr %arrayidx.us, align 436  %inc8.us = add nuw nsw i64 %i.023.us, 137  %exitcond26.not = icmp eq i64 %inc8.us, %M38  br i1 %exitcond26.not, label %exit, label %for.body.us39 40exit:                                             ; preds = %for.cond341  ret void42}43