]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/match.pd
match.pd: Simplify X ? C : 0 where C is a power of 2 and X tests a single bit.
authorPaolo Bonzini <bonzini@gcc.gnu.org>
Mon, 5 Dec 2016 13:19:34 +0000 (13:19 +0000)
committerPaolo Bonzini <bonzini@gcc.gnu.org>
Mon, 5 Dec 2016 13:19:34 +0000 (13:19 +0000)
commit519e0faa00bda70c9ffd66b7e7a6011c5e742d2b
treeb2b3238a915ab7d938a1ee24f4bf5be5561f10a5
parentd0ea9f0aa270f9791df42eb409e90c718575ad9a
match.pd: Simplify X ? C : 0 where C is a power of 2 and X tests a single bit.

gcc:
* match.pd: Simplify X ? C : 0 where C is a power of 2 and
X tests a single bit.

gcc/testsuite:
* gcc.dg/fold-and-lshift.c, gcc.dg/fold-and-rshift-1.c,
gcc.dg/fold-and-rshift-2.c: New testcases.

From-SVN: r243255
gcc/ChangeLog
gcc/match.pd
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/fold-and-lshift.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/fold-and-rshift-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/fold-and-rshift-2.c [new file with mode: 0644]