[PATCH] D125301: [LoopVectorize] Add option to use active lane mask for loop control flow

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 7 09:16:42 PDT 2022


david-arm marked 6 inline comments as done.
david-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h:336-337
+  ActiveLaneMask emitGetActiveLaneMask() const {
+    if (ST->hasSVE())
+      return ActiveLaneMask::PredicateAndControlFlow;
+    return ActiveLaneMask::None;
----------------
paulwalker-arm wrote:
> Will we do the correct thing if the vectoriser chooses fixed length vectorisation?  Not sure what "correct" really means here other than not crash or regress performance? I just want to ensure we've considered the possibility.
I think it does yeah. I've added a new test @simple_memset_v4i32 in sve-tail-folding.ll to defend the case where SVE is enabled and we've chosen a fixed-width VF. The codegen side of things is safe because we have tests to defend lowering of get.active.lane.mask calls for fixed-width too.


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

https://reviews.llvm.org/D125301



More information about the llvm-commits mailing list