mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-19 02:42:58 +00:00
Fix an obvious bug in isMoveInstr. It needs to return sub-register indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103157 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4ffc22ae00
commit
9c35ee2099
@ -540,8 +540,6 @@ bool
|
||||
ARMBaseInstrInfo::isMoveInstr(const MachineInstr &MI,
|
||||
unsigned &SrcReg, unsigned &DstReg,
|
||||
unsigned& SrcSubIdx, unsigned& DstSubIdx) const {
|
||||
SrcSubIdx = DstSubIdx = 0; // No sub-registers.
|
||||
|
||||
switch (MI.getOpcode()) {
|
||||
default: break;
|
||||
case ARM::VMOVS:
|
||||
@ -551,6 +549,8 @@ ARMBaseInstrInfo::isMoveInstr(const MachineInstr &MI,
|
||||
case ARM::VMOVQQ : {
|
||||
SrcReg = MI.getOperand(1).getReg();
|
||||
DstReg = MI.getOperand(0).getReg();
|
||||
SrcSubIdx = MI.getOperand(1).getSubReg();
|
||||
DstSubIdx = MI.getOperand(0).getSubReg();
|
||||
return true;
|
||||
}
|
||||
case ARM::MOVr:
|
||||
@ -565,6 +565,8 @@ ARMBaseInstrInfo::isMoveInstr(const MachineInstr &MI,
|
||||
"Invalid ARM MOV instruction");
|
||||
SrcReg = MI.getOperand(1).getReg();
|
||||
DstReg = MI.getOperand(0).getReg();
|
||||
SrcSubIdx = MI.getOperand(1).getSubReg();
|
||||
DstSubIdx = MI.getOperand(0).getSubReg();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user