[PATCH] D128272: [LoopVectorize] Change PredicatedBBsAfterVectorization to be per VF

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 23 02:46:21 PDT 2022


sdesmalen added inline comments.


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/sve-tail-folding-cost.ll:6
+
+define i32 @uniform_load(i64 %n, i64 %boff, i64 %coff, ptr readonly %b, ptr readnone %c, ptr %d) #0 {
+; CHECK: LAA: Found a loop in uniform_load: for.body
----------------
nit: Can this test be reduced a little bit more, I'm not sure if `%boff`, `%coff` and all of the pointers are really needed for this test.


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/sve-tail-folding-cost.ll:16
+
+for.body:                                         ; preds = %for.body, %for.body
+  %indvars.iv = phi i64 [ 1, %entry ], [ %indvars.iv.next, %for.body ]
----------------
david-arm wrote:
> sdesmalen wrote:
> > What in this loop is causing `PredicatedBBsAfterVectorization` to be `true` for fixed-width vectors?
> It's the uniform load of `@globval`, which causes LoopVectorizationCostModel::collectInstsToScalarize to insert the BB into PredicatedBBsAfterVectorization.
Okay thanks, can you just add a comment to the test describing this? I didn't realise that the load from @globval had this effect.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128272/new/

https://reviews.llvm.org/D128272



More information about the llvm-commits mailing list