[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 Jun 27 16:35:00 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL364610: [LangRef] Clarify codegen expectations for intrinsics with fp/integer-only… (authored by aemerson, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D59657?vs=191784&id=206964#toc

Repository:
  rL LLVM

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

https://reviews.llvm.org/D59657

Files:
  llvm/trunk/docs/LangRef.rst


Index: llvm/trunk/docs/LangRef.rst
===================================================================
--- llvm/trunk/docs/LangRef.rst
+++ llvm/trunk/docs/LangRef.rst
@@ -10480,6 +10480,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.206964.patch
Type: text/x-patch
Size: 966 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190627/af391dc5/attachment.bin>


More information about the llvm-commits mailing list