[llvm] r263255 - [misched] Fix a truncation issue from r263021.

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 11 08:54:08 PST 2016


Author: mcrosier
Date: Fri Mar 11 10:54:07 2016
New Revision: 263255

URL: http://llvm.org/viewvc/llvm-project?rev=263255&view=rev
Log:
[misched] Fix a truncation issue from r263021.

The truncation was causing the sorting algorithm to behave oddly when comparing
positive and negative offsets.  Fortunately, this doesn't currently happen in
practice and was exposed by a WIP.  Thus, I can't test this change now, but the
follow on patch will.

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

Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=263255&r1=263254&r2=263255&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Fri Mar 11 10:54:07 2016
@@ -1362,7 +1362,7 @@ class LoadClusterMutation : public Sched
     SUnit *SU;
     unsigned BaseReg;
     int64_t Offset;
-    LoadInfo(SUnit *su, unsigned reg, unsigned ofs)
+    LoadInfo(SUnit *su, unsigned reg, int64_t ofs)
       : SU(su), BaseReg(reg), Offset(ofs) {}
 
     bool operator<(const LoadInfo &RHS) const {




More information about the llvm-commits mailing list