]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
riscv: thead: Adjust constraints of th_addsl INSN
authorChristoph Müllner <christoph.muellner@vrull.eu>
Tue, 25 Apr 2023 12:40:37 +0000 (14:40 +0200)
committerKito Cheng <kito.cheng@sifive.com>
Wed, 12 Jul 2023 08:05:50 +0000 (16:05 +0800)
A recent change adjusted the constraints of ZBA's shNadd INSN.
Let's mirror this change here as well.

gcc/ChangeLog:

* config/riscv/thead.md: Adjust constraints of th_addsl.

Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
gcc/config/riscv/thead.md

index e8d3fcb1f7f9ac13e2d5a1d1b3ac697dfdb0dd32..840a9ff34c14497fa7a1df69cf5b63bb1eae6a1d 100644 (file)
 (define_insn "*th_addsl<mode>4"
   [(set (match_operand:X 0 "register_operand" "=r")
        (plus:X (ashift:X (match_operand:X 1 "register_operand" "r")
-                         (match_operand 2 "const_int_operand" "n"))
+                         (match_operand:QI 2 "imm123_operand" "Ds3"))
                (match_operand:X 3 "register_operand" "r")))]
-  "TARGET_XTHEADBA
-   && (INTVAL (operands[2]) >= 0) && (INTVAL (operands[2]) <= 3)"
+  "TARGET_XTHEADBA"
   "th.addsl\t%0,%3,%1,%2"
   [(set_attr "type" "bitmanip")
    (set_attr "mode" "<X:MODE>")])