Open asb opened 2 years ago
@llvm/issue-subscribers-backend-risc-v
@arichardson noted another case where this seems to be happening in the in-tree tests.
Some of the lit test cases that show this have multiple selects being expanded in the same basic block. These end up expanding into phis that use an x0 copy from a basic block that isn't an immediate predecessor of the phi.
See D130809 for the patch to work around this in the RISC-V backend by adding additional ISel patterns. As noted by @topperc, the register coalescer doesn't always seem to succeed in doing this, when really it should.
Creating this issue to track the problem, as it would be nice to be able to remove these patterns at a later point if the problem can be identified and resolved.