public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: "Andre Vieira (lists)" <andre.simoesdiasvieira@arm.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	 Richard Sandiford <richard.sandiford@arm.com>
Subject: Re: [PATCH] ifcvt: Support bitfield lowering of multiple-exit loops
Date: Mon, 7 Nov 2022 11:05:50 +0000 (UTC)	[thread overview]
Message-ID: <nycvar.YFH.7.77.849.2211071105440.4294@jbgna.fhfr.qr> (raw)
In-Reply-To: <785436fa-0ef9-e424-030d-f7b2bdf9c935@arm.com>

[-- Attachment #1: Type: text/plain, Size: 1909 bytes --]

On Thu, 3 Nov 2022, Andre Vieira (lists) wrote:

> Hi,
> 
> With Tamar's patch
> (https://gcc.gnu.org/pipermail/gcc-patches/2022-November/604880.html) enabling
> the vectorization of early-breaks, I'd like to allow bitfield lowering in such
> loops, which requires the relaxation of allowing multiple exits when doing
> so.  In order to avoid a similar issue to PR107275, I hoisted the code that
> rejects loops with certain types of gimple_stmts from
> 'if_convertible_loop_p_1' to 'get_loop_body_in_if_conv_order', to avoid trying
> to lower bitfields in loops we are not going to vectorize anyway.  This also
> ensures 'ifcvt_local_dce' doesn't accidentally remove statements it shouldn't
> as it will never come across them.  I made sure to add a comment to make clear
> that there is a direct connection between the two and if we were to enable
> vectorization of any other gimple statement we should make sure both handle
> it.
> 
> Bootstrapped and regression tested on aarch64-none-linux-gnu and
> x86_64-pc-linux-gnu

OK.

Thanks,
Richard.

> gcc/ChangeLog:
> 
>         * tree-if-conv.cc (if_convertible_loop_p_1): Move statement check loop
> from here ...
>         (get_loop_body_if_conv_order): ... to here.
>         (if_convertible_loop_p): Remove single_exit check.
>         (tree_if_conversion): Move single_exit check to if-conversion part.
> 
> gcc/testsuite/ChangeLog:
> 
>         * gcc.dg/vect/vect-bitfield-read-1-not.c: New test.
>         * gcc.dg/vect/vect-bitfield-read-2-not.c: New test.
>         * gcc.dg/vect/vect-bitfield-read-8.c: New test.
>         * gcc.dg/vect/vect-bitfield-read-9.c: New test.
> 
> 

-- 
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg,
Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman;
HRB 36809 (AG Nuernberg)

      reply	other threads:[~2022-11-07 11:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-03 13:43 Andre Vieira (lists)
2022-11-07 11:05 ` Richard Biener [this message]

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=nycvar.YFH.7.77.849.2211071105440.4294@jbgna.fhfr.qr \
    --to=rguenther@suse.de \
    --cc=andre.simoesdiasvieira@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.sandiford@arm.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).