aboutsummaryrefslogtreecommitdiff
path: root/libcpp/generated_cpp_wcwidth.h
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2022-11-04 10:20:46 +0100
committerAldy Hernandez <aldyh@redhat.com>2022-11-04 15:18:18 +0100
commit679be32e66428f0ba81d1c1b55f7bd47f01cb295 (patch)
tree1f0f72dae83381e8c67ce106a470fef92043f39b /libcpp/generated_cpp_wcwidth.h
parent0bdf10bdf1b2c9f31e7e764dec4d56ea6044f943 (diff)
downloadgcc-679be32e66428f0ba81d1c1b55f7bd47f01cb295.zip
gcc-679be32e66428f0ba81d1c1b55f7bd47f01cb295.tar.gz
gcc-679be32e66428f0ba81d1c1b55f7bd47f01cb295.tar.bz2
Set nonzero bits for multiplication and divisions by a power of 2.
We're missing a lot of TLC in keeping track of nonzero bits across range-ops. It isn't an oversight, but just limited amount of hours to implement stuff. This patch keeps better track of the nonzero mask (really maybe_nonzero bits as discussed) across multiplication and division when the RHS is a power of 2. It fixes PR107342 and also touches on PR55157. In the latter, the nonzero mask is being set quite late (CCP2) but could be set by evrp time if we enhanced range-ops. I have added tests from both PRs. Tested PR tree-optimization/107342 gcc/ChangeLog: * range-op.cc (operator_mult::fold_range): New. (operator_div::fold_range): New. gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/vrp122.c: New test. * gcc.dg/tree-ssa/vrp123.c: New test.
Diffstat (limited to 'libcpp/generated_cpp_wcwidth.h')
0 files changed, 0 insertions, 0 deletions