From: Kyrylo Tkachov Date: Thu, 15 Jan 2026 13:22:46 +0000 (-0800) Subject: aarch64: Adjust predicate used for SVE2 SHA3 XAR rotate amount X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=501baaf50c72a684000b077413e19635df598a86;p=thirdparty%2Fgcc.git aarch64: Adjust predicate used for SVE2 SHA3 XAR rotate amount While fixing the Advanced SIMD XAR patterns I looked at SVE2 and it looks okay there but the rotate amount should use the aarch64_simd_rshift_imm predicate rather than lshift_imm since the instruction (unlike the Advanced SIMD version) takes values from [1, bitwidth]. Bootstrapped and tested on aarch64-none-linux-gnu. Signed-off-by: Kyrylo Tkachov gcc/ PR target/123584 * config/aarch64/aarch64-sve2.md (@aarch64_sve2_xar): Use aarch64_simd_rshift_imm predicate for rotate amount. --- diff --git a/gcc/config/aarch64/aarch64-sve2.md b/gcc/config/aarch64/aarch64-sve2.md index f959837eca0..c63796542ac 100644 --- a/gcc/config/aarch64/aarch64-sve2.md +++ b/gcc/config/aarch64/aarch64-sve2.md @@ -1643,7 +1643,7 @@ (xor:SVE_ASIMD_FULL_I (match_operand:SVE_ASIMD_FULL_I 1 "register_operand" "%0,w") (match_operand:SVE_ASIMD_FULL_I 2 "register_operand" "w,w")) - (match_operand:SVE_ASIMD_FULL_I 3 "aarch64_simd_lshift_imm")))] + (match_operand:SVE_ASIMD_FULL_I 3 "aarch64_simd_rshift_imm")))] "TARGET_SVE2 && !(mode == V2DImode && TARGET_SHA3)" { operands[3]