projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b188dd9
)
Fix PR2664 - spiller GetRegForReload wasn't respecting sub-register indices on machin...
author
Evan Cheng
<evan.cheng@apple.com>
Wed, 10 Sep 2008 20:08:45 +0000
(20:08 +0000)
committer
Evan Cheng
<evan.cheng@apple.com>
Wed, 10 Sep 2008 20:08:45 +0000
(20:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56065
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/VirtRegMap.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/VirtRegMap.cpp
b/lib/CodeGen/VirtRegMap.cpp
index 4fd0ad44b05b0839f256dbe9b6cdeec8ffc467a6..e783e04a6165d2d5b124911de4c0b42b99812617 100644
(file)
--- a/
lib/CodeGen/VirtRegMap.cpp
+++ b/
lib/CodeGen/VirtRegMap.cpp
@@
-832,8
+832,10
@@
namespace {
}
Spills.ClobberPhysReg(NewPhysReg);
Spills.ClobberPhysReg(NewOp.PhysRegReused);
-
- MI->getOperand(NewOp.Operand).setReg(NewPhysReg);
+
+ unsigned SubIdx = MI->getOperand(NewOp.Operand).getSubReg();
+ unsigned RReg = SubIdx ? TRI->getSubReg(NewPhysReg, SubIdx) : NewPhysReg;
+ MI->getOperand(NewOp.Operand).setReg(RReg);
Spills.addAvailable(NewOp.StackSlotOrReMat, MI, NewPhysReg);
--MII;