[RegAllocGreedy] IMPLICIT_DEF values shouldn't prefer registers
authorJohn Brawn <john.brawn@arm.com>
Fri, 14 Dec 2018 14:07:57 +0000 (14:07 +0000)
committerJohn Brawn <john.brawn@arm.com>
Fri, 14 Dec 2018 14:07:57 +0000 (14:07 +0000)
commit1d0d86ae40fbc7b6dfc2b39098c9fe4e47e3a710
tree1fa176dceaceaad224efd906b8e844007dadb71b
parent113e2cd958d7d1e4ea26febade4fb7eada73239f
[RegAllocGreedy] IMPLICIT_DEF values shouldn't prefer registers

It costs nothing to spill an IMPLICIT_DEF value (the only spill code that's
generated is a KILL of the value), so when creating split constraints if the
live-out value is IMPLICIT_DEF the exit constraint should be DontCare instead
of PrefReg.

Differential Revision: https://reviews.llvm.org/D55652

llvm-svn: 349151
llvm/lib/CodeGen/RegAllocGreedy.cpp
llvm/test/CodeGen/AMDGPU/subreg-split-live-in-error.mir
llvm/test/CodeGen/Thumb/ragreedy-implicit-def.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/pr38795.ll