[PATCH] D127516: RegisterCoalescer: Fix verifier error when merging copy of undef
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 27 11:06:42 PDT 2022
arsenm added a comment.
In D127516#3613027 <https://reviews.llvm.org/D127516#3613027>, @MatzeB wrote:
> I am not sure I understand this change... Wasn't the intention of the existing that code that when you have something like:
>
> %2 = COPY undef %1
> USE %2
>
> that you merge the regs to remove the copy and add an `undef` to the use operands? =>
>
> USE undef %1
Yes, but in this situation the output register was a phi def so we need to keep a phi def in the same block in the coalesced register
> Why are we starting to use `IMPLICIT_DEF`s here? Is this related to subregs?
Because it's a live out value, so you need a phi def in the block. It's not related to subregs. This is analagous to the case where ProcessImplicitDefs won't delete IMPLICIT_DEFs that feed phi uses.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127516/new/
https://reviews.llvm.org/D127516
More information about the llvm-commits
mailing list