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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> Hmm. disabling:
> 
> /* x | C -> C if we know that x & ~C == 0.  */
> (simplify
>  (bit_ior SSA_NAME@0 INTEGER_CST@1)
>  (if (INTEGRAL_TYPE_P (TREE_TYPE (@0))
>       && wi::bit_and_not (get_nonzero_bits (@0), wi::to_wide (@1)) == 0)
>   @1))
> 
> Fixes it.
> 
> So this was caused/exposed by r14-3485-g6df8dcec7196e4 .
> 
> Note that above pattern is hitting during PRE. I have to double check to
> make sure that is correct.

The match pattern is correct what we get through PRE is:
_17 | 1
Where _17's range is [0,1]
so obvious this is just 1.

So either what pre is sending off to match-and-simplify is wrong or the way pre
uses match-and-simplify is wrong. What the match does is correct for what it is
given..

Reply via email to