Re: [PATCH 2/3] LoongArch: Redundant sign extension elimination optimization.

2024-01-06 Thread Xi Ruoyao
On Sat, 2024-01-06 at 16:54 +0800, Lulu Cheng wrote: > +(define_expand "addsi3" > +  [(set (match_operand:SI 0 "register_operand" "=r,r,r,r,r") > + (plus:SI (match_operand:SI 1 "register_operand" "r,r,r,r,r") > + (match_operand:SI 2 "plus_si_operand"  "r,I,La,Le,Lb")))] > +  "" >

[PATCH 2/3] LoongArch: Redundant sign extension elimination optimization.

2024-01-06 Thread Lulu Cheng
From: liwei We found that the current combine optimization pass in gcc cannot handle the following redundant sign extension situations: (insn 77 76 78 5 (set (reg:SI 143) (plus:SI (subreg/s/u:SI (reg/v:DI 104 [ len ]) 0) (const_int 1 [0x1]))) {addsi3} (expr_list:REG_DEAD