[PATCH] D136289: llvm-reduce: Don't turn switches into returns
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 28 16:15:06 PDT 2022
aeubanks accepted this revision.
aeubanks added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp:114
+ for (PHINode &SuccPHI : NewDefault->phis()) {
+ SuccPHI.addIncoming(SuccPHI.getIncomingValueForBlock(SwInst.getParent()),
+ SwInst.getParent());
----------------
arsenm wrote:
> aeubanks wrote:
> > if `NewDefault` was already a successor, doesn't its phis already have values from this block?
> Yes that's where it's getting the value. Phis have to have an incoming operand for each instance
TIL you need redundant entries
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136289/new/
https://reviews.llvm.org/D136289
More information about the llvm-commits
mailing list