public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 00/16] stdx::simd fixes and testsuite improvements
@ 2021-01-27 20:36 Matthias Kretz
  2021-01-27 20:41 ` [PATCH 02/16] Fix NEON intrinsic types usage Matthias Kretz
                   ` (15 more replies)
  0 siblings, 16 replies; 19+ messages in thread
From: Matthias Kretz @ 2021-01-27 20:36 UTC (permalink / raw)
  To: gcc-patches, libstdc++

As promised on IRC ...

Matthias Kretz (15):
  Support skip, only, expensive, and xfail markers
  Fix NEON intrinsic types usage
  Support -mlong-double-64 on PPC
  Fix simd_mask<double> on POWER w/o POWER8
  Fix several check-simd interaction issues
  Fix DRIVEROPTS and TESTFLAGS processing
  Fix incorrect display of old test summaries
  Immediate feedback with -v
  Fix mask reduction of simd_mask<double> on POWER7
  Skip testing hypot3 for long double on PPC
  Abort test after 1000 lines of output
  Support timeout and timeout-factor options
  Improve test codegen for interpreting assembly
  Implement hmin and hmax
  Work around test failures using -mno-tree-vrp

yaozhongxiao (1):
  Improve "find_first/last_set" for NEON

 libstdc++-v3/include/experimental/bits/simd.h | 170 ++++++++++-
 .../include/experimental/bits/simd_builtin.h  |   6 +-
 .../include/experimental/bits/simd_neon.h     |  17 +-
 .../include/experimental/bits/simd_ppc.h      |  35 ++-
 .../include/experimental/bits/simd_scalar.h   |   2 +-
 libstdc++-v3/testsuite/Makefile.am            |   5 +-
 libstdc++-v3/testsuite/Makefile.in            |   5 +-
 .../testsuite/experimental/simd/driver.sh     | 263 ++++++++++++++----
 .../experimental/simd/generate_makefile.sh    | 201 +++++++------
 .../testsuite/experimental/simd/tests/abs.cc  |   1 +
 .../experimental/simd/tests/algorithms.cc     |   1 +
 .../experimental/simd/tests/bits/verify.h     |  44 +--
 .../experimental/simd/tests/broadcast.cc      |   1 +
 .../experimental/simd/tests/casts.cc          |   1 +
 .../experimental/simd/tests/fpclassify.cc     |   3 +-
 .../experimental/simd/tests/frexp.cc          |   3 +-
 .../experimental/simd/tests/generator.cc      |   1 +
 .../experimental/simd/tests/hypot3_fma.cc     |   4 +-
 .../simd/tests/integer_operators.cc           |   1 +
 .../simd/tests/ldexp_scalbn_scalbln_modf.cc   |   3 +-
 .../experimental/simd/tests/loadstore.cc      |   2 +
 .../experimental/simd/tests/logarithm.cc      |   3 +-
 .../experimental/simd/tests/mask_broadcast.cc |   1 +
 .../simd/tests/mask_conversions.cc            |   1 +
 .../simd/tests/mask_implicit_cvt.cc           |   1 +
 .../experimental/simd/tests/mask_loadstore.cc |   1 +
 .../simd/tests/mask_operator_cvt.cc           |   1 +
 .../experimental/simd/tests/mask_operators.cc |   1 +
 .../simd/tests/mask_reductions.cc             |   1 +
 .../experimental/simd/tests/math_1arg.cc      |   3 +-
 .../experimental/simd/tests/math_2arg.cc      |   3 +-
 .../experimental/simd/tests/operator_cvt.cc   |   1 +
 .../experimental/simd/tests/operators.cc      |   1 +
 .../experimental/simd/tests/reductions.cc     |  22 ++
 .../experimental/simd/tests/remqo.cc          |   3 +-
 .../testsuite/experimental/simd/tests/simd.cc |   1 +
 .../experimental/simd/tests/sincos.cc         |   4 +-
 .../experimental/simd/tests/split_concat.cc   |   1 +
 .../experimental/simd/tests/splits.cc         |   1 +
 .../experimental/simd/tests/trigonometric.cc  |   3 +-
 .../simd/tests/trunc_ceil_floor.cc            |   3 +-
 .../experimental/simd/tests/where.cc          |   1 +
 42 files changed, 635 insertions(+), 191 deletions(-)

-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────





^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 02/16] Fix NEON intrinsic types usage
  2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
@ 2021-01-27 20:41 ` Matthias Kretz
  2021-01-27 20:42 ` [PATCH 03/16] Support -mlong-double-64 on PPC Matthias Kretz
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Matthias Kretz @ 2021-01-27 20:41 UTC (permalink / raw)
  To: gcc-patches, libstdc++

From: Matthias Kretz <kretz@kde.org>

Intrinsics types for NEON differ from gnu::vector_size types now. This
requires explicit specializations for __intrinsic_type and a new
__is_intrinsic_type trait.

libstdc++-v3/ChangeLog:
	* include/experimental/bits/simd.h (__is_intrinsic_type): New
	internal type trait. Alias for __is_vector_type on x86.
	(_VectorTraitsImpl): Enable for __intrinsic_type in addition for
	__vector_type.
	(__intrin_bitcast): Allow casting to & from vector & intrinsic
	types.
	(__intrinsic_type): Explicitly specialize for NEON intrinsic
	vector types.
---
 libstdc++-v3/include/experimental/bits/simd.h | 70 +++++++++++++++++--
 1 file changed, 66 insertions(+), 4 deletions(-)

diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/
include/experimental/bits/simd.h
index 00eec50d64f..d56176210df 100644
--- a/libstdc++-v3/include/experimental/bits/simd.h
+++ b/libstdc++-v3/include/experimental/bits/simd.h
@@ -1379,13 +1379,35 @@ template <typename _Tp>
 template <typename _Tp>
   inline constexpr bool __is_vector_type_v = __is_vector_type<_Tp>::value;
 
+// }}}
+// __is_intrinsic_type {{{
+#if _GLIBCXX_SIMD_HAVE_SSE_ABI
+template <typename _Tp>
+  using __is_intrinsic_type = __is_vector_type<_Tp>;
+#else // not SSE (x86)
+template <typename _Tp, typename = void_t<>>
+  struct __is_intrinsic_type : false_type {};
+
+template <typename _Tp>
+  struct __is_intrinsic_type<
+    _Tp, void_t<typename __intrinsic_type<
+	   remove_reference_t<decltype(declval<_Tp>()[0])>, 
sizeof(_Tp)>::type>>
+    : is_same<_Tp, typename __intrinsic_type<
+		     remove_reference_t<decltype(declval<_Tp>()[0])>,
+		     sizeof(_Tp)>::type> {};
+#endif
+
+template <typename _Tp>
+  inline constexpr bool __is_intrinsic_type_v = 
__is_intrinsic_type<_Tp>::value;
+
 // }}}
 // _VectorTraits{{{
 template <typename _Tp, typename = void_t<>>
   struct _VectorTraitsImpl;
 
 template <typename _Tp>
