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

--- Comment #191 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to Kazumoto Kojima from comment #188)
> (In reply to Kazumoto Kojima from comment #187)
> 
> Looking at the RTL dumps in -mlra case, there is an instruction to set r4 in
> the postreload dump:
> 
> (insn 579 573 580 49 (set (reg:SI 4 r4)
>         (reg/f:SI 11 r11 [1021])) "/git/gcc/gcc/wide-int.h":822:94 191
> {movsi_ie}
>      (expr_list:REG_EQUAL (plus:SI (reg/f:SI 153 sfp)
>             (const_int -88 [0xffffffffffffffa8]))
>         (nil)))
> (insn 580 579 581 49 (set (reg:SI 5 r5)
>         (reg/f:SI 10 r10 [1023])) "/git/gcc/gcc/wide-int.h":822:94 191
> {movsi_ie}
>      (expr_list:REG_EQUAL (plus:SI (reg/f:SI 153 sfp)
>             (const_int -60 [0xffffffffffffffc4]))
>         (nil)))
> (insn 581 580 2186 49 (set (reg:SI 6 r6)
>         (const_int 1 [0x1])) "/git/gcc/gcc/wide-int.h":822:94 191 {movsi_ie}
>      (nil))
> (note 2186 581 582 49 NOTE_INSN_DELETED)
> (insn 582 2186 2187 49 (parallel [
>             (set (mem:BLK (reg:SI 4 r4) [0  A8])
>                 (mem:BLK (reg:SI 5 r5) [0  A8]))
>             (use (reg:SI 14 r14 [1193]))
>             (use (const_int 0 [0]))
>             (use (reg:SI 6 r6))
>             (clobber (reg:SI 146 pr))
>             (clobber (reg:SI 147 t))
>             (clobber (reg:SI 4 r4))
>             (clobber (reg:SI 5 r5))
>             (clobber (reg:SI 6 r6))
>             (clobber (reg:SI 0 r0))
>             (clobber (reg:SI 1 r1))
>             (clobber (reg:SI 2 r2))
>             (clobber (reg:SI 3 r3))
>         ]) "/git/gcc/gcc/wide-int.h":822:94 326 {block_lump_real_i4}
>      (nil))
> 
> but the insn 579 is dissapeared in late_combine2 dump:
> 
> (insn 573 1839 580 49 (set (mem/c:SI (plus:SI (reg/f:SI 10 r10 [1023])
>                 (const_int 16 [0x10])) [6 MEM[(struct fixed_wide_int_storage
> *)_301].len+0 S4 A32])
>         (reg:SI 7 r7 [1042])) "/git/gcc/gcc/wide-int.h":1435:7 191 {movsi_ie}
>      (nil))
> (insn 580 573 581 49 (set (reg:SI 5 r5)
>         (reg/f:SI 10 r10 [1023])) "/git/gcc/gcc/wide-int.h":822:94 191
> {movsi_ie}
>      (expr_list:REG_EQUAL (plus:SI (reg/f:SI 153 sfp)
>             (const_int -60 [0xffffffffffffffc4]))
>         (nil)))
> 
> I confirmed that -fno-late-combine-instructions fixes this issue.  I'm not
> sure what is going on, though.
> As pointed out in c#184, -fno-late-combine-instructions doesn't help
> __muldi3 case.

Maybe Richard Sandiford can help with this, since he's the original author of
the late-combine, from what I remember.

Reply via email to