Fix PR5391: support early clobber physical register def tied with a use (ewwww)
authorEvan Cheng <evan.cheng@apple.com>
Tue, 1 Dec 2009 22:25:00 +0000 (22:25 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 1 Dec 2009 22:25:00 +0000 (22:25 +0000)
commit9836a26da3acc15deec878cd6ba21a6b5f2e753b
tree1629dce08f8953da987d2a1fb6abcd9411e1527c
parent2a37b9c750c4e6deedc44c1ecd653457c0ad0765
Fix PR5391: support early clobber physical register def tied with a use (ewwww)
- A valno should be set HasRedefByEC if there is an early clobber def in the middle of its live ranges. It should not be set if the def of the valno is defined by an early clobber.
- If a physical register def is tied to an use and it's an early clobber, it just means the HasRedefByEC is set since it's still one continuous live range.
- Add a couple of missing checks for HasRedefByEC in the coalescer. In general, it should not coalesce a vr with a physical register if the physical register has a early clobber def somewhere. This is overly conservative but that's the price for using such a nasty inline asm "feature".

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