https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94718
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:496f4f884716ae061f771a62e44868a32dbd502f commit r11-35-g496f4f884716ae061f771a62e44868a32dbd502f Author: Jakub Jelinek <ja...@redhat.com> Date: Mon May 4 11:01:08 2020 +0200 match.pd: Decrease number of nop conversions around bitwise ops [PR94718] On the following testcase, there are in *.optimized dump 14 nop conversions (from signed to unsigned and back), while this patch decreases that number to just 4; for bitwise ops it really doesn't matter if they are performed in signed or unsigned, so the patch (in GIMPLE only, there are some comments about it being undesirable during GENERIC earlier), if it sees both bitop operands nop converted from the same types performs the bitop in their non-converted type and converts the result (i.e. 2 conversions into 1), similarly, if a bitop has one operand nop converted from something, the other not and the result is converted back to the type of the nop converted operand before conversion, it is possible to replace those 2 conversions with just a single conversion of the other operand. 2020-05-04 Jakub Jelinek <ja...@redhat.com> PR tree-optimization/94718 * match.pd (bitop (convert @0) (convert? @1)): For GIMPLE, if we can, replace two nop conversions on bit_{and,ior,xor} argument and result with just one conversion on the result or another argument. * gcc.dg/tree-ssa/pr94718-3.c: New test.