Closed Quuxplusone closed 4 years ago
Would be good to have a standalone snippet showing the problem.
Attached test.ll
(2291 bytes, text/plain): simplified test case
https://reviews.llvm.org/D71209 should fix it.
Also, I found out that the bug only triggers when the initial value when entering the loop is a constant.
+Ryan Taylor, who has been looking at how we lower PHI nodes with constant operands during instruction selection. In MIR the PHI nodes always have register operands, so we have to insert move-immediate instructions, which might be related to the register pressure problems you're seeing.
Wasn't this fixed?
Yes, the revision has landed in the meantime.
test.ll
(2291 bytes, text/plain)