aboutsummaryrefslogtreecommitdiffstats
path: root/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
commitfb69f6037d1b79f83c895ed62dc3247e02bd2b5b (patch)
treef42e1fc9ddf5ddc34c6e94457a614005c4ee3e73 /lib/CodeGen/LiveInterval.cpp
parentc19d1c3ba2b216f0f91d71cf6fc2e983fc995854 (diff)
downloadexternal_llvm-fb69f6037d1b79f83c895ed62dc3247e02bd2b5b.zip
external_llvm-fb69f6037d1b79f83c895ed62dc3247e02bd2b5b.tar.gz
external_llvm-fb69f6037d1b79f83c895ed62dc3247e02bd2b5b.tar.bz2
Fix PR8815 by checking for an explicit clobber def tied to a use operand in
ConnectedVNInfoEqClasses::Classify(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122202 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveInterval.cpp')
-rw-r--r--lib/CodeGen/LiveInterval.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp
index 3c18017..16551ab 100644
--- a/lib/CodeGen/LiveInterval.cpp
+++ b/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);
+ }
}
}