public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Richard Sandiford <richard.sandiford@arm.com>,
	 Uros Bizjak <ubizjak@gmail.com>
Subject: Re: [PATCH v2 03/11] Remove MAX_BITSIZE_MODE_ANY_INT
Date: Wed, 12 May 2021 05:06:19 -0700	[thread overview]
Message-ID: <CAMe9rOqz1FRPzWyWT2vpfbH-6dRrgZDwbtg6eoYV5nD3EWirYQ@mail.gmail.com> (raw)
In-Reply-To: <CAFiYyc3tCT6s_HXcNBHk_cG09t1=b6AhGWQfYQMpxPP-PHGf7Q@mail.gmail.com>

On Wed, May 12, 2021 at 2:00 AM Richard Biener
<richard.guenther@gmail.com> wrote:
>
> On Wed, May 12, 2021 at 1:35 AM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > It is only defined for i386 and everyone uses the default:
> >
> >  #define MAX_BITSIZE_MODE_ANY_INT (64*BITS_PER_UNIT)
>
> The default is determined by genmodes.c which looks at the maximum
> size of any [partial] integer mode.  Since we have
>
> INT_MODE (OI, 32);
> INT_MODE (XI, 64);
>
> this will increase the size of wide_int.  aarch64 and arm are the only
> other targets with XImode, OImode is also used by s390 and ia64.
>
> Keeping wide_int small is desirable.

Since I want to use OImode and XImode in op_by_pieces operations,
wide_int needs to support OImode and XImode.

> Richard.
>
> > Whatever problems we had before, they have been fixed now.
> >
> >         * config/i386/i386-modes.def (MAX_BITSIZE_MODE_ANY_INT): Removed.
> > ---
> >  gcc/config/i386/i386-modes.def | 15 +++------------
> >  1 file changed, 3 insertions(+), 12 deletions(-)
> >
> > diff --git a/gcc/config/i386/i386-modes.def b/gcc/config/i386/i386-modes.def
> > index dbddfd8e48f..4e7014be034 100644
> > --- a/gcc/config/i386/i386-modes.def
> > +++ b/gcc/config/i386/i386-modes.def
> > @@ -107,19 +107,10 @@ INT_MODE (XI, 64);
> >  PARTIAL_INT_MODE (HI, 16, P2QI);
> >  PARTIAL_INT_MODE (SI, 32, P2HI);
> >
> > -/* Mode used for signed overflow checking of TImode.  As
> > -   MAX_BITSIZE_MODE_ANY_INT is only 160, wide-int.h reserves only that
> > -   rounded up to multiple of HOST_BITS_PER_WIDE_INT bits in wide_int etc.,
> > -   so OImode is too large.  For the overflow checking we actually need
> > -   just 1 or 2 bits beyond TImode precision.  Use 160 bits to have
> > -   a multiple of 32.  */
> > +/* Mode used for signed overflow checking of TImode.  For the overflow
> > +   checking we actually need just 1 or 2 bits beyond TImode precision.
> > +   Use 160 bits to have a multiple of 32.  */
> >  PARTIAL_INT_MODE (OI, 160, POI);
> >
> > -/* Keep the OI and XI modes from confusing the compiler into thinking
> > -   that these modes could actually be used for computation.  They are
> > -   only holders for vectors during data movement.  Include POImode precision
> > -   though.  */
> > -#define MAX_BITSIZE_MODE_ANY_INT (160)
> > -
> >  /* The symbol Pmode stands for one of the above machine modes (usually SImode).
> >     The tm.h file specifies which one.  It is not a distinct mode.  */
> > --
> > 2.31.1
> >



-- 
H.J.

  reply	other threads:[~2021-05-12 12:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 23:35 [PATCH v2 00/11] Allow TImode/OImode/XImode in op_by_pieces operations H.J. Lu
2021-05-11 23:35 ` [PATCH v2 01/11] Add TARGET_READ_MEMSET_VALUE/TARGET_GEN_MEMSET_VALUE H.J. Lu
2021-05-30 18:49   ` Jeff Law
2021-05-31 12:04     ` H.J. Lu
2021-05-31 18:07       ` Jeff Law
2021-05-31 18:13         ` H.J. Lu
2021-05-31 18:20           ` H.J. Lu
2021-06-01  7:24             ` Richard Biener
2021-05-11 23:35 ` [PATCH v2 02/11] x86: Avoid stack realignment when copying data H.J. Lu
2021-05-11 23:35 ` [PATCH v2 03/11] Remove MAX_BITSIZE_MODE_ANY_INT H.J. Lu
2021-05-12  9:00   ` Richard Biener
2021-05-12 12:06     ` H.J. Lu [this message]
2021-05-12 12:15       ` Richard Biener
2021-05-11 23:35 ` [PATCH v2 04/11] x86: Update piecewise move and store H.J. Lu
2021-05-11 23:35 ` [PATCH v2 05/11] x86: Add AVX2 tests for PR middle-end/90773 H.J. Lu
2021-05-11 23:35 ` [PATCH v2 06/11] x86: Add tests for piecewise move and store H.J. Lu
2021-05-11 23:35 ` [PATCH v2 07/11] x86: Also pass -mno-avx to pr72839.c H.J. Lu
2021-05-11 23:35 ` [PATCH v2 08/11] x86: Also pass -mno-avx to cold-attribute-1.c H.J. Lu
2021-05-11 23:35 ` [PATCH v2 09/11] x86: Also pass -mno-avx to sw-1.c for ia32 H.J. Lu
2021-05-11 23:35 ` [PATCH v2 10/11] x86: Update gcc.target/i386/incoming-11.c H.J. Lu
2021-05-11 23:35 ` [PATCH v2 11/11] constructor: Check if it is faster to load constant from memory H.J. Lu

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=CAMe9rOqz1FRPzWyWT2vpfbH-6dRrgZDwbtg6eoYV5nD3EWirYQ@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    --cc=richard.sandiford@arm.com \
    --cc=ubizjak@gmail.com \
    /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).