aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
diff options
context:
space:
mode:
authorDaniel Paoliello <danpao@microsoft.com>2025-08-12 11:05:07 -0700
committerGitHub <noreply@github.com>2025-08-12 11:05:07 -0700
commitc430e06fb58692d25284257c95ad77a33ed03438 (patch)
tree4fa7e1a444df0263012639173b8760441785e768 /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
parent348f01f89c272c08e46bbdc1779d658323f17214 (diff)
downloadllvm-c430e06fb58692d25284257c95ad77a33ed03438.zip
llvm-c430e06fb58692d25284257c95ad77a33ed03438.tar.gz
llvm-c430e06fb58692d25284257c95ad77a33ed03438.tar.bz2
[win][arm64ec] Fix duplicate errors with the dontcall attribute (#152810)
Since the `dontcall-*` attributes are checked both by `FastISel`/`GlobalISel` and `SelectionDAGBuilder`, and both `FastISel` and `GlobalISel` bail for calls on Arm64EC for AFTER doing the check, we ended up emitting duplicate copies of this error. This change moves the checking for `dontcall-*` in `FastISel` and `GlobalISel` to after it has been successfully lowered.
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/FastISel.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
index fb9eff9..4b5d8a58 100644
--- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -1148,9 +1148,12 @@ bool FastISel::lowerCall(const CallInst *CI) {
CLI.setCallee(RetTy, FuncTy, CI->getCalledOperand(), std::move(Args), *CI)
.setTailCall(IsTailCall);
- diagnoseDontCall(*CI);
+ if (lowerCallTo(CLI)) {
+ diagnoseDontCall(*CI);
+ return true;
+ }
- return lowerCallTo(CLI);
+ return false;
}
bool FastISel::selectCall(const User *I) {