From: Aldy Hernandez <aldyh@redhat.com>
To: GCC patches <gcc-patches@gcc.gnu.org>
Cc: Andrew MacLeod <amacleod@redhat.com>, Aldy Hernandez <aldyh@redhat.com>
Subject: [COMMITTED] Do not compare nonzero masks for varying.
Date: Mon, 3 Oct 2022 13:08:13 +0200 [thread overview]
Message-ID: <20221003110815.1075975-2-aldyh@redhat.com> (raw)
In-Reply-To: <20221003110815.1075975-1-aldyh@redhat.com>
There is no need to compare nonzero masks when comparing two VARYING
ranges, as they are always the same when range types are the same.
gcc/ChangeLog:
* value-range.cc (irange::legacy_equal_p): Remove nonozero mask
check when comparing VR_VARYING ranges.
---
gcc/value-range.cc | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/gcc/value-range.cc b/gcc/value-range.cc
index 6154d73ccf5..ddbcdd67633 100644
--- a/gcc/value-range.cc
+++ b/gcc/value-range.cc
@@ -1233,10 +1233,7 @@ irange::legacy_equal_p (const irange &other) const
if (m_kind == VR_UNDEFINED)
return true;
if (m_kind == VR_VARYING)
- {
- return (range_compatible_p (type (), other.type ())
- && vrp_operand_equal_p (m_nonzero_mask, other.m_nonzero_mask));
- }
+ return range_compatible_p (type (), other.type ());
return (vrp_operand_equal_p (tree_lower_bound (0),
other.tree_lower_bound (0))
&& vrp_operand_equal_p (tree_upper_bound (0),
--
2.37.1
next prev parent reply other threads:[~2022-10-03 11:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-03 11:08 [COMMITTED] Do not compare incompatible ranges in ipa-prop Aldy Hernandez
2022-10-03 11:08 ` Aldy Hernandez [this message]
2022-10-03 11:08 ` [COMMITTED] Avoid comparing ranges when sub-ranges is 0 Aldy Hernandez
2022-10-03 11:08 ` [COMMITTED] Do not pessimize range in set_nonzero_bits Aldy Hernandez
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=20221003110815.1075975-2-aldyh@redhat.com \
--to=aldyh@redhat.com \
--cc=amacleod@redhat.com \
--cc=gcc-patches@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).