================
@@ -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
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to