From e725e12f29eff53aa9b0f8bc60fa5625c9a6628d Mon Sep 17 00:00:00 2001 From: Daniel Paoliello Date: Tue, 12 Aug 2025 14:27:17 -0700 Subject: [PATCH] Fix handling of dontcall attributes for arches that lower calls via fastSelectInstruction --- llvm/lib/Target/ARM/ARMFastISel.cpp | 1 + llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp | 2 ++ 2 files changed, 3 insertions(+) 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; }