[PATCH] D132571: [RLEV] Pick a correct insert point when incoming instruction is itself a phi node
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 29 11:05:13 PDT 2022
reames added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/LoopUtils.cpp:1400
+ (isa<PHINode>(Inst) || isa<LandingPadInst>(Inst)) ?
+ &*Inst->getParent()->getFirstInsertionPt() : Inst;
+ RewritePhiSet.emplace_back(PN, i, ExitValue, InsertPt, HighCost);
----------------
nikic wrote:
> Any reason we don't just use `PN->getIncomingBlock(i)->getTerminator()` as the insertion point? That seems like a more obvious place to materialize an edge value.
I'd been trying for a minimal fix. Do you mind if we land this, and then do a follow up change as you suggest? It'll cause significant test diffs which I think obscure the (rather narrow) impact of the fix.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132571/new/
https://reviews.llvm.org/D132571
More information about the llvm-commits
mailing list