mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-13 17:20:28 +00:00
[WebAssembly] Remove check for FrameIndex operands in WebAssemblyPeephole
This pass runs after FrameIndex elimination, so it should never see FI operands. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258860 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
604b5d5723
commit
380ddb15a7
@ -114,21 +114,16 @@ bool WebAssemblyPeephole::runOnMachineFunction(MachineFunction &MF) {
|
||||
LibFunc::Func Func;
|
||||
if (LibInfo.getLibFunc(Name, Func)) {
|
||||
const auto &Op2 = MI.getOperand(2);
|
||||
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 {
|
||||
if (!Op2.isReg())
|
||||
report_fatal_error("Peephole: call to builtin function with "
|
||||
"wrong signature, not consuming reg or "
|
||||
"frame index");
|
||||
}
|
||||
"wrong signature, not consuming reg");
|
||||
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…
x
Reference in New Issue
Block a user