]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix swapping of ranges.
authorAldy Hernandez <aldyh@redhat.com>
Wed, 21 Dec 2022 18:26:00 +0000 (19:26 +0100)
committerAldy Hernandez <aldyh@redhat.com>
Wed, 26 Apr 2023 09:12:39 +0000 (11:12 +0200)
commit04e5ddf8a313e85348a05c27708c845cc45e2e83
tree66f1c3a7b6837694f0a3a33ccb3ada78d8db0efb
parent5bdc5155138abeb244be1690998b359152445be6
Fix swapping of ranges.

The legacy range code has logic to swap out of order endpoints in the
irange constructor.  The new irange code expects the caller to fix any
inconsistencies, thus speeding up the common case.  However, this means
that when we remove legacy, any stragglers must be fixed.  This patch
fixes the 3 culprits found during the conversion.

gcc/ChangeLog:

* range-op.cc (operator_cast::op1_range): Use
create_possibly_reversed_range.
(operator_bitwise_and::simple_op1_range_solver): Same.
* value-range.cc (swap_out_of_order_endpoints): Delete.
(irange::set): Remove call to swap_out_of_order_endpoints.
gcc/range-op.cc
gcc/value-range.cc