This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix PR optimization/10876
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 25 May 2003 08:31:37 +0200
- Subject: Re: [PATCH] Fix PR optimization/10876
- References: <10305242307.AA25330@vlsi1.ultra.nyu.edu>
> I was using Chris' notation, so the problematic pattern is actually
> (plus (reg) (const_int 4096))
> which is not valid on SPARC, whereas
> (minus (reg) (const_int -4096))
> would be, without the canonicalization restriction.
> I think you are confused. If the latter is valid, then whatever code
> would be generated for it is generated for the former, since they are
No, I only exposed the problem in RTL notation to avoid using SPARC assembly.
In other words: the direct translation in SPARC assembly of the first form
is impossible, while that of the second is possible.
Currently the SPARC port (illegally according to the canonicalization rules)
turns the first form into the second one at the RTL expander level. Zack and
Jakub suggested the correct fix, which is to do the transformation only when
emitting assembly code.