mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 22:04:55 +00:00
R600/SI: Legalize operands after changing dst reg in FixSGPRCopies
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
This commit is contained in:
parent
5540570374
commit
1b011b51ea
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user