]> gcc.gnu.org Git - gcc.git/commit
ranger: Add range-ops for widen addition and widen multiplication [PR108583]
authorTamar Christina <tamar.christina@arm.com>
Sun, 12 Mar 2023 18:40:12 +0000 (18:40 +0000)
committerTamar Christina <tamar.christina@arm.com>
Sun, 12 Mar 2023 18:40:12 +0000 (18:40 +0000)
commit03c6ba86757f0684c5419c90651106900f5ecb5a
tree6dd54fee375493a7fd5ea179cab4f9f987441e7f
parent2246d576f922bae3629da0fe1dbfcc6ff06769ad
ranger: Add range-ops for widen addition and widen multiplication [PR108583]

This adds range-ops for widening addition and widening multiplication.

I couldn't figure out how to write a test for this.  It looks like there are
self tests but not a way to write standalone ones?  I did create testcases in
the patch 3/4 which tests the end result.

gcc/ChangeLog:

PR target/108583
* gimple-range-op.h (gimple_range_op_handler): Add maybe_non_standard.
* gimple-range-op.cc (gimple_range_op_handler::gimple_range_op_handler):
Use it.
(gimple_range_op_handler::maybe_non_standard): New.
* range-op.cc (class operator_widen_plus_signed,
operator_widen_plus_signed::wi_fold, class operator_widen_plus_unsigned,
operator_widen_plus_unsigned::wi_fold, class operator_widen_mult_signed,
operator_widen_mult_signed::wi_fold, class operator_widen_mult_unsigned,
operator_widen_mult_unsigned::wi_fold,
ptr_op_widen_mult_signed, ptr_op_widen_mult_unsigned,
ptr_op_widen_plus_signed, ptr_op_widen_plus_unsigned): New.
* range-op.h (ptr_op_widen_mult_signed, ptr_op_widen_mult_unsigned,
ptr_op_widen_plus_signed, ptr_op_widen_plus_unsigned): New

Co-Authored-By: Andrew MacLeod <amacleod@redhat.com>
gcc/gimple-range-op.cc
gcc/gimple-range-op.h
gcc/range-op.cc
gcc/range-op.h
This page took 0.066763 seconds and 6 git commands to generate.