This is the mail archive of the
mailing list for the GCC project.
Re: Make m32c build, fix PSImode truncation
- From: Bernd Schmidt <bernds at codesourcery dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, DJ Delorie <dj at redhat dot com>, <rdsandiford at googlemail dot com>
- Date: Mon, 29 Apr 2013 11:52:04 +0200
- Subject: Re: Make m32c build, fix PSImode truncation
- References: <517A8974 dot 7000202 at codesourcery dot com> <87a9okicyo dot fsf at talisman dot default>
On 04/27/2013 10:39 AM, Richard Sandiford wrote:
> Argh, that's unfortunate. The point of that change was to make
> simplify_gen_unary (TRUNCATE, ...) no worse than using a subreg.
> Would the equivalent lowpart simplify_gen_subreg call succeed
> (return nonnull)? If so, I think we want truncate to do the same.
> What simplification is this blocking, and why does it lead to
> reload failures?
There's an explicit (set (reg:PSI) (truncate:PSI (reg:SI)) insn which
currently gets changed to (set (reg:PSI) (subreg:PSI (reg:SI)) during
cse1. Reload fails because the subreg gets propagated into a memory
address, which requires a class of A_REGS, but A_REGS can only hold
PSImode values, not SImode. This shows that the truncation is not
always a no-op: in this case it involves a register move, but there's no
way to describe this using TRULY_NOOP_TRUNCATION.