diff options
author | Thomas Lively <tlively@google.com> | 2020-02-05 22:35:01 -0800 |
---|---|---|
committer | Thomas Lively <tlively@google.com> | 2020-02-18 13:49:46 -0800 |
commit | 9d37f5afac4a3b9194b9001bed84f58ca8bd6c02 (patch) | |
tree | 72449add2d5916fae1f5954b8af5b5074ea0cce9 /llvm/lib/CodeGen/MachineVerifier.cpp | |
parent | d51910967fd34ca6462dc2211cb954d22367da9b (diff) | |
download | llvm-9d37f5afac4a3b9194b9001bed84f58ca8bd6c02.zip llvm-9d37f5afac4a3b9194b9001bed84f58ca8bd6c02.tar.gz llvm-9d37f5afac4a3b9194b9001bed84f58ca8bd6c02.tar.bz2 |
[WebAssembly] Implement multivalue call_indirects
Summary:
Unlike normal calls, call_indirects have immediate arguments that
caused a MachineVerifier failure without a small tweak to loosen the
verifier's requirements for variadicOpsAreDefs instructions.
One nice thing about the new call_indirects is that they do not need
to participate in the PCALL_INDIRECT mechanism because their post-isel
hook handles moving the function pointer argument and adding the flags
and typeindex arguments itself.
Reviewers: aheejin
Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D74191
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineVerifier.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineVerifier.cpp b/llvm/lib/CodeGen/MachineVerifier.cpp index bf589a7..8d1c2fe 100644 --- a/llvm/lib/CodeGen/MachineVerifier.cpp +++ b/llvm/lib/CodeGen/MachineVerifier.cpp @@ -1595,7 +1595,7 @@ MachineVerifier::visitMachineOperand(const MachineOperand *MO, unsigned MONum) { bool IsOptional = MI->isVariadic() && MONum == MCID.getNumOperands() - 1; if (!IsOptional) { if (MO->isReg()) { - if (MO->isDef() && !MCOI.isOptionalDef()) + if (MO->isDef() && !MCOI.isOptionalDef() && !MCID.variadicOpsAreDefs()) report("Explicit operand marked as def", MO, MONum); if (MO->isImplicit()) report("Explicit operand marked as implicit", MO, MONum); |