Bug 917401 - Fix incorrect blocked register assignment in LSRA. r=jandem, a=lsblakk
authorShu-yu Guo <shu@rfrn.org>
Wed, 18 Sep 2013 14:03:00 -0700
changeset 160650 331b31231aa1dfc4f416d20a71723448f287678d
parent 160649 b3ca57c97999652bf1e3024bb78b892fd1d76c96
child 160651 65d553f4186cf68b942b84caa61c618336e804cf
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem, lsblakk
bugs917401
milestone26.0a2
Bug 917401 - Fix incorrect blocked register assignment in LSRA. r=jandem, a=lsblakk
js/src/jit/LinearScan.cpp
--- a/js/src/jit/LinearScan.cpp
+++ b/js/src/jit/LinearScan.cpp
@@ -1075,17 +1075,17 @@ LinearScanAllocator::findBestBlockedRegi
 
     CodePosition fixedPos = fixedIntervalsUnion->intersect(current);
     if (fixedPos != CodePosition::MIN) {
         for (IntervalIterator i(fixed.begin()); i != fixed.end(); i++) {
             AnyRegister reg = i->getAllocation()->toRegister();
             if (nextUsePos[reg.code()] != CodePosition::MIN) {
                 CodePosition pos = i->intersect(current);
                 if (pos != CodePosition::MIN && pos < nextUsePos[reg.code()]) {
-                    nextUsePos[reg.code()] = pos;
+                    nextUsePos[reg.code()] = (pos == current->start()) ? CodePosition::MIN : pos;
                     IonSpew(IonSpew_RegAlloc, "   Register %s next used %u (fixed)", reg.name(), pos.pos());
                 }
             }
         }
     }
 
     // Search nextUsePos for largest value
     AnyRegister::Code bestCode = AnyRegister::Invalid;