jloser created this revision.
jloser added reviewers: RKSimon, nikic, fhahn.
Herald added a project: All.
jloser requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

The docs mention that `__builtin_reduce_add` and `__builtin_reduce_mul` support
both integer and floating point element types, but only integer element types
are actually supported. See https://github.com/llvm/llvm-project/issues/57847,
and specifically,
https://github.com/llvm/llvm-project/blob/00874c48ea4d291908517afaab50d1dcbfb016c3/clang/lib/Sema/SemaChecking.cpp#L2631
 for the fact that floating point element types are not supported yet.

Fix the docs to only mention support for integer element types.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D134316

Files:
  clang/docs/LanguageExtensions.rst


Index: clang/docs/LanguageExtensions.rst
===================================================================
--- clang/docs/LanguageExtensions.rst
+++ clang/docs/LanguageExtensions.rst
@@ -648,8 +648,8 @@
  ET __builtin_reduce_min(VT a)           return x or y, whichever is smaller; 
If exactly one argument     integer and floating point types
                                          is a NaN, return the other argument. 
If both arguments are
                                          NaNs, fmax() return a NaN.
- ET __builtin_reduce_add(VT a)           \+                                    
                           integer and floating point types
- ET __builtin_reduce_mul(VT a)           \*                                    
                           integer and floating point types
+ ET __builtin_reduce_add(VT a)           \+                                    
                           integer types
+ ET __builtin_reduce_mul(VT a)           \*                                    
                           integer types
  ET __builtin_reduce_and(VT a)           &                                     
                           integer types
  ET __builtin_reduce_or(VT a)            \|                                    
                           integer types
  ET __builtin_reduce_xor(VT a)           ^                                     
                           integer types
@@ -4244,7 +4244,7 @@
 
   #pragma clang attribute pop
 
-A single push directive can contain multiple attributes, however, 
+A single push directive can contain multiple attributes, however,
 only one syntax style can be used within a single directive:
 
 .. code-block:: c++
@@ -4254,7 +4254,7 @@
   void function1(); // The function now has the [[noreturn]] and [[noinline]] 
attributes
 
   #pragma clang attribute pop
-  
+
   #pragma clang attribute push (__attribute((noreturn, noinline)), apply_to = 
function)
 
   void function2(); // The function now has the __attribute((noreturn)) and 
__attribute((noinline)) attributes


Index: clang/docs/LanguageExtensions.rst
===================================================================
--- clang/docs/LanguageExtensions.rst
+++ clang/docs/LanguageExtensions.rst
@@ -648,8 +648,8 @@
  ET __builtin_reduce_min(VT a)           return x or y, whichever is smaller; If exactly one argument     integer and floating point types
                                          is a NaN, return the other argument. If both arguments are
                                          NaNs, fmax() return a NaN.
- ET __builtin_reduce_add(VT a)           \+                                                               integer and floating point types
- ET __builtin_reduce_mul(VT a)           \*                                                               integer and floating point types
+ ET __builtin_reduce_add(VT a)           \+                                                               integer types
+ ET __builtin_reduce_mul(VT a)           \*                                                               integer types
  ET __builtin_reduce_and(VT a)           &                                                                integer types
  ET __builtin_reduce_or(VT a)            \|                                                               integer types
  ET __builtin_reduce_xor(VT a)           ^                                                                integer types
@@ -4244,7 +4244,7 @@
 
   #pragma clang attribute pop
 
-A single push directive can contain multiple attributes, however, 
+A single push directive can contain multiple attributes, however,
 only one syntax style can be used within a single directive:
 
 .. code-block:: c++
@@ -4254,7 +4254,7 @@
   void function1(); // The function now has the [[noreturn]] and [[noinline]] attributes
 
   #pragma clang attribute pop
-  
+
   #pragma clang attribute push (__attribute((noreturn, noinline)), apply_to = function)
 
   void function2(); // The function now has the __attribute((noreturn)) and __attribute((noinline)) attributes
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to