This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Fix PR middle-end/59049


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]