Commit e28708d4 authored by Matt Arsenault's avatar Matt Arsenault Committed by Matt Arsenault
Browse files

RegisterCoalescer: Avoid redundant implicit-def on rematerialize

If this was coalescing a def of a subregister with a def of the super
register, it was introducing a redundant super-register def and
marking the subregister def as dead.

Resulting in something like:

  dead $eax = MOVr0, implicit-def $rax, implicit-def $rax

Avoid this by checking if the new instruction already has the super
def, so we end up with this instead:

  dead $eax = MOVr0, implicit-def $rax

The dead flag looks suspicious to me, seems like it's easy to buggily
interpret dead def of subreg and a non-dead def of an aliasing
register. It seems to be intentional though.

https://reviews.llvm.org/D156343
parent 3f092736
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment