[Bug rtl-optimization/92342] [10 Regression] a small missed transformation into x?b:0

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 28 09:19:00 GMT 2020


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
For this, I agree we should canonicalize the second form to the first one
(well, any commutative x & -boolean_range into boolean_range ? x : 0 because at
least in 95% of cases it will be written the former way, the latter form looks
like a cute trick trying to workaround compiler deficiencies.
If the x & -boolean_range form results in better code than boolean_range ? x :
0 on some target, we should make sure to expand the ?: that way somewhere in
RTL.


More information about the Gcc-bugs mailing list