PATCH [10/n]: Prepare x32: PR rtl-optimization/49114: Reload failed to handle (set reg:X (plus:X (subreg:X (reg:Y) 0) (const

Ulrich Weigand uweigand@de.ibm.com
Mon Jun 27 22:26:00 GMT 2011


H.J. Lu wrote:

> reload generates:
> 
> (insn 914 912 0 (set (reg:SI 0 ax)
>         (plus:SI (subreg:SI (reg/v/f:DI 182 [ b ]) 0)
>             (const_int 8 [0x8]))) 248 {*lea_1_x32}
>      (nil))
> 
> from
> 
> insn = emit_insn_if_valid_for_reload (gen_rtx_SET (VOIDmode, out, in));

Interesting.  The pseudo should have been replaced by the
hard register (reg:DI 1) during the preceding call to
      op0 = find_replacement (&XEXP (in, 0));
(since reload 0 should have pushed a replacement record.)

Interestingly enough, in the final output that replacement *is*
performed in the REG_EQUIV note:

(insn 1023 1022 1024 34 (set (reg:SI 1 dx)
        (plus:SI (reg:SI 1 dx)
            (const_int 8 [0x8]))) spooles.c:291 248 {*lea_1_x32}
     (expr_list:REG_EQUIV (plus:SI (subreg:SI (reg:DI 1 dx) 0)
            (const_int 8 [0x8]))
        (nil)))

which is why I hadn't expected this to be a problem here.

Can you try to find out why the find_replacement doesn't work
with your test case?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com



More information about the Gcc-patches mailing list