[PATCH] D97378: [VPlan] Support to vectorize inner loops with VPlan native path enabled
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 24 07:22:59 PST 2021
fhahn edited reviewers, added: fhahn; removed: Florian.
fhahn added a comment.
Thanks for the patch!
================
Comment at: llvm/test/Transforms/LoopVectorize/vplan-vectorize-inner-loop.ll:5
+; Test that when VPlan native path is enabled and no explicit loop is marked to
+; be vectorized that innermost loop will be vectorized without issues.
+
----------------
Can you add a reference to the bug report (PR42592)?
================
Comment at: llvm/test/Transforms/LoopVectorize/vplan-vectorize-inner-loop.ll:62
+ %indvar1 = phi i64 [ 0, %entry ], [ %indvar11, %for1.latch ]
+ %a.ptr = getelementptr inbounds double, double* %a.in, i64 %indvar1
+ %a = load double, double* %a.ptr, align 8
----------------
I think the outer loop could be simplified and only contain the bare minimum (outer induction variable & checks)
================
Comment at: llvm/test/Transforms/LoopVectorize/vplan-vectorize-inner-loop.ll:70
+ %indvar2 = phi i32 [ 0, %for1.header ], [ %indvar21, %for2.header ]
+ %a.reduction = phi double [ %a, %for1.header ], [ %a.reduction1, %for2.header ]
+ %a.reduction1 = fadd double %b, %a.reduction
----------------
Do we need a reduction here? Might be simpler to just have a simple store instead?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97378/new/
https://reviews.llvm.org/D97378
More information about the llvm-commits
mailing list