https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84834
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Jun 22 20:38:25 2018 New Revision: 261921 URL: https://gcc.gnu.org/viewcvs?rev=261921&root=gcc&view=rev Log: Backported from mainline 2018-03-13 Jakub Jelinek <ja...@redhat.com> PR middle-end/84834 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of integer_pow2p@2 and test integer_pow2p in condition. (A < 0 ? C : 0): Similarly for @1. * gcc.dg/pr84834.c: New test. Added: branches/gcc-7-branch/gcc/testsuite/gcc.dg/pr84834.c Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/match.pd branches/gcc-7-branch/gcc/testsuite/ChangeLog