Re: RFA: Simplifying truncation and integer lowpart subregs

2012-11-28 Thread Richard Sandiford
Ramana Radhakrishnan writes: > On Sun, Oct 7, 2012 at 8:56 AM, Richard Sandiford > wrote: >> Eric Botcazou writes: I think modelling it as a TRUNCATE operation is correct for !TRULY_NOOP_TRUNCATION (it's the bug that Andrew pointed out). And we shouldn't generate an actual TRUNCAT

Re: RFA: Simplifying truncation and integer lowpart subregs

2012-11-27 Thread Ramana Radhakrishnan
On Sun, Oct 7, 2012 at 8:56 AM, Richard Sandiford wrote: > Eric Botcazou writes: >>> I think modelling it as a TRUNCATE operation is correct for >>> !TRULY_NOOP_TRUNCATION (it's the bug that Andrew pointed out). >>> And we shouldn't generate an actual TRUNCATE rtx for >>> TRULY_NOOP_TRUNCATION (t

Re: RFA: Simplifying truncation and integer lowpart subregs

2012-10-07 Thread Eric Botcazou
> Yeah, in hindsight, the patch was definitely lacking commentary. > How about the patch below? It also fixes the partial int case > and gets rid of the errant NOT hunk. Tested in the same way as before. > > Richard > > > gcc/ > * machmode.h (GET_MODE_UNIT_PRECISION): New macro. >

Re: RFA: Simplifying truncation and integer lowpart subregs

2012-10-07 Thread Richard Sandiford
Eric Botcazou writes: >> I think modelling it as a TRUNCATE operation is correct for >> !TRULY_NOOP_TRUNCATION (it's the bug that Andrew pointed out). >> And we shouldn't generate an actual TRUNCATE rtx for >> TRULY_NOOP_TRUNCATION (the thing about making >> simplify_gen_unary (TRUNCATE, ...) no w

Re: RFA: Simplifying truncation and integer lowpart subregs

2012-10-06 Thread Eric Botcazou
> I think modelling it as a TRUNCATE operation is correct for > !TRULY_NOOP_TRUNCATION (it's the bug that Andrew pointed out). > And we shouldn't generate an actual TRUNCATE rtx for > TRULY_NOOP_TRUNCATION (the thing about making > simplify_gen_unary (TRUNCATE, ...) no worse than simplify_gen_subre

Re: RFA: Simplifying truncation and integer lowpart subregs

2012-10-06 Thread Richard Sandiford
Thanks for the review. Eric Botcazou writes: >> Tested on x86_64-linux-gnu, mipsisa32-elf and mipsisa64-elf. Also tested >> by making sure that there were no code differences for a set of gcc .ii >> files on gcc20 (-O2 -march=native). OK to install? > > Are you sure that generating TRUNCATEs ou

Re: RFA: Simplifying truncation and integer lowpart subregs

2012-10-06 Thread Eric Botcazou
> Tested on x86_64-linux-gnu, mipsisa32-elf and mipsisa64-elf. Also tested > by making sure that there were no code differences for a set of gcc .ii > files on gcc20 (-O2 -march=native). OK to install? Are you sure that generating TRUNCATEs out of nowhere in simplify_subreg is always correct?

RFA: Simplifying truncation and integer lowpart subregs

2012-10-06 Thread Richard Sandiford
[cc:ing sh, spu and tilegx maintainers] Richard Sandiford writes: > Andrew Pinski writes: >> On Thu, Sep 27, 2012 at 11:13 AM, Uros Bizjak wrote: >>> 2012-09-27 Uros Bizjak >>> >>> PR rtl-optimization/54457 >>> * simplify-rtx.c (simplify_subreg): >>> Simplify (subreg: