mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[WebAssembly] Remove check for FrameIndex operands in WebAssemblyPeephole
This pass runs after FrameIndex elimination, so it should never see FI operands. NFC llvm-svn: 258860
This commit is contained in:
parent
a30e120cbc
commit
e5897f542b
@ -114,21 +114,16 @@ bool WebAssemblyPeephole::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
LibFunc::Func Func;
|
LibFunc::Func Func;
|
||||||
if (LibInfo.getLibFunc(Name, Func)) {
|
if (LibInfo.getLibFunc(Name, Func)) {
|
||||||
const auto &Op2 = MI.getOperand(2);
|
const auto &Op2 = MI.getOperand(2);
|
||||||
if (Op2.isReg()) {
|
if (!Op2.isReg())
|
||||||
MachineOperand &MO = MI.getOperand(0);
|
|
||||||
unsigned OldReg = MO.getReg();
|
|
||||||
unsigned NewReg = Op2.getReg();
|
|
||||||
if (MRI.getRegClass(NewReg) != MRI.getRegClass(OldReg))
|
|
||||||
report_fatal_error("Peephole: call to builtin function with "
|
|
||||||
"wrong signature, from/to mismatch");
|
|
||||||
Changed |= MaybeRewriteToDiscard(OldReg, NewReg, MO, MFI, MRI);
|
|
||||||
} else if (Op2.isFI()) {
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
report_fatal_error("Peephole: call to builtin function with "
|
report_fatal_error("Peephole: call to builtin function with "
|
||||||
"wrong signature, not consuming reg or "
|
"wrong signature, not consuming reg");
|
||||||
"frame index");
|
MachineOperand &MO = MI.getOperand(0);
|
||||||
}
|
unsigned OldReg = MO.getReg();
|
||||||
|
unsigned NewReg = Op2.getReg();
|
||||||
|
if (MRI.getRegClass(NewReg) != MRI.getRegClass(OldReg))
|
||||||
|
report_fatal_error("Peephole: call to builtin function with "
|
||||||
|
"wrong signature, from/to mismatch");
|
||||||
|
Changed |= MaybeRewriteToDiscard(OldReg, NewReg, MO, MFI, MRI);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user