public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hongtao Liu <crazylht@gmail.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: Richard Biener <richard.guenther@gmail.com>,
	liuhongt <hongtao.liu@intel.com>,
	 Michael Meissner <meissner@linux.ibm.com>,
	Andrew Waterman <andrew@sifive.com>,
	asolokha@gmx.com,  Andreas Schwab <schwab@linux-m68k.org>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 2/2] validate_subreg before call gen_lowpart to avoid ICE.
Date: Sat, 11 Sep 2021 09:04:56 +0800	[thread overview]
Message-ID: <CAMZc-byUzOLzgC0mYygtkkFkmqMjdo+fmjWWKrBcosVm0VP_Lg@mail.gmail.com> (raw)
In-Reply-To: <CAMZc-bzsxRpw2EJHjxFVuirgb5a-wwXdMzf84xSkdXvqgCr6fw@mail.gmail.com>

On Sat, Sep 11, 2021 at 8:29 AM Hongtao Liu <crazylht@gmail.com> wrote:
>
> On Sat, Sep 11, 2021 at 5:21 AM Segher Boessenkool
> <segher@kernel.crashing.org> wrote:
> >
> > On Fri, Sep 10, 2021 at 10:25:45PM +0800, Hongtao Liu wrote:
> > > Updated patch.
> > >
> > >   Bootstrapped and regtested on x86_64-linux-gnu{-m32,},  do I need to
> > > run this patch on other targets machine, or the patch is supposed to
> > > have minimal impact on other targets?
> > >   Then, ok for trunk?
> >
> > [-- Attachment #2: v2-0001-Check-modes_tieable_p-before-call-gen_lowpart-to-.pat
> > ch --]
> > [-- Type: application/octet-stream, Encoding: base64, Size: 1.4K --]
> >
> > [-- application/octet-stream is unsupported (use 'v' to view this part) --]
> >
> > Please send your patches inline, or if you *have to* use attachments,
> > use text attachments.  Without encoding.
> >
> hmm, my local file is
> $file 0001-Check-modes_tieable_p-before-call-gen_lowpart-to-avo.patch
> --mime-type
> 0001-Check-modes_tieable_p-before-call-gen_lowpart-to-avo.patch: text/x-diff
>
> Didn't figure out how to let webgmail not change mime type of attachment.
> > <https://gcc.gnu.org/contribute.html#patches>
> >
> > (It says "strongly discouraged", which means people will put it to the
> > bottom of the stack of things to look at).
> >
> >
> > Segher
>
> Here is an updated patch.
>
>   Bootstrapped and regtested on x86_64-linux-gnu{-m32,}
>   Ok for trunk?
>
> gcc/ChangeLog:
>
>         * machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): Check
>         SCALAR_INT_MODE_P for both modes.
> ---
>  gcc/machmode.h | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/machmode.h b/gcc/machmode.h
> index 158351350de..9f95d7d046c 100644
> --- a/gcc/machmode.h
> +++ b/gcc/machmode.h
> @@ -959,9 +959,10 @@ extern scalar_int_mode ptr_mode;
>  /* Target-dependent machine mode initialization - in insn-modes.c.  */
>  extern void init_adjust_machine_modes (void);
>
> -#define TRULY_NOOP_TRUNCATION_MODES_P(MODE1, MODE2) \
> -  (targetm.truly_noop_truncation (GET_MODE_PRECISION (MODE1), \
> -                                 GET_MODE_PRECISION (MODE2)))
> +#define TRULY_NOOP_TRUNCATION_MODES_P(MODE1, MODE2)                    \
> +  (SCALAR_INT_MODE_P(MODE1) && SCALAR_INT_MODE_P(MODE2)                \
will add space for SCALAR_INT_MODE_P (MODE1) && SCALAR_INT_MODE_P (MODE2)
> +   && targetm.truly_noop_truncation (GET_MODE_PRECISION (MODE1),       \
> +                                    GET_MODE_PRECISION (MODE2)))
>
>  /* Return true if MODE is a scalar integer mode that fits in a
>     HOST_WIDE_INT.  */
>
> --
> BR,
> Hongtao



-- 
BR,
Hongtao

  reply	other threads:[~2021-09-11  1:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 12:58 [PATCH 0/2] Revert r12-3277 since it caused regressions on many other targets liuhongt
2021-09-10 12:58 ` [PATCH 1/2] Revert "Get rid of all float-int special cases in validate_subreg." liuhongt
2021-09-10 13:05   ` Richard Biener
2021-09-10 12:58 ` [PATCH 2/2] validate_subreg before call gen_lowpart to avoid ICE liuhongt
2021-09-10 13:15   ` Richard Biener
2021-09-10 13:27     ` Hongtao Liu
2021-09-10 13:32       ` Richard Biener
2021-09-10 13:44         ` Hongtao Liu
2021-09-10 14:25           ` Hongtao Liu
2021-09-10 21:19             ` Segher Boessenkool
2021-09-11  0:29               ` Hongtao Liu
2021-09-11  1:04                 ` Hongtao Liu [this message]
2021-09-10 13:52         ` Hongtao Liu
2021-09-10 13:39       ` Hongtao Liu
2021-09-10 13:30     ` Segher Boessenkool
2021-09-10 13:58       ` Richard Biener
2021-09-10 16:24         ` Segher Boessenkool
2021-09-10 18:36           ` Richard Biener
2021-09-10 21:27             ` Segher Boessenkool
2021-09-11  8:25               ` Richard Biener
2021-09-11  9:51                 ` Hongtao Liu
2021-09-11 11:09                   ` Hongtao Liu
2021-09-13  6:10   ` Richard Biener
2021-09-13  6:32     ` Hongtao Liu
2021-09-13  9:15       ` Richard Biener
2021-09-13 11:14         ` Hongtao Liu
2021-09-13 11:44           ` Tobias Burnus
2021-09-13 11:45           ` 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=CAMZc-byUzOLzgC0mYygtkkFkmqMjdo+fmjWWKrBcosVm0VP_Lg@mail.gmail.com \
    --to=crazylht@gmail.com \
    --cc=andrew@sifive.com \
    --cc=asolokha@gmx.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hongtao.liu@intel.com \
    --cc=meissner@linux.ibm.com \
    --cc=richard.guenther@gmail.com \
    --cc=schwab@linux-m68k.org \
    --cc=segher@kernel.crashing.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).