diff --git a/llvm/lib/Target/ARM/ARMFastISel.cpp b/llvm/lib/Target/ARM/ARMFastISel.cpp index 54aa355d4db0a..14e1160e70dae 100644 --- a/llvm/lib/Target/ARM/ARMFastISel.cpp +++ b/llvm/lib/Target/ARM/ARMFastISel.cpp @@ -2504,6 +2504,7 @@ bool ARMFastISel::SelectCall(const Instruction *I, // Set all unused physreg defs as dead. static_cast(MIB)->setPhysRegsDeadExcept(UsedRegs, TRI); + diagnoseDontCall(*CI); return true; } diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp index ec95e86e4fe3d..2666342d0c7b9 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp +++ b/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp @@ -912,6 +912,8 @@ bool WebAssemblyFastISel::selectCall(const Instruction *I) { if (!IsVoid) updateValueMap(Call, ResultReg); + + diagnoseDontCall(*Call); return true; }