The first two patches for PR122715 have been committed. This patch handles the remaining AArch64 case.
Advanced SIMD halving-add intrinsics remain target builtins in GIMPLE, preventing generic average simplifications from seeing them. Canonicalize SHADD and UHADD to IFN_AVG_FLOOR, and SRHADD and URHADD to IFN_AVG_CEIL. This allows equal operands to be folded by the existing match.pd rule while retaining optab-based instruction selection for other operands. Tested with an aarch64-linux-gnu cross compiler. The targeted tests pass. Thanks, Odysseas
PR122715-aarch64.patch
Description: PR122715-aarch64.patch
