================ @@ -6752,6 +6776,12 @@ void LoopVectorizationPlanner::plan(ElementCount UserVF, unsigned UserIC) { if (!MaxFactors) // Cases that should not to be vectorized nor interleaved. return; + ArrayRef<PointerDiffInfo> DiffChecks; + auto TFStyle = CM.getTailFoldingStyle(); + if (RTChecks.has_value() && + useSafeEltsMask(TFStyle, CM.getRTCheckStyle(TFStyle), UserVF, TTI)) + DiffChecks = *RTChecks; ---------------- sdesmalen-arm wrote:
Why would you want to check that here rather than where it's used (i.e. `tryToBuildVPlanWithVPRecipes`). You can check there if the NoAlias-mask is needed before passing them to `VPlanTransforms::addActiveLaneMask`. That way you don't need to pass the RTChecks to all those functions, thus reducing the diff. It also seems strange that `RuntimePointerChecking::getDiffChecks` returns a `std::optional<ArrayRef>` rather than an empty ArrayRef, when `CanUseDiffCheck == false`. It would be worth removing the `std::optional` in an NFC patch. 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