https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114861

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

--- Comment #2 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
It seems we are missing a constraint for bstrins_<mode>_for_mask:

diff --git a/gcc/config/loongarch/loongarch.md
b/gcc/config/loongarch/loongarch.md
index a316c8fb820..0c86f27e768 100644
--- a/gcc/config/loongarch/loongarch.md
+++ b/gcc/config/loongarch/loongarch.md
@@ -1543,9 +1543,9 @@ (define_insn "and<mode>3_extended"
    (set_attr "mode" "<MODE>")])

 (define_insn_and_split "*bstrins_<mode>_for_mask"
-  [(set (match_operand:GPR 0 "register_operand")
-       (and:GPR (match_operand:GPR 1 "register_operand")
-                (match_operand:GPR 2 "ins_zero_bitmask_operand")))]
+  [(set (match_operand:GPR 0 "register_operand" "=r,r")
+       (and:GPR (match_operand:GPR 1 "register_operand" "r,m")
+                (match_operand:GPR 2 "ins_zero_bitmask_operand" "i,i")))]
   ""
   "#"
   ""

This fixes the ICE on the attached test case.

I still need to review other splits and make a reduced test case.

Reply via email to