[Bug tree-optimization/100864] (a&!b) | b is not opimized to a | b for comparisons
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jun 5 01:21:42 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100864
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> You can possibly merge it with the
That is where I put it already, the ... was actually that part. Obviously this
was not a patch just showing what was done.
>
> by using sth like logical_inverted_value (you want bit_inverted_value),
>
> Also you don't need
>
> (for cmp (tcc_comparison)
> (for icmp (tcc_comparison)
>
> but just
>
> (for cmp (tcc_comparison)
> icmp (inverted_tcc_comparison)
> ncmp (inverted_tcc_comparison_with_nans))
> ...
> (if (ic == icmp || ic == ncmp)
> ...
>
> right?
Does not work as there would be many of the same patterns with the above for
loop as inverted_tcc_comparison and inverted_tcc_comparison_with_nans have a
non empty intersection. The reason why it worked for the other usage of
inverted_tcc_comparison/inverted_tcc_comparison_with_nans is because it was the
resulting pattern rather than the matching pattern.
More information about the Gcc-bugs
mailing list