public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org, jeffreyalaw@gmail.com
Subject: Re: [PATCH] Prevent TYPE_PRECISION on VECTOR_TYPEs
Date: Tue, 27 Jun 2023 11:47:05 +0200	[thread overview]
Message-ID: <ZJqwGa/38ui9LAyQ@tucnak> (raw)
In-Reply-To: <20230627094533.C82C713462@imap2.suse-dmz.suse.de>

On Tue, Jun 27, 2023 at 11:45:33AM +0200, Richard Biener wrote:
> The following makes sure that using TYPE_PRECISION on VECTOR_TYPE
> ICEs when tree checking is enabled.  This should avoid wrong-code
> in cases like PR110182 and instead ICE.
> 
> It also introduces a TYPE_PRECISION_RAW accessor and adjusts
> places I found that are eligible to use that.
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu with all
> languages enabled.
> 
> OK for trunk?  There is definitely going to be fallout but it
> should be straight-forward to fix with quick fixes using
> TYPE_PRECISION_RAW possible.
> 
> Thanks,
> Richard.
> 
> 	* tree.h (TYPE_PRECISION): Check for non-VECTOR_TYPE.
> 	(TYPE_PRECISION_RAW): Provide raw access to the precision
> 	field.
> 	* tree.cc (verify_type_variant): Compare TYPE_PRECISION_RAW.
> 	(gimple_canonical_types_compatible_p): Likewise.
> 	* tree-streamer-out.cc (pack_ts_type_common_value_fields):
> 	Stream TYPE_PRECISION_RAW.
> 	* tree-streamer-in.cc (unpack_ts_type_common_value_fields):
> 	Likewise.
> 	* lto-streamer-out.cc (hash_tree): Hash TYPE_PRECISION_RAW.
> 
> gcc/lto/
> 	* lto-common.cc (compare_tree_sccs_1): Use TYPE_PRECISION_RAW.

LGTM.

	Jakub


  reply	other threads:[~2023-06-27  9:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-27  9:45 Richard Biener
2023-06-27  9:47 ` Jakub Jelinek [this message]
2023-06-29  4:04   ` Li, Pan2
2023-06-29  4:18     ` Li, Pan2
2023-06-29 10:03       ` juzhe.zhong
2023-06-29 10:06         ` Robin Dapp
2023-06-29 10:07           ` Robin Dapp
2023-06-29 10:09             ` juzhe.zhong
2023-06-29  4:25     ` Jeff Law
2023-06-29  8:11       ` Richard Biener
2023-06-29  9:55         ` Robin Dapp
2023-06-29  9:56           ` Richard Biener
2023-06-29 11:07             ` Robin Dapp
2023-06-29 15:13         ` Jeff Law
  -- strict thread matches above, loose matches on Subject: below --
2023-06-09 11:23 Richard Biener
2023-06-09 11:53 ` Richard Biener
2023-06-09  7:40 Richard Biener

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=ZJqwGa/38ui9LAyQ@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=rguenther@suse.de \
    /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).