aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/openmp.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@nextmovesoftware.com>2021-08-23 12:44:37 +0100
committerRoger Sayle <roger@nextmovesoftware.com>2021-08-23 12:44:37 +0100
commite7721590e08e6d87adc879f8d549557cbe2bb7bb (patch)
treee07bef1270a6c92bb4bfff28434b3431e4945414 /gcc/fortran/openmp.c
parent7e5f9ead16d7514b3baa0254084de94f0bfcd216 (diff)
downloadgcc-e7721590e08e6d87adc879f8d549557cbe2bb7bb.zip
gcc-e7721590e08e6d87adc879f8d549557cbe2bb7bb.tar.gz
gcc-e7721590e08e6d87adc879f8d549557cbe2bb7bb.tar.bz2
Improved handling of division/modulus in bit CCP.
This patch implements support for TRUNC_MOD_EXPR and TRUNC_DIV_EXPR in tree-ssa's bit CCP pass. This is mostly for completeness, as the VRP pass already provides better bounds for these operations, but seeing mask values of all_ones in my debugging/instrumentation logs seemed overly pessimistic. With this patch, the expression X%10 has a nonzero bits of 0x0f (for unsigned X), likewise (X&1)/3 has a known value of zero, and (X&3)/3 has a nonzero bits mask of 0x1. 2021-08-23 Roger Sayle <roger@nextmovesoftware.com> gcc/ChangeLog * tree-ssa-ccp.c (bit_value_binop) [TRUNC_MOD_EXPR, TRUNC_DIV_EXPR]: Provide bounds for unsigned (and signed with non-negative operands) division and modulus.
Diffstat (limited to 'gcc/fortran/openmp.c')
0 files changed, 0 insertions, 0 deletions