Don't coalesce a physical register with an incompatible virtual register.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 28 Apr 2009 16:34:35 +0000 (16:34 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Tue, 28 Apr 2009 16:34:35 +0000 (16:34 +0000)
commit08e791fdb301d3a4c6c9fa6b7f5c3e33921f38a6
treea540da32df05b71d515dc34ab3513fdfec4bfa58
parentd3d965714b89c5d5aeb65fb5ce06e081f0b3c049
Don't coalesce a physical register with an incompatible virtual register.

If the physical register does not belong to the virtual register's regclass,
don't coalesce. The physical register could be an invalid operand for an
instruction using the vreg.

The regclass matching is done after determining the actual subregisters being copied.

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