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:
5540570
)
R600/SI: Legalize operands after changing dst reg in FixSGPRCopies
author
Tom Stellard
<thomas.stellard@amd.com>
Thu, 17 Apr 2014 21:00:01 +0000
(21:00 +0000)
committer
Tom Stellard
<thomas.stellard@amd.com>
Thu, 17 Apr 2014 21:00:01 +0000
(21:00 +0000)
Otherwise we may not legalize some illegal REG_SEQUENCE instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206497
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/R600/SIInstrInfo.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/R600/SIInstrInfo.cpp
b/lib/Target/R600/SIInstrInfo.cpp
index 3e36f27afbd8f5788088432826ad43699f1803d1..a235255756f3df4d9e41fc761e2b283516b2bb24 100644
(file)
--- a/
lib/Target/R600/SIInstrInfo.cpp
+++ b/
lib/Target/R600/SIInstrInfo.cpp
@@
-991,9
+991,8
@@
void SIInstrInfo::moveToVALU(MachineInstr &TopInst) const {
}
}
- legalizeOperands(Inst);
-
// Update the destination register class.
+
const TargetRegisterClass *NewDstRC = getOpRegClass(*Inst, 0);
switch (Inst->getOpcode()) {
@@
-1019,6
+1018,9
@@
void SIInstrInfo::moveToVALU(MachineInstr &TopInst) const {
unsigned NewDstReg = MRI.createVirtualRegister(NewDstRC);
MRI.replaceRegWith(DstReg, NewDstReg);
+ // Legalize the operands
+ legalizeOperands(Inst);
+
for (MachineRegisterInfo::use_iterator I = MRI.use_begin(NewDstReg),
E = MRI.use_end(); I != E; ++I) {
MachineInstr &UseMI = *I->getParent();