aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/interface.c
diff options
context:
space:
mode:
authorXionghu Luo <luoxhu@linux.ibm.com>2020-05-10 21:06:20 -0500
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 12:58:15 -0300
commit7f96e4628c8888f0ec3d73a0b3890acfe64a4b1d (patch)
treeffc4b06c5fda9efeb839ecdea5cea6986b92169d /gcc/fortran/interface.c
parent298d824c0e5191b77080a943e622f0efd91e7a96 (diff)
downloadgcc-7f96e4628c8888f0ec3d73a0b3890acfe64a4b1d.zip
gcc-7f96e4628c8888f0ec3d73a0b3890acfe64a4b1d.tar.gz
gcc-7f96e4628c8888f0ec3d73a0b3890acfe64a4b1d.tar.bz2
Add handling of MULT_EXPR/PLUS_EXPR for wrapping overflow in affine combination(PR83403)
Use determine_value_range to get value range info for fold convert expressions with internal operation PLUS_EXPR/MINUS_EXPR/MULT_EXPR when not overflow on wrapping overflow inner type. i.e.: (long unsigned int)((unsigned int)n * 10 + 1) => (long unsigned int)n * (long unsigned int)10 + (long unsigned int)1 With this patch for affine combination, load/store motion could detect more address refs independency and promote some memory expressions to registers within loop. PS: Replace the previous "(T1)(X + CST) as (T1)X - (T1)(-CST))" to "(T1)(X + CST) as (T1)X + (T1)(CST))" for wrapping overflow. Bootstrap and regression tested pass on Power8-LE. gcc/ChangeLog 2020-05-11 Xiong Hu Luo <luoxhu@linux.ibm.com> PR tree-optimization/83403 * tree-affine.c (expr_to_aff_combination): Replace SSA_NAME with determine_value_range, Add fold conversion of MULT_EXPR, fix the previous PLUS_EXPR. gcc/testsuite/ChangeLog 2020-05-11 Xiong Hu Luo <luoxhu@linux.ibm.com> PR tree-optimization/83403 * gcc.dg/tree-ssa/pr83403-1.c: New test. * gcc.dg/tree-ssa/pr83403-2.c: New test. * gcc.dg/tree-ssa/pr83403.h: New header.
Diffstat (limited to 'gcc/fortran/interface.c')
0 files changed, 0 insertions, 0 deletions