From: Sinan Lin Date: Tue, 18 Apr 2023 18:24:52 +0000 (-0600) Subject: Add TARGET_ZBKB to the condition of bswapsi2, bswapdi2 and rotr3 patterns X-Git-Tag: basepoints/gcc-15~10091 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9874ceed091a0ce17b23d8d77b5bf90b8902a3c0;p=thirdparty%2Fgcc.git Add TARGET_ZBKB to the condition of bswapsi2, bswapdi2 and rotr3 patterns gcc/ * config/riscv/bitmanip.md (rotr3 expander): Enable for ZBKB. (bswapdi2, bswapsi2): Similarly. --- diff --git a/gcc/config/riscv/bitmanip.md b/gcc/config/riscv/bitmanip.md index 062968d479f1..388ef662820d 100644 --- a/gcc/config/riscv/bitmanip.md +++ b/gcc/config/riscv/bitmanip.md @@ -297,7 +297,7 @@ [(set (match_operand:GPR 0 "register_operand") (rotatert:GPR (match_operand:GPR 1 "register_operand") (match_operand:QI 2 "arith_operand")))] - "TARGET_ZBB || TARGET_XTHEADBB" + "TARGET_ZBB || TARGET_XTHEADBB || TARGET_ZBKB" { if (TARGET_XTHEADBB && !immediate_operand (operands[2], VOIDmode)) FAIL; @@ -362,12 +362,12 @@ (define_expand "bswapdi2" [(set (match_operand:DI 0 "register_operand") (bswap:DI (match_operand:DI 1 "register_operand")))] - "TARGET_64BIT && (TARGET_ZBB || TARGET_XTHEADBB)") + "TARGET_64BIT && (TARGET_ZBB || TARGET_XTHEADBB || TARGET_ZBKB)") (define_expand "bswapsi2" [(set (match_operand:SI 0 "register_operand") (bswap:SI (match_operand:SI 1 "register_operand")))] - "(!TARGET_64BIT && TARGET_ZBB) || TARGET_XTHEADBB") + "(!TARGET_64BIT && (TARGET_ZBB || TARGET_ZBKB)) || TARGET_XTHEADBB") (define_insn "*bswap2" [(set (match_operand:X 0 "register_operand" "=r")