[llvm-branch-commits] [llvm] [LV] Mask off possibly aliasing vector lanes (PR #100579)

Sam Tebbs via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Aug 15 05:44:16 PDT 2025


================
@@ -1347,6 +1354,11 @@ class TargetTransformInfo {
       PartialReductionExtendKind OpBExtend, std::optional<unsigned> BinOp,
       TTI::TargetCostKind CostKind) const;
 
+  /// \return true if a mask should be formed that disables lanes that could
+  /// alias between two pointers. The mask is created by the
+  /// loop_dependence_{war,raw}_mask intrinsics.
+  LLVM_ABI bool useSafeEltsMask(ElementCount VF) const;
----------------
SamTebbs33 wrote:

That would work if I return invalid for the cost, but @sdesmalen-arm has suggested I calculate the cost of the expanded intrinsic instead of returning invalid: https://github.com/llvm/llvm-project/pull/100579/files#r2262969228

https://github.com/llvm/llvm-project/pull/100579


More information about the llvm-branch-commits mailing list