Simplify INSERT_SUBREG emission.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 5 Oct 2011 18:31:00 +0000 (18:31 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 5 Oct 2011 18:31:00 +0000 (18:31 +0000)
commit2c3bef8a15c84ad8ef043f8e8ff08ffe1b96720b
treeb753bc9ba8336d1bad10e025d072808316b8880f
parent42be280a288b2bfc5f072ea83802088e0fb073e7
Simplify INSERT_SUBREG emission.

The register class created by INSERT_SUBREG and SUBREG_TO_REG must be
legal and support the SubIdx sub-registers.

The new getSubClassWithSubReg() hook can compute that.

This may create INSERT_SUBREG instructions defining a larger register
class than the sub-register being inserted.  That is OK,
RegisterCoalescer will constrain the register class as needed when it
eliminates the INSERT_SUBREG instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141198 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/InstrEmitter.cpp