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
Diff Detail
- Repository
- rL LLVM
Event Timeline
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 | Use a more descriptive filename please: e.g., missing-phi-operand-update. | |
1 | Please run opt -instnamer to get rid of the implicit variable. | |
2 | Put the PR number in comments in the test. | |
5 | Add a comment describing the characteristic of the test. | |
6 | Could you add a test that fall into foundInOriginalPHI == true if that's not already the case? |
Fixed comments.
test/Transforms/LoopStrengthReduce/pr41445.ll | ||
---|---|---|
6 | 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.