Fix accidental off by one change
authorFiona Glaser <escha@apple.com>
Wed, 2 Dec 2015 18:46:23 +0000 (18:46 +0000)
committerFiona Glaser <escha@apple.com>
Wed, 2 Dec 2015 18:46:23 +0000 (18:46 +0000)
Didn't break any tests, but did unnecessary extra work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254529 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp

index cb573f2..78985e0 100644 (file)
@@ -1244,7 +1244,7 @@ static void CheckForLiveRegDefMasked(SUnit *SU, const uint32_t *RegMask,
                                      SmallSet<unsigned, 4> &RegAdded,
                                      SmallVectorImpl<unsigned> &LRegs) {
   // Look at all live registers. Skip Reg0 and the special CallResource.
-  for (unsigned i = 1, e = LiveRegDefs.size(); i != e; ++i) {
+  for (unsigned i = 1, e = LiveRegDefs.size()-1; i != e; ++i) {
     if (!LiveRegDefs[i]) continue;
     if (LiveRegDefs[i] == SU) continue;
     if (!MachineOperand::clobbersPhysReg(RegMask, i)) continue;