[PATCH] D142240: [LSR] Generalize one aspect of terminator folding (recently introduced in D132443)
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 20 11:43:49 PST 2023
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:6714
}
- // TODO: Right now we limit the phi node to help the folding be of a start
- // value of getelementptr. We can extend to any kinds of IV as long as it is
- // an affine AddRec. Add a switch to cover more types of instructions here
- // and down in the actual transformation.
- return {isa<GetElementPtrInst>(PN.getIncomingValueForBlock(LoopPreheader)),
- TermValueS};
+ return {true, TermValueS};
};
----------------
The bool return value can be dropped -- check nullptr return instead.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142240/new/
https://reviews.llvm.org/D142240
More information about the llvm-commits
mailing list