[llvm] [VPlan] Get Addr computation cost with scalar type if it is uniform for gather/scatter. (PR #150371)
Elvis Wang via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 7 23:05:55 PDT 2025
================
@@ -6932,6 +6932,12 @@ static bool planContainsAdditionalSimplifications(VPlan &Plan,
auto Iter = vp_depth_first_deep(Plan.getVectorLoopRegion()->getEntry());
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(Iter)) {
for (VPRecipeBase &R : *VPBB) {
+ if (auto *MR = dyn_cast<VPWidenMemoryRecipe>(&R)) {
+ // The address computation cost can be query as scalar type if the
+ // address is uniform.
+ if (!MR->isConsecutive() && vputils::isSingleScalar(MR->getAddr()))
+ return true;
----------------
ElvisWang123 wrote:
After rebase, don't need this anymore. Removed, thanks!
https://github.com/llvm/llvm-project/pull/150371
More information about the llvm-commits
mailing list