summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SplitKit.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-06-12 20:30:52 +0000
committerMatthias Braun <matze@braunis.de>2017-06-12 20:30:52 +0000
commit76f063090b2822106f0ff1fc951cae8e8821614f (patch)
tree7b03014c10dcc01e1b4f9264c106a6bff6c77fea /llvm/lib/CodeGen/SplitKit.cpp
parent89061b2224456b46fb09a62533687dd3bf746afa (diff)
downloadbcm5719-llvm-76f063090b2822106f0ff1fc951cae8e8821614f.tar.gz
bcm5719-llvm-76f063090b2822106f0ff1fc951cae8e8821614f.zip
SplitKit: Fix partially live subreg splitting
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. llvm-svn: 305228
Diffstat (limited to 'llvm/lib/CodeGen/SplitKit.cpp')
-rw-r--r--llvm/lib/CodeGen/SplitKit.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp
index 3a50aaa6998..008b984dd96 100644
--- a/llvm/lib/CodeGen/SplitKit.cpp
+++ b/llvm/lib/CodeGen/SplitKit.cpp
@@ -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;
OpenPOWER on IntegriCloud