Ilya Leoshkevich <i...@linux.ibm.com> writes:
> On Thu, 2021-01-21 at 10:49 +0000, Richard Sandiford wrote:
>> What prevents combine from handling this?  Are the instructions in
>> different blocks?
>
> I wanted to do this before combine, because in __ieee754_sqrtl case
> fwprop turns this (example from the commit message + the insn after
> it):
>
> (set (reg:TF 63) (mem:TF (reg:DI 62)))
> (set (reg:FPRX2 66) (subreg:FPRX2 (reg:TF 63) 0))
> (set (reg:FPRX2 65)
>      (asm_operands:FPRX2 ("sqxbr %0,%1") ("=f") 0
>                          [(reg:FPRX2 66)]
>                          [(asm_input:FPRX2 ("f"))]
>                          []))
>
> into this:
>
> (set (reg:TF 63) (mem:TF (reg:DI 62)))
> (set (reg:FPRX2 65)
>      (asm_operands:FPRX2 ("sqxbr %0,%1") ("=f") 0
>                          [(subreg:FPRX2 (reg:TF 63) 0)]
>                          [(asm_input:FPRX2 ("f"))]
>                          []))
>
> by propagating (reg:FPRX2 66), and there is not much combine can do
> about this anymore:
>
> (set (reg:FPRX2 65)
>      (asm_operands:FPRX2 ("sqxbr %0,%1") ("=f") 0
>                          [(mem:FPRX2 (reg:DI 62))]
>                          [(asm_input:FPRX2 ("f"))]
>                          []))
>
> is not a valid insn.

Ah, yeah, that's unfortunate.  I guess a combine-ish way of fixing
that would be to do a 2-2 split, but there's no support for doing
that on asms.

Thanks,
Richard

Reply via email to