public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Remove redundant check
@ 2024-05-07 11:20 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2024-05-07 11:20 UTC (permalink / raw)
  To: gcc-patches

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

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

only message in thread, other threads:[~2024-05-07 11:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-07 11:20 [PATCH] Remove redundant check Richard Biener

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).