Hi!

On Sat, Apr 10, 2021 at 08:02:29AM +0200, Jakub Jelinek wrote:
> Here is an alternate patch for the PR99830 bug.
> As discussed on IRC and in the PR, the reason why a (clobber:TI (const_int 0))
> has been propagated into the debug insns is that it got optimized away
> during simplification from the i3 instruction pattern.
> 
> And that happened because
> simplify_and_const_int_1 (SImode, varop, 255)
> with varop of
> (ashift:SI (subreg:SI (and:TI (clobber:TI (const_int 0 [0]))
>                             (const_int 255 [0xff])) 0)
>            (const_int 16 [0x10]))
> was called and through nonzero_bits determined that (whatever << 16) & 255
> is const0_rtx.
> It is, but if there are side-effects in varop and such clobbers are
> considered as such, we shouldn't optimize those away.
> 
> Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

Okay for trunk.  Thank you!

We'll need to audit all other code doing similar things as well, or add
some assert at some strategic spot.  Something for GCC 12 :-)


Segher

Reply via email to