[PATCH] D59657: [LangRef] Clarify codegen expectations for intrinsics with fp/integer-only overloads

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 15:02:11 PDT 2019


aemerson updated this revision to Diff 191784.
aemerson added a comment.

Re-wording and making it more explicit who this is for.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59657/new/

https://reviews.llvm.org/D59657

Files:
  llvm/docs/LangRef.rst


Index: llvm/docs/LangRef.rst
===================================================================
--- llvm/docs/LangRef.rst
+++ llvm/docs/LangRef.rst
@@ -10394,6 +10394,16 @@
 type is matched against the return type, it does not require its own
 name suffix.
 
+For target developers who are defining intrinsics for back-end code
+generation, any intrinsic overloads based solely the distinction between
+integer or floating point types should not be relied upon for correct
+code generation. In such cases, the recommended approach for target
+maintainers when defining intrinsics is to create separate integer and
+FP intrinsics rather than rely on overloading. For example, if different
+codegen is required for ``llvm.target.foo(<4 x i32>)`` and
+``llvm.target.foo(<4 x float>)`` then these should be split into
+different intrinsics.
+
 To learn how to add an intrinsic function, please see the `Extending
 LLVM Guide <ExtendingLLVM.html>`_.
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59657.191784.patch
Type: text/x-patch
Size: 948 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190321/ce88ced1/attachment.bin>


More information about the llvm-commits mailing list