re PR tree-optimization/67328 (range test rather than single bit test for code testin...
authorYury Gribov <tetra2005@gmail.com>
Tue, 13 Jun 2017 11:13:52 +0000 (11:13 +0000)
committerMaxim Ostapenko <chefmax@gcc.gnu.org>
Tue, 13 Jun 2017 11:13:52 +0000 (14:13 +0300)
commit16842d34e7fceebcecc24910e9219a1581fffb32
treeb8dfa51c6b364f24b5de6aa6cf85779c233e4c24
parentba593ad58f849c711afc0f2255630757e020ccda
re PR tree-optimization/67328 (range test rather than single bit test for code testing enum values)

2017-06-13  Yury Gribov  <tetra2005@gmail.com>

gcc/
PR tree-optimization/67328
* fold-const.c (maskable_range_p): New function.
(build_range_check): Generate bittests if possible.

gcc/testsuite/
PR tree-optimization/67328
* c-c++-common/fold-masked-cmp-1.c: New test.
* c-c++-common/fold-masked-cmp-2.c: Likewise.
* gcc.dg/pr46309.c: Fix pattern.
* gcc.dg/pr46309-2.c: Likewise.

From-SVN: r249149
gcc/ChangeLog
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/fold-masked-cmp-1.c [new file with mode: 0644]
gcc/testsuite/c-c++-common/fold-masked-cmp-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr46309-2.c
gcc/testsuite/gcc.dg/pr46309.c