Pushed v4 as attached, with the format issues fixed and a minor adjustment in the commit message ("define_insn_and_split" is changed to "define_insn_and_rewrite" to match the actual change). On Fri, 2023-12-29 at 19:55 +0800, Xi Ruoyao wrote: > On Fri, 2023-12-29 at 15:57 +0800, chenglulu wrote: > > /* snip */ > > > > diff --git a/gcc/config/loongarch/loongarch.md b/gcc/config/loongarch/loongarch.md > > /* snip */ > > > +(define_insn_and_rewrite "simple_load" > > > +  [(set (match_operand:LD_AT_LEAST_32_BIT 0 "register_operand" "=r,f") > > > + (match_operand:LD_AT_LEAST_32_BIT 1 "mem_simple_ldst_operand" ""))] > > > +  "loongarch_pre_reload_split () \ > > > +   && la_opt_explicit_relocs == EXPLICIT_RELOCS_AUTO \ > > Is the '\' here dispensable? I don't seem to have added it when I wrote > > the conditions. > > It seems '\' is not needed, I'll drop them. > > /* snip */ > > > > > > +(define_predicate "mem_simple_ldst_operand" > > > +  (match_code "mem") > > > +{ > > > +  op = XEXP (op, 0); > > > +  return symbolic_pcrel_operand (op, Pmode) || > > > + symbolic_pcrel_offset_operand (op, Pmode); > > > +}) > > > + > > >   > > Symbol '||' It shouldn't be at the end of the line. > > Indeed. > > > > > +  return symbolic_pcrel_operand (op, Pmode) > > +        || symbolic_pcrel_offset_operand (op, Pmode); > > > > Others LGTM. > > Thanks! > > > > /* snip */ -- Xi Ruoyao School of Aerospace Science and Technology, Xidian University