From 56e9e57d28d511e831c8b63407695ff75612c413 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 19 Mar 2008 02:26:36 +0000 Subject: Fixed a coalescer bug caused by a typo. llvm-svn: 48526 --- llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp') diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp index 3c9078e89d6..cc413c3855f 100644 --- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp +++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp @@ -365,7 +365,7 @@ bool SimpleRegisterCoalescing::RemoveCopyByCommutingDef(LiveInterval &IntA, IntB.removeValNo(BValNo); for (unsigned i = 0, e = BDeadValNos.size(); i != e; ++i) IntB.removeValNo(BDeadValNos[i]); - VNInfo *ValNo = IntB.getNextValue(ALR->start, 0, li_->getVNInfoAllocator()); + VNInfo *ValNo = IntB.getNextValue(AValNo->def, 0, li_->getVNInfoAllocator()); for (LiveInterval::iterator AI = IntA.begin(), AE = IntA.end(); AI != AE; ++AI) { if (AI->valno != AValNo) continue; -- cgit v1.2.3