This is a follow-up for https://gcc.gnu.org/pipermail/gcc-patches/2026-September/732868.html Changes include: - Document optional second argument for .CLZ/.CTZ - Do a final defined-at-zero test in vectorizable_call - Fold zero test for .CLZ/.CTZ over vector modes in match.pd - s390: add more tests; rework c[lt]zi2 pattern using SI mode result
Bootstrapped and regtested on - aarch64-unknown-linux-gnu - powerpc64le-unknown-linux-gnu - s390x-ibm-linux-gnu - x86_64-pc-linux-gnu Ok for mainline? Stefan Schulze Frielinghaus (3): s390: Rework clz/ctz vect: Defined-at-zero value for .CLZ/.CTZ match.pd: Fold zero test for .CLZ/.CTZ over vector modes gcc/config/i386/i386.h | 4 +- gcc/config/rs6000/rs6000.h | 4 +- gcc/config/s390/s390.h | 6 +- gcc/config/s390/s390.md | 3 + gcc/config/s390/vector.md | 27 +- gcc/doc/ifn.texi | 10 +- gcc/match.pd | 18 +- gcc/testsuite/gcc.dg/tree-ssa/pr123311-2.c | 1 + gcc/testsuite/gcc.target/s390/clz-ctz-1.c | 462 +++++++++++++++++++++ gcc/tree-vect-patterns.cc | 22 +- gcc/tree-vect-stmts.cc | 13 + 11 files changed, 538 insertions(+), 32 deletions(-) create mode 100644 gcc/testsuite/gcc.target/s390/clz-ctz-1.c -- 2.55.0