-  struct _VectorTraitsImpl<_Tp, enable_if_t<__is_vector_type_v<_Tp>>>
+  struct _VectorTraitsImpl<_Tp, enable_if_t<__is_vector_type_v<_Tp>
+					      || __is_intrinsic_type_v<_Tp>>>
   {
     using type = _Tp;
     using value_type = remove_reference_t<decltype(declval<_Tp>()[0])>;
@@ -1457,7 +1479,8 @@ template <typename _To, typename _From>
   _GLIBCXX_SIMD_INTRINSIC constexpr _To
   __intrin_bitcast(_From __v)
   {
-    static_assert(__is_vector_type_v<_From> && __is_vector_type_v<_To>);
+    static_assert((__is_vector_type_v<_From> || __is_intrinsic_type_v<_From>)
+		    && (__is_vector_type_v<_To> || __is_intrinsic_type_v<_To>));
     if constexpr (sizeof(_To) == sizeof(_From))
       return reinterpret_cast<_To>(__v);
     else if constexpr (sizeof(_From) > sizeof(_To))
@@ -2183,16 +2206,55 @@ template <typename _Tp, size_t _Bytes>
 #endif // _GLIBCXX_SIMD_HAVE_SSE_ABI
 // __intrinsic_type (ARM){{{
 #if _GLIBCXX_SIMD_HAVE_NEON
+template <>
+  struct __intrinsic_type<float, 8, void>
+  { using type = float32x2_t; };
+
+template <>
+  struct __intrinsic_type<float, 16, void>
+  { using type = float32x4_t; };
+
+#if _GLIBCXX_SIMD_HAVE_NEON_A64
+template <>
+  struct __intrinsic_type<double, 8, void>
+  { using type = float64x1_t; };
+
+template <>
+  struct __intrinsic_type<double, 16, void>
+  { using type = float64x2_t; };
+#endif
+
+#define _GLIBCXX_SIMD_ARM_INTRIN(_Bits, _Np)                                   
\
+template <>                                                                    
\
+  struct __intrinsic_type<__int_with_sizeof_t<_Bits / 8>,                      
\
+			  _Np * _Bits / 8, void>                               \
+  { using type = int##_Bits##x##_Np##_t; };                                    
\
+template <>                                                                    
\
+  struct __intrinsic_type<make_unsigned_t<__int_with_sizeof_t<_Bits / 8>>,     
\
+			  _Np * _Bits / 8, void>                               \
+  { using type = uint##_Bits##x##_Np##_t; }
+_GLIBCXX_SIMD_ARM_INTRIN(8, 8);
+_GLIBCXX_SIMD_ARM_INTRIN(8, 16);
+_GLIBCXX_SIMD_ARM_INTRIN(16, 4);
+_GLIBCXX_SIMD_ARM_INTRIN(16, 8);
+_GLIBCXX_SIMD_ARM_INTRIN(32, 2);
+_GLIBCXX_SIMD_ARM_INTRIN(32, 4);
+_GLIBCXX_SIMD_ARM_INTRIN(64, 1);
+_GLIBCXX_SIMD_ARM_INTRIN(64, 2);
+#undef _GLIBCXX_SIMD_ARM_INTRIN
+
 template <typename _Tp, size_t _Bytes>
   struct __intrinsic_type<_Tp, _Bytes,
 			  enable_if_t<__is_vectorizable_v<_Tp> && _Bytes <= 16>>
   {
-    static constexpr int _S_VBytes = _Bytes <= 8 ? 8 : 16;
+    static constexpr int _SVecBytes = _Bytes <= 8 ? 8 : 16;
     using _Ip = __int_for_sizeof_t<_Tp>;
     using _Up = conditional_t<
       is_floating_point_v<_Tp>, _Tp,
       conditional_t<is_unsigned_v<_Tp>, make_unsigned_t<_Ip>, _Ip>>;
-    using type [[__gnu__::__vector_size__(_S_VBytes)]] = _Up;
+    static_assert(!is_same_v<_Tp, _Up> || _SVecBytes != _Bytes,
+		  "should use explicit specialization above");
+    using type = typename __intrinsic_type<_Up, _SVecBytes>::type;
   };
 #endif // _GLIBCXX_SIMD_HAVE_NEON
 
-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────





^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 03/16] Support -mlong-double-64 on PPC
  2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
  2021-01-27 20:41 ` [PATCH 02/16] Fix NEON intrinsic types usage Matthias Kretz
@ 2021-01-27 20:42 ` Matthias Kretz
  2021-01-27 20:42 ` [PATCH 04/16] Fix simd_mask<double> on POWER w/o POWER8 Matthias Kretz
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Matthias Kretz @ 2021-01-27 20:42 UTC (permalink / raw)
  To: gcc-patches, libstdc++

From: Matthias Kretz <kretz@kde.org>

libstdc++-v3/ChangeLog:
	* include/experimental/bits/simd.h: Let __intrinsic_type<long
	double, N> be valid if sizeof(long double) == sizeof(double) and
	use a __vector double as member type.
---
 libstdc++-v3/include/experimental/bits/simd.h | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/
include/experimental/bits/simd.h
index d56176210df..64cf8d32328 100644
--- a/libstdc++-v3/include/experimental/bits/simd.h
+++ b/libstdc++-v3/include/experimental/bits/simd.h
@@ -2285,7 +2285,9 @@ template <typename _Tp, size_t _Bytes>
   struct __intrinsic_type<_Tp, _Bytes,
 			  enable_if_t<__is_vectorizable_v<_Tp> && _Bytes <= 16>>
   {
-    static_assert(!is_same_v<_Tp, long double>,
+    static constexpr bool _S_is_ldouble = is_same_v<_Tp, long double>;
+    // allow _Tp == long double with -mlong-double-64
+    static_assert(!(_S_is_ldouble && sizeof(long double) > sizeof(double)),
 		  "no __intrinsic_type support for long double on PPC");
 #ifndef __VSX__
     static_assert(!is_same_v<_Tp, double>,
@@ -2297,8 +2299,11 @@ template <typename _Tp, size_t _Bytes>
       "no __intrinsic_type support for integers larger than 4 Bytes "
       "on PPC w/o POWER8 vectors");
 #endif
-    using type = typename __intrinsic_type_impl<conditional_t<
-      is_floating_point_v<_Tp>, _Tp, __int_for_sizeof_t<_Tp>>>::type;
+    using type =
+      typename __intrinsic_type_impl<
+		 conditional_t<is_floating_point_v<_Tp>,
+			       conditional_t<_S_is_ldouble, double, _Tp>,
+			       __int_for_sizeof_t<_Tp>>>::type;
   };
 #endif // __ALTIVEC__
 
-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 04/16] Fix simd_mask<double> on POWER w/o POWER8
  2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
  2021-01-27 20:41 ` [PATCH 02/16] Fix NEON intrinsic types usage Matthias Kretz
  2021-01-27 20:42 ` [PATCH 03/16] Support -mlong-double-64 on PPC Matthias Kretz
@ 2021-01-27 20:42 ` Matthias Kretz
  2021-01-27 20:42 ` [PATCH 05/16] Fix several check-simd interaction issues Matthias Kretz
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Matthias Kretz @ 2021-01-27 20:42 UTC (permalink / raw)
  To: gcc-patches, libstdc++

From: Matthias Kretz <kretz@kde.org>

libstdc++-v3/ChangeLog:
	* include/experimental/bits/simd.h: Remove unnecessary static
	assertion. Allow sizeof(8) integer __intrinsic_type to enable
	the necessary mask type.
---
 libstdc++-v3/include/experimental/bits/simd.h | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/
include/experimental/bits/simd.h
index 64cf8d32328..9685df0be9e 100644
--- a/libstdc++-v3/include/experimental/bits/simd.h
+++ b/libstdc++-v3/include/experimental/bits/simd.h
@@ -2292,12 +2292,6 @@ template <typename _Tp, size_t _Bytes>
 #ifndef __VSX__
     static_assert(!is_same_v<_Tp, double>,
 		  "no __intrinsic_type support for double on PPC w/o VSX");
-#endif
-#ifndef __POWER8_VECTOR__
-    static_assert(
-      !(is_integral_v<_Tp> && sizeof(_Tp) > 4),
-      "no __intrinsic_type support for integers larger than 4 Bytes "
-      "on PPC w/o POWER8 vectors");
 #endif
     using type =
       typename __intrinsic_type_impl<
-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 05/16] Fix several check-simd interaction issues
  2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
                   ` (2 preceding siblings ...)
  2021-01-27 20:42 ` [PATCH 04/16] Fix simd_mask<double> on POWER w/o POWER8 Matthias Kretz
@ 2021-01-27 20:42 ` Matthias Kretz
  2021-01-27 20:42 ` [PATCH 06/16] Fix DRIVEROPTS and TESTFLAGS processing Matthias Kretz
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Matthias Kretz @ 2021-01-27 20:42 UTC (permalink / raw)
  To: gcc-patches, libstdc++

[-- Attachment #1: Type: text/plain, Size: 1595 bytes --]

From: Matthias Kretz <kretz@kde.org>

libstdc++-v3/ChangeLog:
	* testsuite/experimental/simd/driver.sh (verify_test): Print
	test output on run xfail. Do not repeat lines from the log that
	were already printed on stdout.
	(test_selector): Make the compiler flags pattern usable as a
	substring selector.
	(toplevel): Trap on SIGINT and remove the log and sum files.
	Call timout with --foreground to quickly terminate on SIGINT.
	* testsuite/experimental/simd/generate_makefile.sh: Simplify run
	targets via target patterns. Default DRIVEROPTS to -v for run
	targets. Remove log and sum files after completion of the run
	target (so that it's always recompiled).
	Place help text into text file for reasonable 'make help'
	performance.
---
 .../testsuite/experimental/simd/driver.sh     | 16 +++--
 .../experimental/simd/generate_makefile.sh    | 70 +++++++++----------
 2 files changed, 44 insertions(+), 42 deletions(-)


--
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────

[-- Attachment #2: 0005-Fix-several-check-simd-interaction-issues.patch --]
[-- Type: text/x-patch, Size: 5641 bytes --]

diff --git a/libstdc++-v3/testsuite/experimental/simd/driver.sh b/libstdc++-v3/testsuite/experimental/simd/driver.sh
index 84f3829c2d4..cf07ff9ad85 100755
--- a/libstdc++-v3/testsuite/experimental/simd/driver.sh
+++ b/libstdc++-v3/testsuite/experimental/simd/driver.sh
@@ -224,16 +224,17 @@ verify_test() {
       fail "timeout: execution test"
     elif [ "$xfail" = "run" ]; then
       xfail "execution test"
-      exit 0
     else
       fail "execution test"
     fi
     if $verbose; then
-      if [ $(cat "$log"|wc -l) -gt 1000 ]; then
+      lines=$(wc -l < "$log")
+      lines=$((lines-3))
+      if [ $lines -gt 1000 ]; then
         echo "[...]"
         tail -n1000 "$log"
       else
-        cat "$log"
+        tail -n$lines "$log"
       fi
     elif ! $quiet; then
       grep -i fail "$log" | head -n5
@@ -267,7 +268,7 @@ test_selector() {
       [ -z "$target_triplet" ] && target_triplet=$($CXX -dumpmachine)
       if matches "$target_triplet" "$pat_triplet"; then
         pat_flags="${string#* }"
-        if matches "$CXXFLAGS" "$pat_flags"; then
+        if matches "$CXXFLAGS" "*$pat_flags*"; then
           return 0
         fi
       fi
@@ -276,6 +277,7 @@ test_selector() {
   return 1
 }
 
+trap "rm -f '$log' '$sum'; exit" INT
 rm -f "$log" "$sum"
 touch "$log" "$sum"
 
@@ -316,15 +318,15 @@ if [ -n "$xfail" ]; then
 fi
 
 write_log_and_verbose "$CXX $src $@ -D_GLIBCXX_SIMD_TESTTYPE=$type $abiflag -o $exe"
-timeout $timeout "$CXX" "$src" "$@" "-D_GLIBCXX_SIMD_TESTTYPE=$type" $abiflag -o "$exe" >> "$log" 2>&1
+timeout --foreground $timeout "$CXX" "$src" "$@" "-D_GLIBCXX_SIMD_TESTTYPE=$type" $abiflag -o "$exe" >> "$log" 2>&1
 verify_compilation $?
 if [ -n "$sim" ]; then
   write_log_and_verbose "$sim ./$exe"
-  timeout $timeout $sim "./$exe" >> "$log" 2>&1 <&-
+  timeout --foreground $timeout $sim "./$exe" >> "$log" 2>&1 <&-
 else
   write_log_and_verbose "./$exe"
   timeout=$(awk "BEGIN { print int($timeout / 2) }")
-  timeout $timeout "./$exe" >> "$log" 2>&1 <&-
+  timeout --foreground $timeout "./$exe" >> "$log" 2>&1 <&-
 fi
 verify_test $?
 
diff --git a/libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh b/libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh
index 553bc98f60b..8d642a2941a 100755
--- a/libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh
+++ b/libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh
@@ -240,7 +240,7 @@ EOF
 %-$type.log: %-$type-0.log %-$type-1.log %-$type-2.log %-$type-3.log \
 %-$type-4.log %-$type-5.log %-$type-6.log %-$type-7.log \
 %-$type-8.log %-$type-9.log
-	@cat $^ > \$@
+	@cat \$^ > \$@
 	@cat \$(^:log=sum) > \$(@:log=sum)${rmline}
 
 EOF
@@ -252,47 +252,47 @@ EOF
 EOF
     done
   done
-  echo 'run-%: export GCC_TEST_RUN_EXPENSIVE=yes'
-  all_tests | while read file && read name; do
-    echo "run-$name: $name.log"
-    all_types "$file" | while read t && read type; do
-      echo "run-$name-$type: $name-$type.log"
-      for i in $(seq 0 9); do
-        echo "run-$name-$type-$i: $name-$type-$i.log"
-      done
-    done
-    echo
-  done
   cat <<EOF
-help:
-	@printf "use DRIVEROPTS=<options> to pass the following options:\n"\\
-	"-q, --quiet         Only print failures.\n"\\
-	"-v, --verbose       Print compiler and test output on failure.\n"\\
-	"-k, --keep-failed   Keep executables of failed tests.\n"\\
-	"--sim <executable>  Path to an executable that is prepended to the test\n"\\
-	"                    execution binary (default: the value of\n"\\
-	"                    GCC_TEST_SIMULATOR).\n"\\
-	"--timeout-factor <x>\n"\\
-	"                    Multiply the default timeout with x.\n"\\
-	"--run-expensive     Compile and run tests marked as expensive (default:\n"\\
-	"                    true if GCC_TEST_RUN_EXPENSIVE is set, false otherwise).\n"\\
-	"--only <pattern>    Compile and run only tests matching the given pattern.\n\n"
-	@echo "use TESTFLAGS=<flags> to pass additional compiler flags"
-	@echo
-	@echo "The following are some of the valid targets for this Makefile:"
-	@echo "... all"
-	@echo "... clean"
-	@echo "... help"
+run-%: export GCC_TEST_RUN_EXPENSIVE=yes
+run-%: DRIVEROPTS=-v
+run-%: %.log
+	@rm \$^ \$(^:log=sum)
+
+help: .make_help.txt
+	@cat \$<
+
+EOF
+  dsthelp="${dst%Makefile}.make_help.txt"
+  cat <<EOF > "$dsthelp"
+use DRIVEROPTS=<options> to pass the following options:
+-q, --quiet         Only print failures.
+-v, --verbose       Print compiler and test output on failure.
+-k, --keep-failed   Keep executables of failed tests.
+--sim <executable>  Path to an executable that is prepended to the test
+                    execution binary (default: the value of
+                    GCC_TEST_SIMULATOR).
+--timeout-factor <x>
+                    Multiply the default timeout with x.
+--run-expensive     Compile and run tests marked as expensive (default:
+                    true if GCC_TEST_RUN_EXPENSIVE is set, false otherwise).
+--only <pattern>    Compile and run only tests matching the given pattern.
+
+use TESTFLAGS=<flags> to pass additional compiler flags
+
+The following are some of the valid targets for this Makefile:
+... all
+... clean
+... help"
 EOF
   all_tests | while read file && read name; do
-    printf "\t@echo '... run-${name}'\n"
+    echo "... run-${name}"
     all_types | while read t && read type; do
-      printf "\t@echo '... run-${name}-${type}'\n"
+      echo "... run-${name}-${type}"
       for i in $(seq 0 9); do
-        printf "\t@echo '... run-${name}-${type}-$i'\n"
+        echo "... run-${name}-${type}-$i"
       done
     done
-  done
+  done >> "$dsthelp"
   cat <<EOF
 
 clean:

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 06/16] Fix DRIVEROPTS and TESTFLAGS processing
  2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
                   ` (3 preceding siblings ...)
  2021-01-27 20:42 ` [PATCH 05/16] Fix several check-simd interaction issues Matthias Kretz
@ 2021-01-27 20:42 ` Matthias Kretz
  2021-01-27 20:42 ` [PATCH 07/16] Fix incorrect display of old test summaries Matthias Kretz
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Matthias Kretz @ 2021-01-27 20:42 UTC (permalink / raw)
  To: gcc-patches, libstdc++

From: Matthias Kretz <kretz@kde.org>

libstdc++-v3/ChangeLog:
	* testsuite/experimental/simd/generate_makefile.sh: Use
	different variables internally than documented for user
	overrides. This makes internal append/prepend work as intended.
---
 .../testsuite/experimental/simd/generate_makefile.sh  | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh b/
libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh
index 8d642a2941a..4fb710c7767 100755
--- a/libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh
+++ b/libstdc++-v3/testsuite/experimental/simd/generate_makefile.sh
@@ -85,19 +85,20 @@ CXX="$1"
 shift
 
 echo "TESTFLAGS ?=" > "$dst"
-[ -n "$testflags" ] && echo "TESTFLAGS := $testflags \$(TESTFLAGS)" >> "$dst"
-echo CXXFLAGS = "$@" "\$(TESTFLAGS)" >> "$dst"
+echo "test_flags := $testflags \$(TESTFLAGS)" >> "$dst"
+echo CXXFLAGS = "$@" "\$(test_flags)" >> "$dst"
 [ -n "$sim" ] && echo "export GCC_TEST_SIMULATOR = $sim" >> "$dst"
 cat >> "$dst" <<EOF
 srcdir = ${srcdir}
 CXX = ${CXX}
 DRIVER = ${driver}
 DRIVEROPTS ?=
+driveroptions := \$(DRIVEROPTS)
 
 all: simd_testsuite.sum
 
 simd_testsuite.sum: simd_testsuite.log
-	@printf "\n\t\t=== simd_testsuite \$(TESTFLAGS) Summary ===\n\n"\\
+	@printf "\n\t\t=== simd_testsuite \$(test_flags) Summary ===\n\n"\\
 	"# of expected passes:\t\t\$(shell grep -c '^PASS:' \$@)\n"\\
 	"# of unexpected passes:\t\t\$(shell grep -c '^XPASS:' \$@)\n"\\
 	"# of unexpected failures:\t\$(shell grep -c '^FAIL:' \$@)\n"\\
@@ -247,14 +248,14 @@ EOF
     for i in $(seq 0 9); do
       cat <<EOF
 %-$type-$i.log: \$(srcdir)/%.cc
-	@\$(DRIVER) \$(DRIVEROPTS) -t "$t" -a $i -n \$* \$(CXX) \$(CXXFLAGS)
+	@\$(DRIVER) \$(driveroptions) -t "$t" -a $i -n \$* \$(CXX) \$(CXXFLAGS)
 
 EOF
     done
   done
   cat <<EOF
 run-%: export GCC_TEST_RUN_EXPENSIVE=yes
-run-%: DRIVEROPTS=-v
+run-%: driveroptions += -v
 run-%: %.log
 	@rm \$^ \$(^:log=sum)
 
-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 07/16] Fix incorrect display of old test summaries
  2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
                   ` (4 preceding siblings ...)
  2021-01-27 20:42 ` [PATCH 06/16] Fix DRIVEROPTS and TESTFLAGS processing Matthias Kretz
@ 2021-01-27 20:42 ` Matthias Kretz
  2021-01-27 20:42 ` [PATCH 08/16] Immediate feedback with -v Matthias Kretz
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Matthias Kretz @ 2021-01-27 20:42 UTC (permalink / raw)
  To: gcc-patches, libstdc++

From: Matthias Kretz <kretz@kde.org>

libstdc++-v3/ChangeLog:
	* testsuite/Makefile.am: Ensure .simd.summary is empty before
	collecting a new summary.
	* testsuite/Makefile.in: Regenerate.
---
 libstdc++-v3/testsuite/Makefile.am | 1 +
 libstdc++-v3/testsuite/Makefile.in | 1 +
 2 files changed, 2 insertions(+)

diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/
Makefile.am
index 5dd109b40c9..2d3ad481dba 100644
--- a/libstdc++-v3/testsuite/Makefile.am
+++ b/libstdc++-v3/testsuite/Makefile.am
@@ -191,6 +191,7 @@ check-simd: $(srcdir)/experimental/simd/
generate_makefile.sh \
 	    ${glibcxx_srcdir}/scripts/check_simd \
 	    testsuite_files_simd \
 	    ${glibcxx_builddir}/scripts/testsuite_flags
+	@rm -f .simd.summary
 	${glibcxx_srcdir}/scripts/check_simd "${glibcxx_srcdir}" "$
{glibcxx_builddir}" "$(CXXFLAGS)" | \
 	  while read subdir; do \
 	    $(MAKE) -C "$${subdir}"; \
diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/
Makefile.in
index 3900d6d87b4..ac6207ae75c 100644
--- a/libstdc++-v3/testsuite/Makefile.in
+++ b/libstdc++-v3/testsuite/Makefile.in
@@ -716,6 +716,7 @@ check-simd: $(srcdir)/experimental/simd/
generate_makefile.sh \
 	    ${glibcxx_srcdir}/scripts/check_simd \
 	    testsuite_files_simd \
 	    ${glibcxx_builddir}/scripts/testsuite_flags
+	@rm -f .simd.summary
 	${glibcxx_srcdir}/scripts/check_simd "${glibcxx_srcdir}" "$
{glibcxx_builddir}" "$(CXXFLAGS)" | \
 	  while read subdir; do \
 	    $(MAKE) -C "$${subdir}"; \
-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 08/16] Immediate feedback with -v
  2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
                   ` (5 preceding siblings ...)
  2021-01-27 20:42 ` [PATCH 07/16] Fix incorrect display of old test summaries Matthias Kretz
@ 2021-01-27 20:42 ` Matthias Kretz
  2021-01-27 20:42 ` [PATCH 09/16] Fix mask reduction of simd_mask<double> on POWER7 Matthias Kretz
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Matthias Kretz @ 2021-01-27 20:42 UTC (permalink / raw)
  To: gcc-patches, libstdc++

[-- Attachment #1: Type: text/plain, Size: 1232 bytes --]

From: Matthias Kretz <kretz@kde.org>

libstdc++-v3/ChangeLog:
	* testsuite/experimental/simd/driver.sh: Remove executable on
	SIGINT. Process compiler and test executable output: In verbose
	mode print messages immediately, limited to 1000 lines and
	breaking long lines to below $COLUMNS (or 1024 if not set).
	Communicating the exit status of the compiler / test with the
	necessary pipe is done via a message through stdout/-in.
---
 .../testsuite/experimental/simd/driver.sh     | 194 +++++++++++-------
 1 file changed, 116 insertions(+), 78 deletions(-)


--
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────

[-- Attachment #2: 0008-Immediate-feedback-with-v.patch --]
[-- Type: text/x-patch, Size: 5566 bytes --]

diff --git a/libstdc++-v3/testsuite/experimental/simd/driver.sh b/libstdc++-v3/testsuite/experimental/simd/driver.sh
index cf07ff9ad85..314c6a16f86 100755
--- a/libstdc++-v3/testsuite/experimental/simd/driver.sh
+++ b/libstdc++-v3/testsuite/experimental/simd/driver.sh
@@ -172,81 +172,14 @@ unsupported() {
   echo "UNSUPPORTED: $src $type $abiflag ($*)" >> "$log"
 }
 
-verify_compilation() {
-  failed=$1
-  if [ $failed -eq 0 ]; then
-    warnings=$(grep -ic 'warning:' "$log")
-    if [ $warnings -gt 0 ]; then
-      fail "excess warnings:" $warnings
-      if $verbose; then
-        cat "$log"
-      elif ! $quiet; then
-        grep -i 'warning:' "$log" | head -n5
-      fi
-    elif [ "$xfail" = "compile" ]; then
-      xpass "test for excess errors"
-    else
-      pass "test for excess errors"
-    fi
-  else
-    if [ $failed -eq 124 ]; then
-      fail "timeout: test for excess errors"
-    else
-      errors=$(grep -ic 'error:' "$log")
-      if [ "$xfail" = "compile" ]; then
-        xfail "excess errors:" $errors
-        exit 0
-      else
-        fail "excess errors:" $errors
-      fi
-    fi
-    if $verbose; then
-      cat "$log"
-    elif ! $quiet; then
-      grep -i 'error:' "$log" | head -n5
-    fi
-    exit 0
-  fi
-}
-
-verify_test() {
-  failed=$1
-  if [ $failed -eq 0 ]; then
-    rm "$exe"
-    if [ "$xfail" = "run" ]; then
-      xpass "execution test"
-    else
-      pass "execution test"
-    fi
-  else
-    $keep_failed || rm "$exe"
-    if [ $failed -eq 124 ]; then
-      fail "timeout: execution test"
-    elif [ "$xfail" = "run" ]; then
-      xfail "execution test"
-    else
-      fail "execution test"
-    fi
-    if $verbose; then
-      lines=$(wc -l < "$log")
-      lines=$((lines-3))
-      if [ $lines -gt 1000 ]; then
-        echo "[...]"
-        tail -n1000 "$log"
-      else
-        tail -n$lines "$log"
-      fi
-    elif ! $quiet; then
-      grep -i fail "$log" | head -n5
-    fi
-    exit 0
-  fi
-}
-
 write_log_and_verbose() {
   echo "$*" >> "$log"
   if $verbose; then
-    echo "$*"
+    if [ -z "$COLUMNS" ] || ! type fmt>/dev/null; then
+      echo "$*"
+    else
+      echo "$*" | fmt -w $COLUMNS -s - || cat
+    fi
   fi
 }
 
@@ -277,7 +210,7 @@ test_selector() {
   return 1
 }
 
-trap "rm -f '$log' '$sum'; exit" INT
+trap "rm -f '$log' '$sum' $exe; exit" INT
 rm -f "$log" "$sum"
 touch "$log" "$sum"
 
@@ -317,17 +250,122 @@ if [ -n "$xfail" ]; then
   fi
 fi
 
+log_output() {
+  if $verbose; then
+    maxcol=${1:-1024}
+    awk "
+BEGIN { count = 0 }
+/^###exitstatus### [0-9]+$/ { exit \$2 }
+{
+  print >> \"$log\"
+  if (count >= 1000) next
+  ++count
+  if (length(\$0) > $maxcol) {
+    i = 1
+    while (i + $maxcol <= length(\$0)) {
+      len = $maxcol
+      line = substr(\$0, i, len)
+      len = match(line, / [^ ]*$/)
+      if (len <= 0) {
+        len = match(substr(\$0, i), / [^ ]/)
+        if (len <= 0) len = $maxcol
+      }
+      print substr(\$0, i, len)
+      i += len
+    }
+    print substr(\$0, i)
+  } else {
+    print
+  }
+}
+END { close(\"$log\") }
+"
+  else
+    awk "
+/^###exitstatus### [0-9]+$/ { exit \$2 }
+{ print >> \"$log\" }
+END { close(\"$log\") }
+"
+  fi
+}
+
+verify_compilation() {
+  log_output $COLUMNS
+  exitstatus=$?
+  if [ $exitstatus -eq 0 ]; then
+    warnings=$(grep -ic 'warning:' "$log")
+    if [ $warnings -gt 0 ]; then
+      fail "excess warnings:" $warnings
+      if ! $verbose && ! $quiet; then
+        grep -i 'warning:' "$log" | head -n5
+      fi
+    elif [ "$xfail" = "compile" ]; then
+      xpass "test for excess errors"
+    else
+      pass "test for excess errors"
+    fi
+    return 0
+  else
+    if [ $exitstatus -eq 124 ]; then
+      fail "timeout: test for excess errors"
+    else
+      errors=$(grep -ic 'error:' "$log")
+      if [ "$xfail" = "compile" ]; then
+        xfail "excess errors:" $errors
+        exit 0
+      else
+        fail "excess errors:" $errors
+      fi
+    fi
+    if ! $verbose && ! $quiet; then
+      grep -i 'error:' "$log" | head -n5
+    fi
+    return 1
+  fi
+}
+
+verify_test() {
+  log_output $COLUMNS
+  exitstatus=$?
+  if [ $exitstatus -eq 0 ]; then
+    if [ "$xfail" = "run" ]; then
+      $keep_failed || rm "$exe"
+      xpass "execution test"
+    else
+      rm "$exe"
+      pass "execution test"
+    fi
+    return 0
+  else
+    $keep_failed || rm "$exe"
+    if ! $verbose && ! $quiet; then
+      grep -i fail "$log" | head -n5
+    fi
+    if [ $exitstatus -eq 124 ]; then
+      fail "timeout: execution test"
+    elif [ "$xfail" = "run" ]; then
+      xfail "execution test"
+    else
+      fail "execution test"
+    fi
+    return 1
+  fi
+}
+
 write_log_and_verbose "$CXX $src $@ -D_GLIBCXX_SIMD_TESTTYPE=$type $abiflag -o $exe"
-timeout --foreground $timeout "$CXX" "$src" "$@" "-D_GLIBCXX_SIMD_TESTTYPE=$type" $abiflag -o "$exe" >> "$log" 2>&1
-verify_compilation $?
+{
+  timeout --foreground $timeout "$CXX" "$src" "$@" "-D_GLIBCXX_SIMD_TESTTYPE=$type" $abiflag -o "$exe" 2>&1 <&-
+  printf "###exitstatus### %d\n" $?
+} | verify_compilation || exit 0
 if [ -n "$sim" ]; then
   write_log_and_verbose "$sim ./$exe"
-  timeout --foreground $timeout $sim "./$exe" >> "$log" 2>&1 <&-
 else
   write_log_and_verbose "./$exe"
   timeout=$(awk "BEGIN { print int($timeout / 2) }")
-  timeout --foreground $timeout "./$exe" >> "$log" 2>&1 <&-
 fi
-verify_test $?
+{
+  timeout --foreground $timeout $sim "./$exe" 2>&1 <&-
+  printf "###exitstatus### %d\n" $?
+} | verify_test || exit 0
 
 # vim: sw=2 et cc=81 si

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 09/16] Fix mask reduction of simd_mask<double> on POWER7
  2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
                   ` (6 preceding siblings ...)
  2021-01-27 20:42 ` [PATCH 08/16] Immediate feedback with -v Matthias Kretz
@ 2021-01-27 20:42 ` Matthias Kretz
  2021-01-27 20:42 ` [PATCH 10/16] Skip testing hypot3 for long double on PPC Matthias Kretz
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Matthias Kretz @ 2021-01-27 20:42 UTC (permalink / raw)
  To: gcc-patches, libstdc++

From: Matthias Kretz <kretz@kde.org>

POWER7 does not support __vector long long reductions, making the
generic _S_popcount implementation ill-formed. Specializing _S_popcount
for PPC allows optimization and avoids the issue.

libstdc++-v3/ChangeLog:
	* include/experimental/bits/simd.h: Add __have_power10vec
	conditional on _ARCH_PWR10.
	* include/experimental/bits/simd_builtin.h: Forward declare
	_MaskImplPpc and use it as _MaskImpl when __ALTIVEC__ is
	defined.
	(_MaskImplBuiltin::_S_some_of): Call _S_popcount from the
	_SuperImpl for optimizations and correctness.
	* include/experimental/bits/simd_ppc.h: Add _MaskImplPpc.
	(_MaskImplPpc::_S_popcount): Implement via vec_cntm for POWER10.
	Otherwise, for >=int use -vec_sums divided by a sizeof factor.
	For <int use -vec_sums(vec_sum4s(...)) to sum all mask entries.
---
 libstdc++-v3/include/experimental/bits/simd.h |  5 +++
 .../include/experimental/bits/simd_builtin.h  |  6 ++--
 .../include/experimental/bits/simd_ppc.h      | 35 ++++++++++++++++++-
 3 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/
include/experimental/bits/simd.h
index 9685df0be9e..14179491f9d 100644
--- a/libstdc++-v3/include/experimental/bits/simd.h
+++ b/libstdc++-v3/include/experimental/bits/simd.h
@@ -477,6 +477,11 @@ constexpr inline bool __support_neon_float =
   false;
 #endif
 
+#ifdef _ARCH_PWR10
+constexpr inline bool __have_power10vec = true;
+#else
+constexpr inline bool __have_power10vec = false;
+#endif
 #ifdef __POWER9_VECTOR__
 constexpr inline bool __have_power9vec = true;
 #else
diff --git a/libstdc++-v3/include/experimental/bits/simd_builtin.h b/libstdc+
+-v3/include/experimental/bits/simd_builtin.h
index f2c99faa4ee..044edc93317 100644
--- a/libstdc++-v3/include/experimental/bits/simd_builtin.h
+++ b/libstdc++-v3/include/experimental/bits/simd_builtin.h
@@ -920,6 +920,7 @@ template <typename _Abi> struct _MaskImplX86;
 template <typename _Abi> struct _SimdImplNeon;
 template <typename _Abi> struct _MaskImplNeon;
 template <typename _Abi> struct _SimdImplPpc;
+template <typename _Abi> struct _MaskImplPpc;
 
 // simd_abi::_VecBuiltin {{{
 template <int _UsedBytes>
@@ -959,10 +960,11 @@ template <int _UsedBytes>
     using _CommonImpl = _CommonImplBuiltin;
 #ifdef __ALTIVEC__
     using _SimdImpl = _SimdImplPpc<_VecBuiltin<_UsedBytes>>;
+    using _MaskImpl = _MaskImplPpc<_VecBuiltin<_UsedBytes>>;
 #else
     using _SimdImpl = _SimdImplBuiltin<_VecBuiltin<_UsedBytes>>;
-#endif
     using _MaskImpl = _MaskImplBuiltin<_VecBuiltin<_UsedBytes>>;
+#endif
 #endif
 
     // }}}
@@ -2899,7 +2901,7 @@ template <typename _Abi>
       _GLIBCXX_SIMD_INTRINSIC static bool
       _S_some_of(simd_mask<_Tp, _Abi> __k)
       {
-	const int __n_true = _S_popcount(__k);
+	const int __n_true = _SuperImpl::_S_popcount(__k);
 	return __n_true > 0 && __n_true < int(_S_size<_Tp>);
       }
 
diff --git a/libstdc++-v3/include/experimental/bits/simd_ppc.h b/libstdc++-v3/
include/experimental/bits/simd_ppc.h
index c00d2323ac6..1d649931eb9 100644
--- a/libstdc++-v3/include/experimental/bits/simd_ppc.h
+++ b/libstdc++-v3/include/experimental/bits/simd_ppc.h
@@ -30,6 +30,7 @@
 #ifndef __ALTIVEC__
 #error "simd_ppc.h may only be included when AltiVec/VMX is available"
 #endif
+#include <altivec.h>
 
 _GLIBCXX_SIMD_BEGIN_NAMESPACE
 
@@ -114,10 +115,42 @@ template <typename _Abi>
     // }}}
   };
 
+// }}}
+// _MaskImplPpc {{{
+template <typename _Abi>
+  struct _MaskImplPpc : _MaskImplBuiltin<_Abi>
+  {
+    using _Base = _MaskImplBuiltin<_Abi>;
+
+    // _S_popcount {{{
+    template <typename _Tp>
+      _GLIBCXX_SIMD_INTRINSIC static int _S_popcount(simd_mask<_Tp, _Abi> 
__k)
+      {
+	const auto __kv = __as_vector(__k);
+	if constexpr (__have_power10vec)
+	  {
+	    return vec_cntm(__to_intrin(__kv), 1);
+	  }
+	else if constexpr (sizeof(_Tp) >= sizeof(int))
+	  {
+	    using _Intrin = __intrinsic_type16_t<int>;
+	    const int __sum = -vec_sums(__intrin_bitcast<_Intrin>(__kv), 
_Intrin())[3];
+	    return __sum / (sizeof(_Tp) / sizeof(int));
+	  }
+	else
+	  {
+	    const auto __summed_to_int = vec_sum4s(__to_intrin(__kv), 
__intrinsic_type16_t<int>());
+	    return -vec_sums(__summed_to_int, __intrinsic_type16_t<int>())[3];
+	  }
+      }
+
+    // }}}
+  };
+
 // }}}
 
 _GLIBCXX_SIMD_END_NAMESPACE
 #endif // __cplusplus >= 201703L
 #endif // _GLIBCXX_EXPERIMENTAL_SIMD_PPC_H_
 
-// vim: foldmethod=marker sw=2 noet ts=8 sts=2 tw=80
+// vim: foldmethod=marker foldmarker={{{,}}} sw=2 noet ts=8 sts=2 tw=100
-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────





^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 10/16] Skip testing hypot3 for long double on PPC
  2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
                   ` (7 preceding siblings ...)
  2021-01-27 20:42 ` [PATCH 09/16] Fix mask reduction of simd_mask<double> on POWER7 Matthias Kretz
@ 2021-01-27 20:42 ` Matthias Kretz
  2021-01-27 20:42 ` [PATCH 11/16] Abort test after 1000 lines of output Matthias Kretz
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Matthias Kretz @ 2021-01-27 20:42 UTC (permalink / raw)
  To: gcc-patches, libstdc++

From: Matthias Kretz <kretz@kde.org>

std::hypot(a, b, c) is imprecise and makes this test fail even though
the failure is unrelated to simd.

libstdc++-v3/ChangeLog:
	* testsuite/experimental/simd/tests/hypot3_fma.cc: Add skip:
	markup for long double on powerpc64*.
---
 libstdc++-v3/testsuite/experimental/simd/tests/hypot3_fma.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/hypot3_fma.cc b/
libstdc++-v3/testsuite/experimental/simd/tests/hypot3_fma.cc
index 689a90c10a5..94d267fccfb 100644
--- a/libstdc++-v3/testsuite/experimental/simd/tests/hypot3_fma.cc
+++ b/libstdc++-v3/testsuite/experimental/simd/tests/hypot3_fma.cc
@@ -16,6 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // only: float|double|ldouble * * *
+// skip: ldouble * powerpc64* *
 // expensive: * [1-9] * *
 #include "bits/verify.h"
 #include "bits/metahelpers.h"
-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 11/16] Abort test after 1000 lines of output
  2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
                   ` (8 preceding siblings ...)
  2021-01-27 20:42 ` [PATCH 10/16] Skip testing hypot3 for long double on PPC Matthias Kretz
@ 2021-01-27 20:42 ` Matthias Kretz
  2021-01-27 20:42 ` [PATCH 12/16] Support timeout and timeout-factor options Matthias Kretz
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Matthias Kretz @ 2021-01-27 20:42 UTC (permalink / raw)
  To: gcc-patches, libstdc++

From: Matthias Kretz <kretz@kde.org>

Handle overly large output by aborting the log and thus the test. This
is a similar condition to a timeout.

libstdc++-v3/ChangeLog:
	* testsuite/experimental/simd/driver.sh: When handling the pipe
	to log (and on verbose to stdout) count the lines. If it exceeds
	1000 log the issue and exit 125, which is then handled as a
	failure.
---
 .../testsuite/experimental/simd/driver.sh       | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/testsuite/experimental/simd/driver.sh b/libstdc++-
v3/testsuite/experimental/simd/driver.sh
index 314c6a16f86..719e4db8e68 100755
--- a/libstdc++-v3/testsuite/experimental/simd/driver.sh
+++ b/libstdc++-v3/testsuite/experimental/simd/driver.sh
@@ -258,7 +258,11 @@ BEGIN { count = 0 }
 /^###exitstatus### [0-9]+$/ { exit \$2 }
 {
   print >> \"$log\"
-  if (count >= 1000) next
+  if (count >= 1000) {
+    print \"Aborting: too much output\" >> \"$log\"
+    print \"Aborting: too much output\"
+    exit 125
+  }
   ++count
   if (length(\$0) > $maxcol) {
     i = 1
@@ -282,8 +286,17 @@ END { close(\"$log\") }
 "
   else
     awk "
+BEGIN { count = 0 }
 /^###exitstatus### [0-9]+$/ { exit \$2 }
-{ print >> \"$log\" }
+{
+  print >> \"$log\"
+  if (count >= 1000) {
+    print \"Aborting: too much output\" >> \"$log\"
+    print \"Aborting: too much output\"
+    exit 125
+  }
+  ++count
+}
 END { close(\"$log\") }
 "
   fi
-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 12/16] Support timeout and timeout-factor options
  2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
                   ` (9 preceding siblings ...)
  2021-01-27 20:42 ` [PATCH 11/16] Abort test after 1000 lines of output Matthias Kretz
@ 2021-01-27 20:42 ` Matthias Kretz
  2021-01-27 20:42 ` [PATCH 13/16] Improve test codegen for interpreting assembly Matthias Kretz
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 19+ messages in thread
From: Matthias Kretz @ 2021-01-27 20:42 UTC (permalink / raw)
  To: gcc-patches, libstdc++

From: Matthias Kretz <kretz@kde.org>

libstdc++-v3/ChangeLog:
	* testsuite/experimental/simd/driver.sh: Abstract reading test
	options into read_src_option function. Read skip, only,
	expensive, and xfail via read_src_option. Add timeout and
	timeout-factor options and adjust timeout variable accordingly.
	* testsuite/experimental/simd/tests/loadstore.cc: Set
	timeout-factor 2.
---
 .../testsuite/experimental/simd/driver.sh     | 38 +++++++++++++------
 .../experimental/simd/tests/loadstore.cc      |  1 +
 2 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/libstdc++-v3/testsuite/experimental/simd/driver.sh b/libstdc++-
v3/testsuite/experimental/simd/driver.sh
index 719e4db8e68..71e0c7d5ee8 100755
--- a/libstdc++-v3/testsuite/experimental/simd/driver.sh
+++ b/libstdc++-v3/testsuite/experimental/simd/driver.sh
@@ -214,35 +214,43 @@ trap "rm -f '$log' '$sum' $exe; exit" INT
 rm -f "$log" "$sum"
 touch "$log" "$sum"
 
-skip="$(head -n25 "$src" | grep '^//\s*skip: ')"
-if [ -n "$skip" ]; then
-  skip="$(echo "$skip" | sed -e 's/^.*:\s*//' -e 's/ \+/ /g')"
+read_src_option() {
+  local key tmp var
+  key="$1"
+  var="$2"
+  [ -z "$var" ] && var="$1"
+  local tmp="$(head -n25 "$src" | grep "^//\\s*${key}: ")"
+  if [ -n "$tmp" ]; then
+    tmp="$(echo "${tmp#//*${key}: }" | sed -e 's/ \+/ /g' -e 's/^ //' -e 's/ 
$//')"
+    eval "$var=\"$tmp\""
+  else
+    return 1
+  fi
+}
+
+if read_src_option skip; then
   if test_selector "$skip"; then
     # silently skip this test
     exit 0
   fi
 fi
-only="$(head -n25 "$src" | grep '^//\s*only: ')"
-if [ -n "$only" ]; then
-  only="$(echo "$only" | sed -e 's/^.*:\s*//' -e 's/ \+/ /g')"
+if read_src_option only; then
   if ! test_selector "$only"; then
     # silently skip this test
     exit 0
   fi
 fi
+
 if ! $run_expensive; then
-  expensive="$(head -n25 "$src" | grep '^//\s*expensive: ')"
-  if [ -n "$expensive" ]; then
-    expensive="$(echo "$expensive" | sed -e 's/^.*:\s*//' -e 's/ \+/ /g')"
+  if read_src_option expensive; then
     if test_selector "$expensive"; then
       unsupported "skip expensive tests"
       exit 0
     fi
   fi
 fi
-xfail="$(head -n25 "$src" | grep '^//\s*xfail: ')"
-if [ -n "$xfail" ]; then
-  xfail="$(echo "$xfail" | sed -e 's/^.*:\s*//' -e 's/ \+/ /g')"
+
+if read_src_option xfail; then
   if test_selector "${xfail#* }"; then
     xfail="${xfail%% *}"
   else
@@ -250,6 +258,12 @@ if [ -n "$xfail" ]; then
   fi
 fi
 
+read_src_option timeout
+
+if read_src_option timeout-factor factor; then
+  timeout=$(awk "BEGIN { print int($timeout * $factor) }")
+fi
+
 log_output() {
   if $verbose; then
     maxcol=${1:-1024}
diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/loadstore.cc b/
libstdc++-v3/testsuite/experimental/simd/tests/loadstore.cc
index dd7d6c30e8c..cd27c3a7426 100644
--- a/libstdc++-v3/testsuite/experimental/simd/tests/loadstore.cc
+++ b/libstdc++-v3/testsuite/experimental/simd/tests/loadstore.cc
@@ -16,6 +16,7 @@
 // <http://www.gnu.org/licenses/>.
 
 // expensive: * [1-9] * *
+// timeout-factor: 2
 #include "bits/verify.h"
 #include "bits/make_vec.h"
 #include "bits/conversions.h"
-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────





^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 13/16] Improve test codegen for interpreting assembly
  2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
                   ` (10 preceding siblings ...)
  2021-01-27 20:42 ` [PATCH 12/16] Support timeout and timeout-factor options Matthias Kretz
@ 2021-01-27 20:42 ` Matthias Kretz
  2021-02-02 15:02   ` Jonathan Wakely
  2021-01-27 20:42 ` [PATCH 14/16] Implement hmin and hmax Matthias Kretz
                   ` (3 subsequent siblings)
  15 siblings, 1 reply; 19+ messages in thread
From: Matthias Kretz @ 2021-01-27 20:42 UTC (permalink / raw)
  To: gcc-patches, libstdc++

From: Matthias Kretz <kretz@kde.org>

In many failure cases it is helpful to inspect the instructions leading
up to the test failure. After this change the location is easier to find
and the branch after failure is easier to find.

libstdc++-v3/ChangeLog:
	* testsuite/experimental/simd/tests/bits/verify.h (verify): Add
	instruction pointer data member. Ensure that the `if (m_failed)`
	branch is always inlined into the calling code. The body of the
	conditional can still be a function call. Move the get_ip call
	into the verify ctor to simplify the ctor calls.
	(COMPARE): Don't mention the use of all_of for reduction of a
	simd_mask. It only distracts from the real issue.
---
 .../experimental/simd/tests/bits/verify.h     | 44 +++++++++----------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h b/
libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h
index 5da47b35536..17bda71b77e 100644
--- a/libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h
+++ b/libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h
@@ -60,6 +60,7 @@ template <class T>
 class verify
 {
   const bool m_failed = false;
+  size_t m_ip = 0;
 
   template <typename T,
 	    typename = decltype(std::declval<std::stringstream&>()
@@ -129,20 +130,21 @@ class verify
 
 public:
   template <typename... Ts>
-    verify(bool ok, size_t ip, const char* file, const int line,
+    [[gnu::always_inline]]
+    verify(bool ok, const char* file, const int line,
 	   const char* func, const char* cond, const Ts&... extra_info)
-    : m_failed(!ok)
+    : m_failed(!ok), m_ip(get_ip())
     {
       if (m_failed)
-	{
+	[&] {
 	  __builtin_fprintf(stderr, "%s:%d: (%s):\nInstruction Pointer: %x\n"
 				    "Assertion '%s' failed.\n",
-			    file, line, func, ip, cond);
+			    file, line, func, m_ip, cond);
 	  (print(extra_info, int()), ...);
-	}
+	}();
     }
 
-  ~verify()
+  [[gnu::always_inline]] ~verify()
   {
     if (m_failed)
       {
@@ -152,26 +154,27 @@ public:
   }
 
   template <typename T>
+    [[gnu::always_inline]]
     const verify&
     operator<<(const T& x) const
     {
       if (m_failed)
-	{
-	  print(x, int());
-	}
+	print(x, int());
       return *this;
     }
 
   template <typename... Ts>
+    [[gnu::always_inline]]
     const verify&
     on_failure(const Ts&... xs) const
     {
       if (m_failed)
-	(print(xs, int()), ...);
+	[&] { (print(xs, int()), ...); }();
       return *this;
     }
 
-  [[gnu::always_inline]] static inline size_t
+  [[gnu::always_inline]] static inline
+  size_t
   get_ip()
   {
     size_t _ip = 0;
@@ -220,24 +223,21 @@ template <typename T>
 
 #define COMPARE(_a, _b)                                                        
\
   [&](auto&& _aa, auto&& _bb) {                                                
\
-    return verify(std::experimental::all_of(_aa == _bb), verify::get_ip(),     
\
-		  __FILE__, __LINE__, __PRETTY_FUNCTION__,                     \
-		  "all_of(" #_a " == " #_b ")", #_a " = ", _aa,                \
+    return verify(std::experimental::all_of(_aa == _bb), __FILE__, __LINE__,   
\
+		  __PRETTY_FUNCTION__, #_a " == " #_b, #_a " = ", _aa,         \
 		  "\n" #_b " = ", _bb);                                        \
   }(force_fp_truncation(_a), force_fp_truncation(_b))
 #else
 #define COMPARE(_a, _b)                                                        
\
   [&](auto&& _aa, auto&& _bb) {                                                
\
-    return verify(std::experimental::all_of(_aa == _bb), verify::get_ip(),     
\
-		  __FILE__, __LINE__, __PRETTY_FUNCTION__,                     \
-		  "all_of(" #_a " == " #_b ")", #_a " = ", _aa,                \
+    return verify(std::experimental::all_of(_aa == _bb), __FILE__, __LINE__,   
\
+		  __PRETTY_FUNCTION__, #_a " == " #_b, #_a " = ", _aa,         \
 		  "\n" #_b " = ", _bb);                                        \
   }((_a), (_b))
 #endif
 
 #define VERIFY(_test)                                                          
\
-  verify(_test, verify::get_ip(), __FILE__, __LINE__, __PRETTY_FUNCTION__,     
\
-	 #_test)
+  verify(_test, __FILE__, __LINE__, __PRETTY_FUNCTION__, #_test)
 
   // ulp_distance_signed can raise FP exceptions and thus must be 
conditionally
   // executed
@@ -245,9 +245,9 @@ template <typename T>
   [&](auto&& _aa, auto&& _bb) {                                                
\
     const bool success = std::experimental::all_of(                            
\
       vir::test::ulp_distance(_aa, _bb) <= (_allowed_distance));               
\
-    return verify(success, verify::get_ip(), __FILE__, __LINE__,               
\
-		  __PRETTY_FUNCTION__, "all_of(" #_a " ~~ " #_b ")",           \
-		  #_a " = ", _aa, "\n" #_b " = ", _bb, "\ndistance = ",        \
+    return verify(success, __FILE__, __LINE__, __PRETTY_FUNCTION__,            
\
+		  #_a " ~~ " #_b, #_a " = ", _aa, "\n" #_b " = ", _bb,         \
+		  "\ndistance = ",                                             \
 		  success ? 0 : vir::test::ulp_distance_signed(_aa, _bb));     \
   }((_a), (_b))
 
-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────





^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 14/16] Implement hmin and hmax
  2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
                   ` (11 preceding siblings ...)
  2021-01-27 20:42 ` [PATCH 13/16] Improve test codegen for interpreting assembly Matthias Kretz
@ 2021-01-27 20:42 ` Matthias Kretz
  2021-02-01 10:23   ` Matthias Kretz
  2021-01-27 20:42 ` [PATCH 15/16] Work around test failures using -mno-tree-vrp Matthias Kretz
                   ` (2 subsequent siblings)
  15 siblings, 1 reply; 19+ messages in thread
From: Matthias Kretz @ 2021-01-27 20:42 UTC (permalink / raw)
  To: gcc-patches, libstdc++

From: Matthias Kretz <kretz@kde.org>

From 9.7.4 in Parallelism TS 2. For some reason I overlooked these two
functions. Implement them via call to _S_reduce.

libstdc++-v3/ChangeLog:
	* include/experimental/bits/simd.h: Add __detail::_Minimum and
	__detail::_Maximum to use them as _BinaryOperation to _S_reduce.
	Add hmin and hmax overloads for simd and const_where_expression.
	* include/experimental/bits/simd_scalar.h
	(_SimdImplScalar::_S_reduce): Make unused _BinaryOperation
	parameter const-ref to allow calling _S_reduce with an rvalue.
	* testsuite/experimental/simd/tests/reductions.cc: Add tests for
	hmin and hmax. Since the compiler statically determined that all
	tests pass, repeat the test after a call to make_value_unknown.
---
 libstdc++-v3/include/experimental/bits/simd.h | 78 ++++++++++++++++++-
 .../include/experimental/bits/simd_scalar.h   |  2 +-
 .../experimental/simd/tests/reductions.cc     | 21 +++++
 3 files changed, 99 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/
include/experimental/bits/simd.h
index 14179491f9d..f08ef4c027d 100644
--- a/libstdc++-v3/include/experimental/bits/simd.h
+++ b/libstdc++-v3/include/experimental/bits/simd.h
@@ -204,6 +204,27 @@ template <size_t _Np>
 template <size_t _X>
   using _SizeConstant = integral_constant<size_t, _X>;
 
+namespace __detail {
+  struct _Minimum {
+    template <typename _Tp>
+      _GLIBCXX_SIMD_INTRINSIC constexpr
+      _Tp
+      operator()(_Tp __a, _Tp __b) const {
+	using std::min;
+	return min(__a, __b);
+      }
+  };
+  struct _Maximum {
+    template <typename _Tp>
+      _GLIBCXX_SIMD_INTRINSIC constexpr
+      _Tp
+      operator()(_Tp __a, _Tp __b) const {
+	using std::max;
+	return max(__a, __b);
+      }
+  };
+} // namespace __detail
+
 // unrolled/pack execution helpers
 // __execute_n_times{{{
 template <typename _Fp, size_t... _I>
@@ -3408,7 +3429,7 @@ template <typename _Tp, typename _Ap>
 
 // }}}1
 // reductions [simd.reductions] {{{1
-  template <typename _Tp, typename _Abi, typename _BinaryOperation = plus<>>
+template <typename _Tp, typename _Abi, typename _BinaryOperation = plus<>>
   _GLIBCXX_SIMD_INTRINSIC _GLIBCXX_SIMD_CONSTEXPR _Tp
   reduce(const simd<_Tp, _Abi>& __v,
 	 _BinaryOperation __binary_op = _BinaryOperation())
@@ -3454,6 +3475,61 @@ template <typename _M, typename _V>
   reduce(const const_where_expression<_M, _V>& __x, bit_xor<> __binary_op)
   { return reduce(__x, 0, __binary_op); }
 
+template <typename _Tp, typename _Abi>
+  _GLIBCXX_SIMD_INTRINSIC _GLIBCXX_SIMD_CONSTEXPR _Tp
+  hmin(const simd<_Tp, _Abi>& __v) noexcept
+  {
+    return _Abi::_SimdImpl::_S_reduce(__v, __detail::_Minimum());
+  }
+
+template <typename _Tp, typename _Abi>
+  _GLIBCXX_SIMD_INTRINSIC _GLIBCXX_SIMD_CONSTEXPR _Tp
+  hmax(const simd<_Tp, _Abi>& __v) noexcept
+  {
+    return _Abi::_SimdImpl::_S_reduce(__v, __detail::_Maximum());
+  }
+
+template <typename _M, typename _V>
+  _GLIBCXX_SIMD_INTRINSIC _GLIBCXX_SIMD_CONSTEXPR
+  typename _V::value_type
+  hmin(const const_where_expression<_M, _V>& __x) noexcept
+  {
+    using _Tp = typename _V::value_type;
+    constexpr _Tp __id_elem =
+#ifdef __FINITE_MATH_ONLY__
+      __finite_max_v<_Tp>;
+#else
+      __value_or<__infinity, _Tp>(__finite_max_v<_Tp>);
+#endif
+    _V __tmp = __id_elem;
+    _V::_Impl::_S_masked_assign(__data(__get_mask(__x)), __data(__tmp),
+				__data(__get_lvalue(__x)));
+    return _V::abi_type::_SimdImpl::_S_reduce(__tmp, __detail::_Minimum());
+  }
+
+template <typename _M, typename _V>
+  _GLIBCXX_SIMD_INTRINSIC _GLIBCXX_SIMD_CONSTEXPR
+  typename _V::value_type
+  hmax(const const_where_expression<_M, _V>& __x) noexcept
+  {
+    using _Tp = typename _V::value_type;
+    constexpr _Tp __id_elem =
+#ifdef __FINITE_MATH_ONLY__
+      __finite_min_v<_Tp>;
+#else
+      [] {
+	if constexpr (__value_exists_v<__infinity, _Tp>)
+	  return -__infinity_v<_Tp>;
+	else
+	  return __finite_min_v<_Tp>;
+      }();
+#endif
+    _V __tmp = __id_elem;
+    _V::_Impl::_S_masked_assign(__data(__get_mask(__x)), __data(__tmp),
+				__data(__get_lvalue(__x)));
+    return _V::abi_type::_SimdImpl::_S_reduce(__tmp, __detail::_Maximum());
+  }
+
 // }}}1
 // algorithms [simd.alg] {{{
 template <typename _Tp, typename _Ap>
diff --git a/libstdc++-v3/include/experimental/bits/simd_scalar.h b/libstdc++-
v3/include/experimental/bits/simd_scalar.h
index 7680bc39c30..7e480ecdb37 100644
--- a/libstdc++-v3/include/experimental/bits/simd_scalar.h
+++ b/libstdc++-v3/include/experimental/bits/simd_scalar.h
@@ -182,7 +182,7 @@ struct _SimdImplScalar
   // _S_reduce {{{2
   template <typename _Tp, typename _BinaryOperation>
     static constexpr inline _Tp
-    _S_reduce(const simd<_Tp, simd_abi::scalar>& __x, _BinaryOperation&)
+    _S_reduce(const simd<_Tp, simd_abi::scalar>& __x, const 
_BinaryOperation&)
     { return __x._M_data; }
 
   // _S_min, _S_max {{{2
diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/reductions.cc b/
libstdc++-v3/testsuite/experimental/simd/tests/reductions.cc
index 9d897d5ccd6..02df68fafbc 100644
--- a/libstdc++-v3/testsuite/experimental/simd/tests/reductions.cc
+++ b/libstdc++-v3/testsuite/experimental/simd/tests/reductions.cc
@@ -57,6 +57,8 @@ template <typename V>
     }
 
     {
+      COMPARE(hmin(V(1)), T(1));
+      COMPARE(hmax(V(1)), T(1));
       const V z([](T i) { return i + 1; });
       COMPARE(std::experimental::reduce(z,
 					[](auto a, auto b) {
@@ -79,6 +81,25 @@ template <typename V>
 					}),
 	      T(V::size() == 1 ? 117 : 2))
 	<< "z: " << z;
+      COMPARE(hmin(z), T(1));
+      COMPARE(hmax(z), T(V::size()));
+      if (V::size() > 1)
+	{
+	  COMPARE(hmin(where(z > 1, z)), T(2));
+	  COMPARE(hmax(where(z > 1, z)), T(V::size()));
+	}
+      COMPARE(hmin(where(z < 4, z)), T(1));
+      COMPARE(hmax(where(z < 4, z)), std::min(T(V::size()), T(3)));
+      const V zz = make_value_unknown(z);
+      COMPARE(hmin(zz), T(1));
+      COMPARE(hmax(zz), T(V::size()));
+      if (V::size() > 1)
+	{
+	  COMPARE(hmin(where(zz > 1, zz)), T(2));
+	  COMPARE(hmax(where(zz > 1, zz)), T(V::size()));
+	}
+      COMPARE(hmin(where(zz < 4, zz)), T(1));
+      COMPARE(hmax(where(zz < 4, zz)), std::min(T(V::size()), T(3)));
     }
 
     test_values<V>({}, {1000}, [](V x) {
-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────





^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 15/16] Work around test failures using -mno-tree-vrp
  2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
                   ` (12 preceding siblings ...)
  2021-01-27 20:42 ` [PATCH 14/16] Implement hmin and hmax Matthias Kretz
@ 2021-01-27 20:42 ` Matthias Kretz
  2021-01-27 20:42 ` [PATCH 16/16] Improve "find_first/last_set" for NEON Matthias Kretz
  2021-02-03 15:52 ` [PATCH 00/16] stdx::simd fixes and testsuite improvements Jonathan Wakely
  15 siblings, 0 replies; 19+ messages in thread
From: Matthias Kretz @ 2021-01-27 20:42 UTC (permalink / raw)
  To: gcc-patches, libstdc++

From: Matthias Kretz <kretz@kde.org>

This is necessary to avoid failures resulting from PR98834.

libstdc++-v3/ChangeLog:
	* testsuite/Makefile.am: Warn about the workaround. Add
	-fno-tree-vrp to CXXFLAGS passed to the check_simd script.
	Improve initial user feedback from make check-simd.
	* testsuite/Makefile.in: Regenerated.
---
 libstdc++-v3/testsuite/Makefile.am | 4 +++-
 libstdc++-v3/testsuite/Makefile.in | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/libstdc++-v3/testsuite/Makefile.am b/libstdc++-v3/testsuite/
Makefile.am
index 2d3ad481dba..ba5023a8b54 100644
--- a/libstdc++-v3/testsuite/Makefile.am
+++ b/libstdc++-v3/testsuite/Makefile.am
@@ -191,8 +191,10 @@ check-simd: $(srcdir)/experimental/simd/
generate_makefile.sh \
 	    ${glibcxx_srcdir}/scripts/check_simd \
 	    testsuite_files_simd \
 	    ${glibcxx_builddir}/scripts/testsuite_flags
+	@echo "WARNING: Adding -fno-tree-vrp to CXXFLAGS to work around 
PR98834."
 	@rm -f .simd.summary
-	${glibcxx_srcdir}/scripts/check_simd "${glibcxx_srcdir}" "$
{glibcxx_builddir}" "$(CXXFLAGS)" | \
+	@echo "Generating simd testsuite subdirs and Makefiles ..."
+	@${glibcxx_srcdir}/scripts/check_simd "${glibcxx_srcdir}" "$
{glibcxx_builddir}" "$(CXXFLAGS) -fno-tree-vrp" | \
 	  while read subdir; do \
 	    $(MAKE) -C "$${subdir}"; \
 	    tail -n20 $${subdir}/simd_testsuite.sum | \
diff --git a/libstdc++-v3/testsuite/Makefile.in b/libstdc++-v3/testsuite/
Makefile.in
index ac6207ae75c..c9dd7f5da61 100644
--- a/libstdc++-v3/testsuite/Makefile.in
+++ b/libstdc++-v3/testsuite/Makefile.in
@@ -716,8 +716,10 @@ check-simd: $(srcdir)/experimental/simd/
generate_makefile.sh \
 	    ${glibcxx_srcdir}/scripts/check_simd \
 	    testsuite_files_simd \
 	    ${glibcxx_builddir}/scripts/testsuite_flags
+	@echo "WARNING: Adding -fno-tree-vrp to CXXFLAGS to work around 
PR98834."
 	@rm -f .simd.summary
-	${glibcxx_srcdir}/scripts/check_simd "${glibcxx_srcdir}" "$
{glibcxx_builddir}" "$(CXXFLAGS)" | \
+	@echo "Generating simd testsuite subdirs and Makefiles ..."
+	@${glibcxx_srcdir}/scripts/check_simd "${glibcxx_srcdir}" "$
{glibcxx_builddir}" "$(CXXFLAGS) -fno-tree-vrp" | \
 	  while read subdir; do \
 	    $(MAKE) -C "$${subdir}"; \
 	    tail -n20 $${subdir}/simd_testsuite.sum | \
-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH 16/16] Improve "find_first/last_set" for NEON
  2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
                   ` (13 preceding siblings ...)
  2021-01-27 20:42 ` [PATCH 15/16] Work around test failures using -mno-tree-vrp Matthias Kretz
@ 2021-01-27 20:42 ` Matthias Kretz
  2021-02-03 15:52 ` [PATCH 00/16] stdx::simd fixes and testsuite improvements Jonathan Wakely
  15 siblings, 0 replies; 19+ messages in thread
From: Matthias Kretz @ 2021-01-27 20:42 UTC (permalink / raw)
  To: gcc-patches, libstdc++

From: yaozhongxiao <yaozhongxiao@linux.alibaba.com>

find_first_set and find_last_set method is not optimal for neon,
it need to be improved by synthesized with horizontal adds(vaddv)
which will reduce the generated assembly code; in the following cases,
vaddvq_s16 will generate 2 instructions but vpadd_s16 will generate 4
instrunctions:
```
 # vaddvq_s16
    vaddvq_s16(__asint);
    //  addv    h0, v1.8h
    //  smov    w1, v0.h[0]
 # vpadd_s16
    vpaddq_s16(vpaddq_s16(vpaddq_s16(__asint, __zero), __zero), __zero)[0]
    // addp v1.8h,v1.8h,v2.8h
    // addp v1.8h,v1.8h,v2.8h
    // addp v1.8h,v1.8h,v2.8h
    // smov    w1, v1.h[0]
 #
```

libstdc++-v3/ChangeLog:
	* include/experimental/bits/simd_neon.h: Replace repeated vpadd
	calls with a single vaddv for aarch64.
---
 .../include/experimental/bits/simd_neon.h       | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/libstdc++-v3/include/experimental/bits/simd_neon.h b/libstdc++-
v3/include/experimental/bits/simd_neon.h
index a3a8ffe165f..0b8ccc17513 100644
--- a/libstdc++-v3/include/experimental/bits/simd_neon.h
+++ b/libstdc++-v3/include/experimental/bits/simd_neon.h
@@ -311,8 +311,7 @@ struct _MaskImplNeonMixin
 		  });
 	      __asint &= __bitsel;
 #ifdef __aarch64__
-	      return vpaddq_s16(vpaddq_s16(vpaddq_s16(__asint, __zero), 
__zero),
-				__zero)[0];
+	      return vaddvq_s16(__asint);
 #else
 	      return vpadd_s16(
 		vpadd_s16(vpadd_s16(__lo64(__asint), __hi64(__asint)), __zero),
@@ -328,7 +327,7 @@ struct _MaskImplNeonMixin
 		  });
 	      __asint &= __bitsel;
 #ifdef __aarch64__
