[llvm] [VPlan] Improve code in VPlanPredicator (NFC) (PR #150416)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 24 06:22:18 PDT 2025
================
@@ -133,8 +133,8 @@ VPValue *VPPredicator::createBlockInMask(VPBasicBlock *VPBB) {
// load/store/gather/scatter. Initialize BlockMask to no-mask.
VPValue *BlockMask = nullptr;
// This is the block mask. We OR all unique incoming edges.
- for (auto *Predecessor : SetVector<VPBlockBase *>(
- VPBB->getPredecessors().begin(), VPBB->getPredecessors().end())) {
+ for (auto *Predecessor : make_range(VPBB->getPredecessors().begin(),
+ unique(VPBB->getPredecessors()))) {
----------------
lukel97 wrote:
Is this correct? It looks like unique only removes equivalent elements that are consecutive to each other.
https://github.com/llvm/llvm-project/pull/150416
More information about the llvm-commits
mailing list