https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108356

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Andrew Macleod from comment #1)
> From ccp2 :
> 
> Simulating block 2
> 
> Visiting statement:
> c.2_1 = c;
> which is likely CONSTANT
> Lattice value changed to VARYING.  Adding SSA edges to worklist.
> 
> 
> Whereas in GCC12 I see:
> 
> Simulating block 2
> 
> Visiting statement:
> c.2_1 = c;
> which is likely CONSTANT
> Lattice value changed to CONSTANT 3.  Adding SSA edges to worklist.
> marking stmt to be not simulated again
> 
> 
> So we use to pick up that the memory load produces a 3 in CCP, but we no
> longer do.   I'm not sure how that specified ranger cache patch causes this?
> ISTR some other PR where we aren't picking up a constant from a memory load
> as well.

The store c = 0 needs to be eliminated before IPA for that to work (and c
promoted constant).  Possibly some change in jump-threading?

Reply via email to