-	      return vpaddq_s32(vpaddq_s32(__asint, __zero), __zero)[0];
+	      return vaddvq_s32(__asint);
 #else
 	      return vpadd_s32(vpadd_s32(__lo64(__asint), __hi64(__asint)),
 			       __zero)[0];
@@ -351,8 +350,12 @@ struct _MaskImplNeonMixin
 		    return static_cast<_I>(__i < _Np ? 1 << __i : 0);
 		  });
 	      __asint &= __bitsel;
+#ifdef __aarch64__
+	      return vaddv_s8(__asint);
+#else
 	      return vpadd_s8(vpadd_s8(vpadd_s8(__asint, __zero), __zero),
 			      __zero)[0];
+#endif
 	    }
 	  else if constexpr (sizeof(_Tp) == 2)
 	    {
@@ -362,12 +365,20 @@ struct _MaskImplNeonMixin
 		    return static_cast<_I>(__i < _Np ? 1 << __i : 0);
 		  });
 	      __asint &= __bitsel;
+#ifdef __aarch64__
+	      return vaddv_s16(__asint);
+#else
 	      return vpadd_s16(vpadd_s16(__asint, __zero), __zero)[0];
+#endif
 	    }
 	  else if constexpr (sizeof(_Tp) == 4)
 	    {
 	      __asint &= __make_vector<_I>(0x1, 0x2);
+#ifdef __aarch64__
+	      return vaddv_s32(__asint);
+#else
 	      return vpadd_s32(__asint, __zero)[0];
+#endif
 	    }
 	  else
 	    __assert_unreachable<_Tp>();
