aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
diff options
context:
space:
mode:
authorDaniel Paoliello <danpao@microsoft.com>2025-08-12 16:12:22 -0700
committerGitHub <noreply@github.com>2025-08-12 16:12:22 -0700
commit2a82e231465b1720261df37fe46cfb909ddf4092 (patch)
treee045742d99d6e6edbf578b174d93f373407b56ae /llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
parent6e59d1da0831d455016cc4779bf239e150c64cb4 (diff)
downloadllvm-2a82e231465b1720261df37fe46cfb909ddf4092.zip
llvm-2a82e231465b1720261df37fe46cfb909ddf4092.tar.gz
llvm-2a82e231465b1720261df37fe46cfb909ddf4092.tar.bz2
Fix handling of dontcall attributes for arches that lower calls via fastSelectInstruction (#153302)
Recently my change to avoid duplicate `dontcall` attribute errors (#152810) caused the Clang `Frontend/backend-attribute-error-warning.c` test to fail on Arm32: <https://lab.llvm.org/buildbot/#/builders/154/builds/20134> The root cause is that, if the default `IFastSel` path bails, then targets are given the opportunity to lower instructions via `fastSelectInstruction`. That's the path taken by Arm32 and since its implementation of `selectCall` didn't call `diagnoseDontCall` no error was emitted. I've checked the other implementations of `fastSelectInstruction` and the only other one that lowers call instructions in WebAssembly, so I've fixed that too.
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
index ec95e86..2666342 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;
}