Simplify EXTRACT_SUBREG emission.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 5 Oct 2011 20:26:40 +0000 (20:26 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 5 Oct 2011 20:26:40 +0000 (20:26 +0000)
commitd2ed2d71c95462a6b14e7c7c8c82cb727ed342eb
treea19930d07c906d416c5db4679cb792ba530653ff
parent9bb272c900b46ebf78aa1b9daa7e3991bec8ff18
Simplify EXTRACT_SUBREG emission.

EXTRACT_SUBREG is emitted as %dst = COPY %src:sub, so there is no need to
constrain the %dst register class.  RegisterCoalescer will apply the
necessary constraints if it decides to eliminate the COPY.

The %src register class does need to be constrained to something with
the right sub-registers, though.  This is currently done manually with
COPY_TO_REGCLASS nodes.  They can possibly be removed after this patch.

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