diff options
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyCallIndirectFixup.cpp')
-rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyCallIndirectFixup.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyCallIndirectFixup.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyCallIndirectFixup.cpp index 31cef3c5457..fc0a01ca30e 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyCallIndirectFixup.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyCallIndirectFixup.cpp @@ -100,8 +100,11 @@ bool WebAssemblyCallIndirectFixup::runOnMachineFunction(MachineFunction &MF) { auto Uses = MI.explicit_uses(); MachineInstr::mop_iterator it = Uses.begin(); const MachineOperand MO = *it; - unsigned num = MI.getOperandNo(it); - MI.RemoveOperand(num); + + // Set up the flags immediate, which currently has no defined flags + // so it's always zero. + it->ChangeToImmediate(0); + MI.addOperand(MF, MO); DEBUG(dbgs() << " After transform: " << MI); |