[PATCH] D156345: RegisterCoalescer: Add implicit-def of super register when coalescing SUBREG_TO_REG

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 13:36:19 PDT 2023


qcolombet added a comment.

In D156345#4542646 <https://reviews.llvm.org/D156345#4542646>, @arsenm wrote:

> In D156345#4542127 <https://reviews.llvm.org/D156345#4542127>, @qcolombet wrote:
>
>> Hi @arsenm ,
>>
>> A maybe more robust temporary fix may be to apply the terminal rule (`applyTerminalRule`) only on `isCopy` instructions (right now it is on `isCopyLike`).
>>
>> I could be wrong, but I wouldn't be surprised if this is the entry point of the problematic coalesced SUBREG_TO_REGs. And clearly without your fixes, the terminal rule is incorrect on SUBREG_TO_REG.
>
> "UseTerminalRule" is false by default. Swapping the isCopyLike in copyCoalesceInMBB for isCopy induces about 850 test failures

Ah right, that's the whole `copyCoalesceInMBB` method that uses `isCopyLike` not just the terminal rule.
Sounds like you have to push forward with your crusade!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156345/new/

https://reviews.llvm.org/D156345



More information about the llvm-commits mailing list