public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] PR tree-optimization/97546 Bail out of find_bswap_or_nop on non-INTEGER_CST sizes
Date: Mon, 26 Oct 2020 10:32:09 +0100	[thread overview]
Message-ID: <20201026093209.GG7080@tucnak> (raw)
In-Reply-To: <DB7PR08MB30022BD20E815917F14B109193190@DB7PR08MB3002.eurprd08.prod.outlook.com>

On Mon, Oct 26, 2020 at 09:20:42AM +0000, Kyrylo Tkachov via Gcc-patches wrote:
> This patch fixes the ICE in the PR by bailing out of find_bswap_or_nop on poly_int sizes.
> I don't think it intends to handle them and from my reading of the code it's the most appropriate place to reject them
> here rather than in the callers.
> 
> Bootstrapped and tested on aarch64-none-linux-gnu.
> 
> Ok for trunk?
> Thanks,
> Kyrill
> 
> gcc/
> 	PR tree-optimization/97546
> 	* gimple-ssa-store-merging.c (find_bswap_or_nop): Return NULL if type is
> 	not INTEGER_CST.

I think better use tree_fits_uhwi_p instead of cst_and_fits_hwi and
instead of TREE_INT_CST_LOW use tree_to_uhwi.
TYPE_SIZE_UNIT which doesn't fit into uhwi but fits into shwi is something
that really shouldn't appear.
Otherwise LGTM.

> gcc/testsuite/
> 	PR tree-optimization/97546
> 	* gcc.target/aarch64/sve/acle/general/pr97546.c: New test.



	Jakub


  reply	other threads:[~2020-10-26  9:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26  9:20 Kyrylo Tkachov
2020-10-26  9:32 ` Jakub Jelinek [this message]
2020-10-26 11:32   ` Kyrylo Tkachov
2020-10-26 11:34     ` Jakub Jelinek

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=20201026093209.GG7080@tucnak \
    --to=jakub@redhat.com \
    --cc=Kyrylo.Tkachov@arm.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).