[llvm] [LangRef] Add a description of the semantics of call signatures. (PR #136189)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 17 18:03:40 PDT 2025
================
@@ -13152,6 +13155,16 @@ values. Upon a '``ret``' instruction in the called function, control
flow continues with the instruction after the function call, and the
return value of the function is bound to the result argument.
+If the callee refers to an intrinsic function, the signature of the call must
+match the signature of the callee. Otherwise, if the signature of the call
+does not match the signature of the called function, the behavior is
+target-specific. For a significant mismatch, this likely results in undefined
----------------
efriedma-quic wrote:
There's some weirdness here because of the way ABI lowering works: we don't define one correct way to lower a high-level type to an LLVM type, so different frontends represent the "same" type as a different LLVM type. Because of this, optimizations are conservative with signature mismatches. Maybe we can revisit this at some point.
https://github.com/llvm/llvm-project/pull/136189
More information about the llvm-commits
mailing list