Hi all, This patch adds codegen for FEAT_CSSC from the 2022 Architecture extensions. It fits various existing optabs in GCC quite well. There are instructions for scalar signed/unsigned min/max, abs, ctz, popcount. We have expanders for these already, so they are wired up to emit single-insn patterns for the new TARGET_CSSC. These instructions are enabled by the +cssc command-line extension. This version of the patch follows Andrew's suggestion for the expanders. Pushing to trunk. Thanks, Kyrill gcc/ChangeLog: * config/aarch64/aarch64-option-extensions.def (cssc): Define. * config/aarch64/aarch64.h (AARCH64_ISA_CSSC): Define. (TARGET_CSSC): Likewise. * config/aarch64/aarch64.md (*aarch64_abs2_cssc_ins): New define_insn. (abs2): Adjust for the above. (aarch64_umax3_insn): New define_insn. (umax3): Adjust for the above. (*aarch64_popcount2_cssc_insn): New define_insn. (popcount2): Adjust for the above. (3): New define_insn. * config/aarch64/constraints.md (Usm): Define. (Uum): Likewise. * doc/invoke.texi (AArch64 options): Document +cssc. * config/aarch64/iterators.md (MAXMIN_NOUMAX): New code iterator. * config/aarch64/predicates.md (aarch64_sminmax_immediate): Define. (aarch64_sminmax_operand): Likewise. (aarch64_uminmax_immediate): Likewise. (aarch64_uminmax_operand): Likewise. gcc/testsuite/ChangeLog: * gcc.target/aarch64/cssc_1.c: New test. * gcc.target/aarch64/cssc_2.c: New test. * gcc.target/aarch64/cssc_3.c: New test. * gcc.target/aarch64/cssc_4.c: New test. * gcc.target/aarch64/cssc_5.c: New test.