public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
To: Xi Ruoyao <xry111@xry111.site>
Cc: Richard Biener <rguenther@suse.de>,
	gcc-patches@gcc.gnu.org,
	 Andre Vieira <andre.simoesdiasvieira@arm.com>,
	Jakub Jelinek <jakub@redhat.com>,
	 Hongtao Liu <crazylht@gmail.com>
Subject: Re: Pushed: [PATCH v2] vect: Fix vectorized BIT_FIELD_REF for signed bit-fields [PR110557]
Date: Tue, 11 Jul 2023 13:04:12 +0530	[thread overview]
Message-ID: <CAAgBjMkpt3QePWh36H0_7kN7EMfCEznvQzhuFJo7Q1Mot7nN1Q@mail.gmail.com> (raw)
In-Reply-To: <b0bed5d4145e1133a1ded38274b3b10d9ed426b3.camel@xry111.site>

On Mon, 10 Jul 2023 at 16:43, Xi Ruoyao via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> On Mon, 2023-07-10 at 10:33 +0000, Richard Biener wrote:
> > On Fri, 7 Jul 2023, Xi Ruoyao wrote:
> >
> > > If a bit-field is signed and it's wider than the output type, we
> > > must
> > > ensure the extracted result sign-extended.  But this was not handled
> > > correctly.
> > >
> > > For example:
> > >
> > >     int x : 8;
> > >     long y : 55;
> > >     bool z : 1;
> > >
> > > The vectorized extraction of y was:
> > >
> > >     vect__ifc__49.29_110 =
> > >       MEM <vector(2) long unsigned int> [(struct Item
> > > *)vectp_a.27_108];
> > >     vect_patt_38.30_112 =
> > >       vect__ifc__49.29_110 & { 9223372036854775552,
> > > 9223372036854775552 };
> > >     vect_patt_39.31_113 = vect_patt_38.30_112 >> 8;
> > >     vect_patt_40.32_114 =
> > >       VIEW_CONVERT_EXPR<vector(2) long int>(vect_patt_39.31_113);
> > >
> > > This is obviously incorrect.  This pach has implemented it as:
> > >
> > >     vect__ifc__25.16_62 =
> > >       MEM <vector(2) long unsigned int> [(struct Item
> > > *)vectp_a.14_60];
> > >     vect_patt_31.17_63 =
> > >       VIEW_CONVERT_EXPR<vector(2) long int>(vect__ifc__25.16_62);
> > >     vect_patt_32.18_64 = vect_patt_31.17_63 << 1;
> > >     vect_patt_33.19_65 = vect_patt_32.18_64 >> 9;
> >
> > OK.
>
> Pushed r14-2407 and r13-7553.
Hi Xi,
Your commit:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=63ae6bc60c0f67fb2791991bf4b6e7e0a907d420,

seems to cause following regressions on arm-linux-gnueabihf:
FAIL: g++.dg/vect/pr110557.cc  -std=c++98 (test for excess errors)
FAIL: g++.dg/vect/pr110557.cc  -std=c++14 (test for excess errors)
FAIL: g++.dg/vect/pr110557.cc  -std=c++17 (test for excess errors)
FAIL: g++.dg/vect/pr110557.cc  -std=c++20 (test for excess errors)

Excess error:
gcc/testsuite/g++.dg/vect/pr110557.cc:12:8: warning: width of
'Item::y' exceeds its type

Thanks,
Prathamesh
>
> --
> Xi Ruoyao <xry111@xry111.site>
> School of Aerospace Science and Technology, Xidian University

  reply	other threads:[~2023-07-11  7:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07 13:18 Xi Ruoyao
2023-07-10 10:33 ` Richard Biener
2023-07-10 11:12   ` Pushed: " Xi Ruoyao
2023-07-11  7:34     ` Prathamesh Kulkarni [this message]
2023-07-11  8:12       ` [PATCH pushed] testsuite: Unbreak pr110557.cc where long is 32-bit (was Re: Pushed: [PATCH v2] vect: Fix vectorized BIT_FIELD_REF for signed bit-fields [PR110557]) Xi Ruoyao

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=CAAgBjMkpt3QePWh36H0_7kN7EMfCEznvQzhuFJo7Q1Mot7nN1Q@mail.gmail.com \
    --to=prathamesh.kulkarni@linaro.org \
    --cc=andre.simoesdiasvieira@arm.com \
    --cc=crazylht@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=rguenther@suse.de \
    --cc=xry111@xry111.site \
    /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).