This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, rtl-optimization]: Fix PR54457, [x32] Fail to combine 64bit index + constant
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 Sep 2012 18:51:22 +0100
- Subject: Re: [PATCH, rtl-optimization]: Fix PR54457, [x32] Fail to combine 64bit index + constant
- References: <CAFULd4bHjvbiX-eB1sh339Z1dZeaFn32_wjdu7VOQySn0fey4Q@mail.gmail.com>
Uros Bizjak <ubizjak@gmail.com> writes:
> The solution is, to transform operands of PLUS and MINUS RTX in the
> form of (subreg:M (op:N A C) 0) to (op:M (subreg:N (A 0)) C), as is
> done for standalone subreg operation in 32bit case.
I agree (subreg:M (op:N A C) 0) to (op:M (subreg:N (A 0)) C) is
a good transformation, but why do we need to handle as special
the case where the subreg is itself the operand of a plus or minus?
I think it should happen regardless of where the subreg occurs.
On the face of it, this feels like something that could legimately
go in simplify_subreg.
Richard