This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: Fix PR middle-end/59049
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: Joern Rennecke <joern dot rennecke at embecosm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>
- Date: Fri, 8 Nov 2013 16:32:09 +0100
- Subject: Re: RFA: Fix PR middle-end/59049
- Authentication-results: sourceware.org; auth=none
- References: <CAMqJFCqWDNTjmJ11p-LGE4vBPQ7gBSLWY3prXFNv7+QUoL_ipw at mail dot gmail dot com> <CABu31nOfNL0ysg-zCTO=txx_SYv_n5XU3M2hFB-NxsgRW2hwGg at mail dot gmail dot com> <CAMqJFCrtSXDvCZE=E2VP1xsTf7o6OdCn=KsQ9hV0LO6BO=BD+w at mail dot gmail dot com>
On Fri, Nov 8, 2013 at 4:18 PM, Joern Rennecke wrote:
> On 8 November 2013 14:45, Steven Bosscher wrote:
>> This is IMHO not OK without at least an explanation of why the
>> comparison of two const_ints is not folded. Better yet would be to fix
>> that underlying problem. We should not present such non-sense to the
>> RTL parts of the middle end.
>
> Which part would be responsible to folding the comparison at -O1 ?
> FWIW, as I just commented in the PR, one of the operands is an ssa_name
> with a known value.
This usually is taken care of by one of the many propagation passes
(CCP, VRP, forwprop, DOM, even FRE/PRE). The only cases I've
previously encountered, where a known value ends up not being
propagated, is when the propagation is somehow overlooked and the
known value is only replaced at out-of-ssa time, i.e. TER.
The only way to find out where the propagation should have happened,
is by looking at the gimple dumps.
Ciao!
Steven