]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add TARGET_ZBKB to the condition of bswapsi2, bswapdi2 and rotr<mode>3 patterns
authorSinan Lin <sinan.lin@linux.alibaba.com>
Tue, 18 Apr 2023 18:24:52 +0000 (12:24 -0600)
committerJeff Law <jlaw@ventanamicro>
Tue, 18 Apr 2023 18:27:08 +0000 (12:27 -0600)
gcc/
* config/riscv/bitmanip.md (rotr<mode>3 expander): Enable for ZBKB.
(bswapdi2, bswapsi2): Similarly.

gcc/config/riscv/bitmanip.md

index 062968d479f1396c8535becb0cee47f32a139947..388ef662820d951c800610d1ad6e1c1e2f4d4e65 100644 (file)
   [(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;
 (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 "*bswap<mode>2"
   [(set (match_operand:X 0 "register_operand" "=r")