public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Remove redundant check
Date: Tue, 7 May 2024 13:20:55 +0200 (CEST)	[thread overview]
Message-ID: <20240507112055.lbtcwliSGckNh2qb0SS3YGbXxs2SPzdSsZ_b9naqUTs@z> (raw)

operand_equal_p already has checking code to verify the hash
is equal, avoid doing that again in gimplify_hasher::equal.

Re-bootstrap & regtest running on x86_64-unknown-linux-gnu.

	* gimplify.cc (gimplify_hasher::equal): Remove redundant
	checking.
---
 gcc/gimplify.cc | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc
index a6573a498d9..26e96ada4c7 100644
--- a/gcc/gimplify.cc
+++ b/gcc/gimplify.cc
@@ -19603,9 +19603,5 @@ gimplify_hasher::equal (const elt_t *p1, const elt_t *p2)
   if (!operand_equal_p (t1, t2, 0))
     return false;
 
-  /* Only allow them to compare equal if they also hash equal; otherwise
-     results are nondeterminate, and we fail bootstrap comparison.  */
-  gcc_checking_assert (hash (p1) == hash (p2));
-
   return true;
 }
-- 
2.35.3

                 reply	other threads:[~2024-05-07 11:20 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=20240507112055.lbtcwliSGckNh2qb0SS3YGbXxs2SPzdSsZ_b9naqUTs@z \
    --to=rguenther@suse.de \
    --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).