-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────





^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 14/16] Implement hmin and hmax
  2021-01-27 20:42 ` [PATCH 14/16] Implement hmin and hmax Matthias Kretz
@ 2021-02-01 10:23   ` Matthias Kretz
  0 siblings, 0 replies; 19+ messages in thread
From: Matthias Kretz @ 2021-02-01 10:23 UTC (permalink / raw)
  To: gcc-patches, libstdc++

[-- Attachment #1: Type: text/plain, Size: 2129 bytes --]

On Mittwoch, 27. Januar 2021 21:42:50 CET Matthias Kretz wrote:
> --- a/libstdc++-v3/include/experimental/bits/simd.h
> +++ b/libstdc++-v3/include/experimental/bits/simd.h
> @@ -204,6 +204,27 @@ template <size_t _Np>
>  template <size_t _X>
>    using _SizeConstant = integral_constant<size_t, _X>;
> 
> +namespace __detail {
> +  struct _Minimum {
> +    template <typename _Tp>
> +      _GLIBCXX_SIMD_INTRINSIC constexpr
> +      _Tp
> +      operator()(_Tp __a, _Tp __b) const {

Reviewing my own patch :) This needs line breaks before { for namespace, 
struct, and operator(). And another line break before the next struct. New 
patch attached.

From: Matthias Kretz <kretz@kde.org>

From 9.7.4 in Parallelism TS 2. For some reason I overlooked these two
functions. Implement them via call to _S_reduce.

libstdc++-v3/ChangeLog:
        * include/experimental/bits/simd.h: Add __detail::_Minimum and
        __detail::_Maximum to use them as _BinaryOperation to _S_reduce.
        Add hmin and hmax overloads for simd and const_where_expression.
        * include/experimental/bits/simd_scalar.h
        (_SimdImplScalar::_S_reduce): Make unused _BinaryOperation
        parameter const-ref to allow calling _S_reduce with an rvalue.
        * testsuite/experimental/simd/tests/reductions.cc: Add tests for
        hmin and hmax. Since the compiler statically determined that all
        tests pass, repeat the test after a call to make_value_unknown.

-- 
──────────────────────────────────────────────────────────────────────────
 Dr. Matthias Kretz                           https://mattkretz.github.io
 GSI Helmholtz Centre for Heavy Ion Research               https://gsi.de
 std::experimental::simd              https://github.com/VcDevel/std-simd
──────────────────────────────────────────────────────────────────────────

[-- Attachment #2: 0014-Implement-hmin-and-hmax.patch --]
[-- Type: text/x-patch, Size: 5359 bytes --]

diff --git a/libstdc++-v3/include/experimental/bits/simd.h b/libstdc++-v3/include/experimental/bits/simd.h
index 14179491f9d..a90cb3b2d98 100644
--- a/libstdc++-v3/include/experimental/bits/simd.h
+++ b/libstdc++-v3/include/experimental/bits/simd.h
@@ -204,6 +204,33 @@ template <size_t _Np>
 template <size_t _X>
   using _SizeConstant = integral_constant<size_t, _X>;
 
+namespace __detail
+{
+  struct _Minimum
+  {
+    template <typename _Tp>
+      _GLIBCXX_SIMD_INTRINSIC constexpr
+      _Tp
+      operator()(_Tp __a, _Tp __b) const
+      {
+	using std::min;
+	return min(__a, __b);
+      }
+  };
+
+  struct _Maximum
+  {
+    template <typename _Tp>
+      _GLIBCXX_SIMD_INTRINSIC constexpr
+      _Tp
+      operator()(_Tp __a, _Tp __b) const
+      {
+	using std::max;
+	return max(__a, __b);
+      }
+  };
+} // namespace __detail
+
 // unrolled/pack execution helpers
 // __execute_n_times{{{
 template <typename _Fp, size_t... _I>
@@ -3408,7 +3435,7 @@ template <typename _Tp, typename _Ap>
 
 // }}}1
 // reductions [simd.reductions] {{{1
-  template <typename _Tp, typename _Abi, typename _BinaryOperation = plus<>>
+template <typename _Tp, typename _Abi, typename _BinaryOperation = plus<>>
   _GLIBCXX_SIMD_INTRINSIC _GLIBCXX_SIMD_CONSTEXPR _Tp
   reduce(const simd<_Tp, _Abi>& __v,
 	 _BinaryOperation __binary_op = _BinaryOperation())
@@ -3454,6 +3481,61 @@ template <typename _M, typename _V>
   reduce(const const_where_expression<_M, _V>& __x, bit_xor<> __binary_op)
   { return reduce(__x, 0, __binary_op); }
 
+template <typename _Tp, typename _Abi>
+  _GLIBCXX_SIMD_INTRINSIC _GLIBCXX_SIMD_CONSTEXPR _Tp
+  hmin(const simd<_Tp, _Abi>& __v) noexcept
+  {
+    return _Abi::_SimdImpl::_S_reduce(__v, __detail::_Minimum());
+  }
+
+template <typename _Tp, typename _Abi>
+  _GLIBCXX_SIMD_INTRINSIC _GLIBCXX_SIMD_CONSTEXPR _Tp
+  hmax(const simd<_Tp, _Abi>& __v) noexcept
+  {
+    return _Abi::_SimdImpl::_S_reduce(__v, __detail::_Maximum());
+  }
+
+template <typename _M, typename _V>
+  _GLIBCXX_SIMD_INTRINSIC _GLIBCXX_SIMD_CONSTEXPR
+  typename _V::value_type
+  hmin(const const_where_expression<_M, _V>& __x) noexcept
+  {
+    using _Tp = typename _V::value_type;
+    constexpr _Tp __id_elem =
+#ifdef __FINITE_MATH_ONLY__
+      __finite_max_v<_Tp>;
+#else
+      __value_or<__infinity, _Tp>(__finite_max_v<_Tp>);
+#endif
+    _V __tmp = __id_elem;
+    _V::_Impl::_S_masked_assign(__data(__get_mask(__x)), __data(__tmp),
+				__data(__get_lvalue(__x)));
+    return _V::abi_type::_SimdImpl::_S_reduce(__tmp, __detail::_Minimum());
+  }
+
+template <typename _M, typename _V>
+  _GLIBCXX_SIMD_INTRINSIC _GLIBCXX_SIMD_CONSTEXPR
+  typename _V::value_type
+  hmax(const const_where_expression<_M, _V>& __x) noexcept
+  {
+    using _Tp = typename _V::value_type;
+    constexpr _Tp __id_elem =
+#ifdef __FINITE_MATH_ONLY__
+      __finite_min_v<_Tp>;
+#else
+      [] {
+	if constexpr (__value_exists_v<__infinity, _Tp>)
+	  return -__infinity_v<_Tp>;
+	else
+	  return __finite_min_v<_Tp>;
+      }();
+#endif
+    _V __tmp = __id_elem;
+    _V::_Impl::_S_masked_assign(__data(__get_mask(__x)), __data(__tmp),
+				__data(__get_lvalue(__x)));
+    return _V::abi_type::_SimdImpl::_S_reduce(__tmp, __detail::_Maximum());
+  }
+
 // }}}1
 // algorithms [simd.alg] {{{
 template <typename _Tp, typename _Ap>
diff --git a/libstdc++-v3/include/experimental/bits/simd_scalar.h b/libstdc++-v3/include/experimental/bits/simd_scalar.h
index 7680bc39c30..7e480ecdb37 100644
--- a/libstdc++-v3/include/experimental/bits/simd_scalar.h
+++ b/libstdc++-v3/include/experimental/bits/simd_scalar.h
@@ -182,7 +182,7 @@ struct _SimdImplScalar
   // _S_reduce {{{2
   template <typename _Tp, typename _BinaryOperation>
     static constexpr inline _Tp
-    _S_reduce(const simd<_Tp, simd_abi::scalar>& __x, _BinaryOperation&)
+    _S_reduce(const simd<_Tp, simd_abi::scalar>& __x, const _BinaryOperation&)
     { return __x._M_data; }
 
   // _S_min, _S_max {{{2
diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/reductions.cc b/libstdc++-v3/testsuite/experimental/simd/tests/reductions.cc
index 9d897d5ccd6..02df68fafbc 100644
--- a/libstdc++-v3/testsuite/experimental/simd/tests/reductions.cc
+++ b/libstdc++-v3/testsuite/experimental/simd/tests/reductions.cc
@@ -57,6 +57,8 @@ template <typename V>
     }
 
     {
+      COMPARE(hmin(V(1)), T(1));
+      COMPARE(hmax(V(1)), T(1));
       const V z([](T i) { return i + 1; });
       COMPARE(std::experimental::reduce(z,
 					[](auto a, auto b) {
@@ -79,6 +81,25 @@ template <typename V>
 					}),
 	      T(V::size() == 1 ? 117 : 2))
 	<< "z: " << z;
+      COMPARE(hmin(z), T(1));
+      COMPARE(hmax(z), T(V::size()));
+      if (V::size() > 1)
+	{
+	  COMPARE(hmin(where(z > 1, z)), T(2));
+	  COMPARE(hmax(where(z > 1, z)), T(V::size()));
+	}
+      COMPARE(hmin(where(z < 4, z)), T(1));
+      COMPARE(hmax(where(z < 4, z)), std::min(T(V::size()), T(3)));
+      const V zz = make_value_unknown(z);
+      COMPARE(hmin(zz), T(1));
+      COMPARE(hmax(zz), T(V::size()));
+      if (V::size() > 1)
+	{
+	  COMPARE(hmin(where(zz > 1, zz)), T(2));
+	  COMPARE(hmax(where(zz > 1, zz)), T(V::size()));
+	}
+      COMPARE(hmin(where(zz < 4, zz)), T(1));
+      COMPARE(hmax(where(zz < 4, zz)), std::min(T(V::size()), T(3)));
     }
 
     test_values<V>({}, {1000}, [](V x) {

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 13/16] Improve test codegen for interpreting assembly
  2021-01-27 20:42 ` [PATCH 13/16] Improve test codegen for interpreting assembly Matthias Kretz
@ 2021-02-02 15:02   ` Jonathan Wakely
  0 siblings, 0 replies; 19+ messages in thread
From: Jonathan Wakely @ 2021-02-02 15:02 UTC (permalink / raw)
  To: Matthias Kretz; +Cc: gcc-patches, libstdc++

On 27/01/21 21:42 +0100, Matthias Kretz wrote:
>From: Matthias Kretz <kretz@kde.org>
>
>In many failure cases it is helpful to inspect the instructions leading
>up to the test failure. After this change the location is easier to find
>and the branch after failure is easier to find.
>
>libstdc++-v3/ChangeLog:
>	* testsuite/experimental/simd/tests/bits/verify.h (verify): Add
>	instruction pointer data member. Ensure that the `if (m_failed)`
>	branch is always inlined into the calling code. The body of the
>	conditional can still be a function call. Move the get_ip call
>	into the verify ctor to simplify the ctor calls.
>	(COMPARE): Don't mention the use of all_of for reduction of a
>	simd_mask. It only distracts from the real issue.
>---
> .../experimental/simd/tests/bits/verify.h     | 44 +++++++++----------
> 1 file changed, 22 insertions(+), 22 deletions(-)
>
>diff --git a/libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h b/
>libstdc++-v3/testsuite/experimental/simd/tests/bits/verify.h

Several of these patches have been mangled by your mailer. The line
above has been wrapped in the middle of the filename, making this an
invalid patch header.

>@@ -220,24 +223,21 @@ template <typename T>
>
> #define COMPARE(_a, _b)
>\

And all these lines ending with a backslash have been wrapped.

I can easily fix the filename in the header, but my simplistic
attempts to put this back together have failed. Could you please
resend patch 13/16 as an attachment, not inline?

I think the others are OK.



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH 00/16] stdx::simd fixes and testsuite improvements
  2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
                   ` (14 preceding siblings ...)
  2021-01-27 20:42 ` [PATCH 16/16] Improve "find_first/last_set" for NEON Matthias Kretz
@ 2021-02-03 15:52 ` Jonathan Wakely
  15 siblings, 0 replies; 19+ messages in thread
From: Jonathan Wakely @ 2021-02-03 15:52 UTC (permalink / raw)
  To: Matthias Kretz; +Cc: gcc-patches, libstdc++

On 27/01/21 21:36 +0100, Matthias Kretz wrote:
>As promised on IRC ...
>
>Matthias Kretz (15):
>  Support skip, only, expensive, and xfail markers
>  Fix NEON intrinsic types usage
>  Support -mlong-double-64 on PPC
>  Fix simd_mask<double> on POWER w/o POWER8
>  Fix several check-simd interaction issues
>  Fix DRIVEROPTS and TESTFLAGS processing
>  Fix incorrect display of old test summaries
>  Immediate feedback with -v
>  Fix mask reduction of simd_mask<double> on POWER7
>  Skip testing hypot3 for long double on PPC
>  Abort test after 1000 lines of output
>  Support timeout and timeout-factor options
>  Improve test codegen for interpreting assembly
>  Implement hmin and hmax
>  Work around test failures using -mno-tree-vrp
>
>yaozhongxiao (1):
>  Improve "find_first/last_set" for NEON

All 16 committed now. Thanks.



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-02-03 15:52 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 20:36 [PATCH 00/16] stdx::simd fixes and testsuite improvements Matthias Kretz
2021-01-27 20:41 ` [PATCH 02/16] Fix NEON intrinsic types usage Matthias Kretz
2021-01-27 20:42 ` [PATCH 03/16] Support -mlong-double-64 on PPC Matthias Kretz
2021-01-27 20:42 ` [PATCH 04/16] Fix simd_mask<double> on POWER w/o POWER8 Matthias Kretz
2021-01-27 20:42 ` [PATCH 05/16] Fix several check-simd interaction issues Matthias Kretz
2021-01-27 20:42 ` [PATCH 06/16] Fix DRIVEROPTS and TESTFLAGS processing Matthias Kretz
2021-01-27 20:42 ` [PATCH 07/16] Fix incorrect display of old test summaries Matthias Kretz
2021-01-27 20:42 ` [PATCH 08/16] Immediate feedback with -v Matthias Kretz
2021-01-27 20:42 ` [PATCH 09/16] Fix mask reduction of simd_mask<double> on POWER7 Matthias Kretz
2021-01-27 20:42 ` [PATCH 10/16] Skip testing hypot3 for long double on PPC Matthias Kretz
2021-01-27 20:42 ` [PATCH 11/16] Abort test after 1000 lines of output Matthias Kretz
2021-01-27 20:42 ` [PATCH 12/16] Support timeout and timeout-factor options Matthias Kretz
2021-01-27 20:42 ` [PATCH 13/16] Improve test codegen for interpreting assembly Matthias Kretz
2021-02-02 15:02   ` Jonathan Wakely
2021-01-27 20:42 ` [PATCH 14/16] Implement hmin and hmax Matthias Kretz
2021-02-01 10:23   ` Matthias Kretz
2021-01-27 20:42 ` [PATCH 15/16] Work around test failures using -mno-tree-vrp Matthias Kretz
2021-01-27 20:42 ` [PATCH 16/16] Improve "find_first/last_set" for NEON Matthias Kretz
2021-02-03 15:52 ` [PATCH 00/16] stdx::simd fixes and testsuite improvements Jonathan Wakely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).