FIX llvm-gcc bootstrap on x86_64 linux. If a virtual register is copied to a physical...
authorEvan Cheng <evan.cheng@apple.com>
Tue, 13 Jan 2009 03:57:45 +0000 (03:57 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 13 Jan 2009 03:57:45 +0000 (03:57 +0000)
commit1d8a76d7d51d75508159b9bb312fc51e908cb676
tree0efc993acc88fa270662c794c3fabc613b789852
parent83489bb7700c69b7a4a8da59365c42d3f5c8129b
FIX llvm-gcc bootstrap on x86_64 linux. If a virtual register is copied to a physical register, it's not necessarily defined by a copy. We have to watch out it doesn't clobber any sub-register that might be live during its live interval. If the live interval crosses a basic block, then it's not safe to check with the less conservative check (by scanning uses and defs) because it's possible a sub-register might be live out of the block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62144 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SimpleRegisterCoalescing.cpp
test/CodeGen/X86/2009-01-12-CoalescerBug.ll [new file with mode: 0644]