If LSR split critical edge during rewriting phi operands and
phi node has other pending fixup operands, we need to
update those pending fixups. Otherwise formulae will not be
implemented completely and some instructions will not be eliminated.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
The source change looks good to me, but I would like a bit more work on the test itself.
Comments below.
lib/Transforms/Scalar/LoopStrengthReduce.cpp | ||
---|---|---|
5359 | We don't usually put PR number in comments. Just make sure to put it in your commit message. | |
5381 | To reduce indentation, use: if (foundOriginalPHI) continue; | |
test/Transforms/LoopStrengthReduce/pr41445.ll | ||
1 ↗ | (On Diff #195000) | Use a more descriptive filename please: e.g., missing-phi-operand-update. |
1 ↗ | (On Diff #195000) | Please run opt -instnamer to get rid of the implicit variable. |
2 ↗ | (On Diff #195000) | Put the PR number in comments in the test. |
5 ↗ | (On Diff #195000) | Add a comment describing the characteristic of the test. |
6 ↗ | (On Diff #195000) | Could you add a test that fall into foundInOriginalPHI == true if that's not already the case? |
Comment Actions
Fixed comments.
test/Transforms/LoopStrengthReduce/pr41445.ll | ||
---|---|---|
6 ↗ | (On Diff #195000) | Yes, all those three cases
happen in this scenario. |
We don't usually put PR number in comments. Just make sure to put it in your commit message.