https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118151

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktkachov at gcc dot gnu.org

--- Comment #2 from ktkachov at gcc dot gnu.org ---
We've also had reports for the use cases:
#include <arm_sve.h>

bool any(svuint64_t a, svuint64_t b) {
  const svbool_t p = svptrue_pat_b8(SV_VL16);
  const svbool_t c = svcmpeq_u64(p, a, b);
  return svptest_any(p, c);
}

bool first(svuint64_t a, svuint64_t b) {
  const svbool_t p = svptrue_pat_b8(SV_VL16);
  const svbool_t c = svcmpeq_u64(p, a, b);
  return svptest_first(p, c);
}

bool last(svuint64_t a, svuint64_t b) {
  const svbool_t p = svptrue_pat_b8(SV_VL16);
  const svbool_t c = svcmpeq_u64(p, a, b);
  return svptest_last(p, c);
}

I think these are the same issue here but I can file a separate PR if not.
In this case the question is whether we can do away with the PTEST entirely and
just use the CMP.

Reply via email to