"Bingfeng Mei" <b...@broadcom.com> writes:

> I was hit by an ICE in reload. You know how  difficult to debug it ☺.
>
> My primary suspect is that eliminate_regs_in_insn transforms 
>
>
> (insn 680 679 681 84 src/weighted_prediction.c:729 (set (reg:DF 1 r1)
>         (mem:DF (plus:SI (mult:SI (reg:SI 596 [ ivtmp.474 ])
>                     (const_int 8 [0x8]))
>                 (reg/f:SI 1105)) [3 S8 A8])) 448 {*ldl_dfmode} (nil))
>                 
>
> To:                 
>  (insn 680 679 681 84 src/weighted_prediction.c:729 (set (reg:DF 1 r1)
>         (mem:DF (plus:SI (plus:SI (mult:SI (reg:SI 596 [ ivtmp.474 ])
>                                      (const_int 8 [0x8]))
>                                   (reg/f:SI 57 r57))
>                 (const_int 40 [0x28])) [3 S8 A8])) 448 {*ldl_dfmode} (nil))   
>    
>
> The latter has illegal memory address mode, and r57 is our stack pointer.
>
> Since reload part is still half mystery to me, I wonder whether this is an 
> wrong transformation and causes the following ICE. Is it allowed that
> Eliminate_regs_in_insn to generate such illegal instruction?

It's normal for reload to produce instructions with invalid operands
during its operation, with the expectation that the invalid operands
will be reloaded into registers before the pass is complete.  I couldn't
see the specific ICE in your message, so I don't know if that is what is
happening here.

Ian

Reply via email to