[PATCH] D59657: [LangRef] Clarify codegen expectations for intrinsics with fp/integer-only overloads
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 21 11:42:13 PDT 2019
arsenm added inline comments.
================
Comment at: llvm/docs/LangRef.rst:10397-10401
+Intrinsic overloads based solely the distinction between whether the
+types are integer or floating point should not be relied upon for
+correct code generation. In such cases, the recommended approach when
+defining intrinsics is to create separate integer and FP intrinsics
+rather than rely on overloading.
----------------
I feel like this could be rephrased more generally as something along the lines of there shouldn't be a major semantic change in the operation based on the overloaded type. The integer/FP distinction is one particular example. I'm trying to come up with a definition for "major semantic change" means though.
I have a sort of counterexample though in the AMDGPU buffer intrinsics. If the return type is a struct, it changes the instruction slightly, but not in a problematic/ambiguous way like the FP/integer type.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59657/new/
https://reviews.llvm.org/D59657
More information about the llvm-commits
mailing list