From: Christoph Müllner Date: Fri, 8 Sep 2023 06:19:32 +0000 (+0200) Subject: riscv: bitmanip: Remove duplicate zero_extendhi2 pattern X-Git-Tag: basepoints/gcc-15~6338 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c37fef39fa0a8f77ea4fc67d1bbf5067d4bddb9;p=thirdparty%2Fgcc.git riscv: bitmanip: Remove duplicate zero_extendhi2 pattern We currently have two identical zero_extendhi2 patterns: * '*zero_extendhi2_zbb' * '*zero_extendhi2_bitmanip' This patch removes the *_zbb pattern and ensures that all sign- and zero-extensions use the postfix '_bitmanip'. Signed-off-by: Christoph Müllner gcc/ChangeLog: * config/riscv/bitmanip.md (*extend2_zbb): Rename postfix to _bitmanip. (*extend2_bitmanip): Renamed pattern. (*zero_extendhi2_zbb): Remove duplicated pattern. --- diff --git a/gcc/config/riscv/bitmanip.md b/gcc/config/riscv/bitmanip.md index 1544ef4e1252..431b32922135 100644 --- a/gcc/config/riscv/bitmanip.md +++ b/gcc/config/riscv/bitmanip.md @@ -283,7 +283,7 @@ [(set_attr "type" "bitmanip,load") (set_attr "mode" "")]) -(define_insn "*extend2_zbb" +(define_insn "*extend2_bitmanip" [(set (match_operand:SUPERQI 0 "register_operand" "=r,r") (sign_extend:SUPERQI (match_operand:SHORT 1 "nonimmediate_operand" " r,m")))] @@ -294,17 +294,6 @@ [(set_attr "type" "bitmanip,load") (set_attr "mode" "")]) -(define_insn "*zero_extendhi2_zbb" - [(set (match_operand:GPR 0 "register_operand" "=r,r") - (zero_extend:GPR - (match_operand:HI 1 "nonimmediate_operand" " r,m")))] - "TARGET_ZBB" - "@ - zext.h\t%0,%1 - lhu\t%0,%1" - [(set_attr "type" "bitmanip,load") - (set_attr "mode" "HI")]) - (define_expand "rotrdi3" [(set (match_operand:DI 0 "register_operand") (rotatert:DI (match_operand:DI 1 "register_operand")