[llvm] [CSSPGO] Don't let pseudo probes block early-exit vectorization (PR #220149)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 03:55:07 PDT 2026
================
@@ -1208,6 +1209,13 @@ bool VPlanTransforms::areAllLoadsDereferenceable(VPBasicBlock *HeaderVPBB,
const DataLayout &DL = TheLoop->getHeader()->getDataLayout();
for (VPBasicBlock *VPBB : vp_rpo_plain_cfg_loop_body(HeaderVPBB)) {
for (VPRecipeBase &R : *VPBB) {
+ // Pseudo-probes are profiling placeholders with side effects but no real
+ // memory access. They are modeled as reading inaccessible memory, so skip
+ // them here to stay consistent with isReadOnlyLoop(), which classifies
+ // such loops as read-only.
+ if (auto *SDR = dyn_cast<VPSingleDefRecipe>(&R))
+ if (isa_and_nonnull<PseudoProbeInst>(SDR->getUnderlyingValue()))
+ continue;
----------------
fhahn wrote:
please match the intrinsic using VPlan pattern matching, instead of accessing the underlying value
https://github.com/llvm/llvm-project/pull/220149
More information about the llvm-commits
mailing list