Skip to content

Commit

Permalink
SplitKit: Fix partially live subreg splitting
Browse files Browse the repository at this point in the history
Fix thinko/typo in subreg aware liverange splitting logic. I'm not sure
how to write a proper testcase for this. The original problem only
happens on an out-of-tree target. Forcing subreg enabled targets to
spill and split in a predictable way is near impossible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305228 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
MatzeB committed Jun 12, 2017
1 parent 9283a09 commit c37ab5f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/CodeGen/SplitKit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,7 @@ SlotIndex SplitEditor::buildCopy(unsigned FromReg, unsigned ToReg,

// Greedy heuristic: Keep iterating keeping the best covering subreg index
// each time.
LaneBitmask LanesLeft =
LaneMask & ~(TRI.getSubRegIndexLaneMask(BestCover));
LaneBitmask LanesLeft = LaneMask & ~(TRI.getSubRegIndexLaneMask(BestIdx));
while (LanesLeft.any()) {
unsigned BestIdx = 0;
int BestCover = INT_MIN;
Expand Down

0 comments on commit c37ab5f

Please sign in to comment.