From: Tamar Christina <Tamar.Christina@arm.com>
To: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>,
Richard Biener <rguenther@suse.de>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
nd <nd@arm.com>, "jlaw@ventanamicro.com" <jlaw@ventanamicro.com>
Subject: RE: [PATCH]middle-end: check if target can do extract first for early breaks [PR113199]
Date: Tue, 9 Jan 2024 16:09:53 +0000 [thread overview]
Message-ID: <VI1PR08MB5325229BC7B8B49199E31DD8FF6A2@VI1PR08MB5325.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <yddwmsi7apw.fsf@CeBiTec.Uni-Bielefeld.DE>
Hmm I'm confused as to why It didn't break mine.. just did one again.. anyway I'll remove the unused variable.
> -----Original Message-----
> From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
> Sent: Tuesday, January 9, 2024 4:06 PM
> To: Richard Biener <rguenther@suse.de>
> Cc: Tamar Christina <Tamar.Christina@arm.com>; gcc-patches@gcc.gnu.org; nd
> <nd@arm.com>; jlaw@ventanamicro.com
> Subject: Re: [PATCH]middle-end: check if target can do extract first for early breaks
> [PR113199]
>
> Richard Biener <rguenther@suse.de> writes:
>
> > On Tue, 9 Jan 2024, Tamar Christina wrote:
> >
> >> > > -
> >> > > - gimple_seq_add_seq (&stmts, tem);
> >> > > -
> >> > > - scalar_res = gimple_build (&stmts, CFN_EXTRACT_LAST, scalar_type,
> >> > > - mask, vec_lhs_phi);
> >> > > + scalar_res = gimple_build (&stmts, CFN_VEC_EXTRACT, TREE_TYPE
> >> > (vectype),
> >> > > + vec_lhs_phi, bitstart);
> >> >
> >> > So bitstart is always zero? I wonder why using CFN_VEC_EXTRACT over
> >> > BIT_FIELD_REF here which wouldn't need any additional target support.
> >> >
> >>
> >> Ok, how about...
> >>
> >> ---
> >>
> >> I was generating the vector reverse mask without checking if the target
> >> actually supported such an operation.
> >>
> >> This patch changes it to if the bitstart is 0 then use BIT_FIELD_REF instead
> >> to extract the first element since this is supported by all targets.
> >>
> >> This is good for now since masks always come from whilelo. But in the future
> >> when masks can come from other sources we will need the old code back.
> >>
> >> Bootstrapped Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu
> >> and no issues with --enable-checking=release --enable-lto
> >> --with-build-config=bootstrap-O3 --enable-checking=yes,rtl,extra.
> >> tested on cross cc1 for amdgcn-amdhsa and issue fixed.
> >>
> >> Ok for master?
> >
> > OK.
> >
> >> Thanks,
> >> Tamar
> >>
> >> gcc/ChangeLog:
> >>
> >> PR tree-optimization/113199
> >> * tree-vect-loop.cc (vectorizable_live_operation_1): Use
> >> BIT_FIELD_REF.
>
> This patch broke bootstrap (everywhere, it seems; seen on
> i386-pc-solaris2.11 and sparc-sun-solaris2.11):
>
> /vol/gcc/src/hg/master/local/gcc/tree-vect-loop.cc: In function 'tree_node*
> vectorizable_live_operation_1(loop_vec_info, stmt_vec_info, basic_block, tree, int,
> slp_tree, tree, tree, tree, tree, bool, gimple_stmt_iterator*)':
> /vol/gcc/src/hg/master/local/gcc/tree-vect-loop.cc:10598:52: error: unused
> parameter 'restart_loop' [-Werror=unused-parameter]
> 10598 | tree lhs_type, bool restart_loop,
> | ~~~~~^~~~~~~~~~~~
>
> Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
next prev parent reply other threads:[~2024-01-09 16:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-02 17:57 Tamar Christina
2024-01-08 12:47 ` Richard Biener
2024-01-08 14:19 ` Tamar Christina
2024-01-09 11:45 ` Tamar Christina
2024-01-09 12:07 ` Richard Biener
2024-01-09 16:01 ` H.J. Lu
2024-01-09 16:06 ` Rainer Orth
2024-01-09 16:09 ` Tamar Christina [this message]
2024-01-09 16:12 ` 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=VI1PR08MB5325229BC7B8B49199E31DD8FF6A2@VI1PR08MB5325.eurprd08.prod.outlook.com \
--to=tamar.christina@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jlaw@ventanamicro.com \
--cc=nd@arm.com \
--cc=rguenther@suse.de \
--cc=ro@CeBiTec.Uni-Bielefeld.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).