[llvm-branch-commits] [llvm] [LV] Mask off possibly aliasing vector lanes (PR #100579)
Sander de Smalen via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Aug 8 09:05:16 PDT 2025
================
@@ -2063,6 +2080,12 @@ static bool useActiveLaneMaskForControlFlow(TailFoldingStyle Style) {
Style == TailFoldingStyle::DataAndControlFlowWithoutRuntimeCheck;
}
+static bool useSafeEltsMask(TailFoldingStyle TFStyle, RTCheckStyle Style,
+ ElementCount VF, const TargetTransformInfo &TTI) {
+ return useActiveLaneMask(TFStyle) && Style == RTCheckStyle::UseSafeEltsMask &&
+ TTI.useSafeEltsMask(VF);
+}
+
----------------
sdesmalen-arm wrote:
When you add a check to `TTI.useSafeEltsMask` in `CostModel::getRTCheckStyle`, then function becomes redundant and you can call the CostModel function directly to check if `CM.getRTCheckStyle() == RTCheckStyle::UseSafeEltsMask`
https://github.com/llvm/llvm-project/pull/100579
More information about the llvm-branch-commits
mailing list