OSDN Git Service

Add some missing checks in TwoAddressInstructionPass::CoalesceExtSubRegs.
authorBob Wilson <bob.wilson@apple.com>
Thu, 3 Jun 2010 23:53:58 +0000 (23:53 +0000)
committerBob Wilson <bob.wilson@apple.com>
Thu, 3 Jun 2010 23:53:58 +0000 (23:53 +0000)
commit26bf8f9a1b6b7f9ce198c319dc650ad3073b05f8
tree758d525a4b6224f739b4411abd67d61395cce4c3
parent6ee358b4eb92298357687cb460dde8e26678aca2
Add some missing checks in TwoAddressInstructionPass::CoalesceExtSubRegs.
Check that all the instructions are in the same basic block, that the
EXTRACT_SUBREGs write to the same subregs that are being extracted, and that
the source and destination registers are in the same regclass.  Some of
these constraints can be relaxed with a bit more work.  Jakob suggested
that the loop that checks for subregs when NewSubIdx != 0 should use the
"nodbg" iterator, so I made that change here, too.

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