aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveInterval.cpp
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2010-12-19 22:12:45 +0000
committerCameron Zwarich <zwarich@apple.com>2010-12-19 22:12:45 +0000
commit251337e1c474fbf3ace1bd2731643a93da6f4d67 (patch)
tree857aff7db0dde4da455ca034e164fcb18d9f6bb4 /llvm/lib/CodeGen/LiveInterval.cpp
parent9edf3f50bf161e20de8ea97751b7dc169099a906 (diff)
downloadllvm-251337e1c474fbf3ace1bd2731643a93da6f4d67.zip
llvm-251337e1c474fbf3ace1bd2731643a93da6f4d67.tar.gz
llvm-251337e1c474fbf3ace1bd2731643a93da6f4d67.tar.bz2
Fix PR8815 by checking for an explicit clobber def tied to a use operand in
ConnectedVNInfoEqClasses::Classify(). llvm-svn: 122202
Diffstat (limited to 'llvm/lib/CodeGen/LiveInterval.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveInterval.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp
index 3c18017..16551ab 100644
--- a/llvm/lib/CodeGen/LiveInterval.cpp
+++ b/llvm/lib/CodeGen/LiveInterval.cpp
@@ -769,6 +769,14 @@ unsigned ConnectedVNInfoEqClasses::Classify(const LiveInterval *LI) {
// operand constraint?
if (const VNInfo *UVNI = LI->getVNInfoAt(VNI->def.getUseIndex()))
Connect(VNI->id, UVNI->id);
+
+ // Check for a tied operand constraint involving an early clobber def,
+ // where one VN ends right before the use index and the next VN is defined
+ // at the same use index.
+ if (VNI->def.isUse()) {
+ if (const VNInfo *PVNI = LI->getVNInfoAt(VNI->def.getLoadIndex()))
+ Connect(PVNI->id, VNI->id);
+ }
}
}