[llvm] r267840 - LiveIntervalAnalysis: Fix handleMove() using wrong value numbers

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 19:11:50 PDT 2016


Author: matze
Date: Wed Apr 27 21:11:49 2016
New Revision: 267840

URL: http://llvm.org/viewvc/llvm-project?rev=267840&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp

Modified: llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp?rev=267840&r1=267839&r2=267840&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveIntervalAnalysis.cpp Wed Apr 27 21:11:49 2016
@@ -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.




More information about the llvm-commits mailing list