From c9e759acff35b60e74bbfcd0aa7f1bb1ea69cb0b Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Thu, 28 Apr 2016 02:11:49 +0000 Subject: LiveIntervalAnalysis: Fix handleMove() using wrong value numbers handleMove() was incorrectly swapping two value numbers. This was missed before because the problem only occured when moving subregister definitions and needed -verify-machineinstrs to be detected. I cannot add a testcase as long as I cannot reapply r260905/r260806. llvm-svn: 267840 --- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index 5c8be8ba730..d6d48858509 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -1121,9 +1121,8 @@ private: // reordering, there is always a successor to OldIdxOut in the same BB // We don't need INext->valno anymore and will reuse for the new segment // we create later. - DefVNI = INext->valno; + DefVNI = OldIdxVNI; INext->start = OldIdxOut->end; - INext->valno = OldIdxVNI; INext->valno->def = INext->start; } // If NewIdx is behind the last segment, extend that and append a new one. -- cgit v1.2.3