public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-3902] [range-ops] Avoid unnecessary intersection in update_known_bitmask.
Date: Fri, 11 Nov 2022 13:53:54 +0000 (GMT)	[thread overview]
Message-ID: <20221111135354.E2C9B385703F@sourceware.org> (raw)

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.

                 reply	other threads:[~2022-11-11 13:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221111135354.E2C9B385703F@sourceware.org \
    --to=aldyh@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).