public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3902] [range-ops] Avoid unnecessary intersection in update_known_bitmask.
@ 2022-11-11 13:53 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2022-11-11 13:53 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:c0662c74969820fb576c8a2f35e946581c2c6f9d

commit r13-3902-gc0662c74969820fb576c8a2f35e946581c2c6f9d
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Fri Nov 11 10:11:03 2022 +0100

    [range-ops] Avoid unnecessary intersection in update_known_bitmask.
    
    All the work for keeping the maybe nonzero masks up to date is being
    done by the bit-CCP code now.  Any bitmask inherent in the range that
    range-ops may have calculated has no extra information, so the
    intersection is unnecessary.
    
    gcc/ChangeLog:
    
            * range-op.cc (update_known_bitmask): Avoid unnecessary intersection.

Diff:
---
 gcc/range-op.cc | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/gcc/range-op.cc b/gcc/range-op.cc
index 9eec46441a3..0b01cf48fdf 100644
--- a/gcc/range-op.cc
+++ b/gcc/range-op.cc
@@ -89,10 +89,7 @@ update_known_bitmask (irange &r, tree_code code,
   bit_value_binop (code, sign, prec, &value, &mask,
 		   lh_sign, lh_prec, lh_value, lh_mask,
 		   rh_sign, rh_prec, rh_value, rh_mask);
-
-  int_range<2> tmp (type);
-  tmp.set_nonzero_bits (value | mask);
-  r.intersect (tmp);
+  r.set_nonzero_bits (value | mask);
 }
 
 // Return the upper limit for a type.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-11 13:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 13:53 [gcc r13-3902] [range-ops] Avoid unnecessary intersection in update_known_bitmask Aldy Hernandez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).