public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-2091] Fix TYPE_PRECISION use in hashable_expr_equal_p
Date: Mon, 26 Jun 2023 11:05:35 +0000 (GMT)	[thread overview]
Message-ID: <20230626110535.8C4303858415@sourceware.org> (raw)

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

commit r14-2091-gc3bdee86183b3d84f269e9775b2603f8f8221417
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Jun 23 10:06:08 2023 +0200

    Fix TYPE_PRECISION use in hashable_expr_equal_p
    
    While the checks look unnecessary they probably are quick and
    thus done early.  The following avoids using TYPE_PRECISION
    on VECTOR_TYPEs by making the code match the comment which
    talks about precision and signedness.  An alternative would
    be to only retain the ERROR_MARK and TYPE_MODE checks or
    use TYPE_PRECISION_RAW (but I like that least).
    
            * tree-ssa-scopedtables.cc (hashable_expr_equal_p):
            Use element_precision.

Diff:
---
 gcc/tree-ssa-scopedtables.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/tree-ssa-scopedtables.cc b/gcc/tree-ssa-scopedtables.cc
index 528ddf2a2ab..e698ef97343 100644
--- a/gcc/tree-ssa-scopedtables.cc
+++ b/gcc/tree-ssa-scopedtables.cc
@@ -574,7 +574,7 @@ hashable_expr_equal_p (const struct hashable_expr *expr0,
       && (TREE_CODE (type0) == ERROR_MARK
 	  || TREE_CODE (type1) == ERROR_MARK
 	  || TYPE_UNSIGNED (type0) != TYPE_UNSIGNED (type1)
-	  || TYPE_PRECISION (type0) != TYPE_PRECISION (type1)
+	  || element_precision (type0) != element_precision (type1)
 	  || TYPE_MODE (type0) != TYPE_MODE (type1)))
     return false;

                 reply	other threads:[~2023-06-26 11:05 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=20230626110535.8C4303858415@sourceware.org \
    --to=rguenth@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).