public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: "Kewen.Lin" <linkw@linux.ibm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	 Segher Boessenkool <segher@kernel.crashing.org>,
	Bill Schmidt <wschmidt@linux.ibm.com>
Subject: Re: [PATCH] Fix PR94043 by making vect_live_op generate lc-phi
Date: Mon, 30 Mar 2020 12:38:53 +0200	[thread overview]
Message-ID: <CAFiYyc0PjJDL-qYJaX-9U0OApWnk9n=gt-0Xbwx=ERyq9brTLQ@mail.gmail.com> (raw)
In-Reply-To: <af33d56b-4ccf-f449-94dc-dcb3a0f62623@linux.ibm.com>

On Mon, Mar 30, 2020 at 12:24 PM Kewen.Lin <linkw@linux.ibm.com> wrote:
>
> Hi,
>
> As PR94043 shows, my commit r10-4524 exposed one issue in
> vectorizable_live_operation, which inserts one extra BB
> before the single exit, leading unexpected operand expansion
> and unexpected loop depth assertion.  As Richi suggested,
> this patch is to teach vectorizable_live_operation to
> generate loop closed phi for vec_lhs, it looks like:
>      loop;
>      # lhs' = PHI <lhs>
> =>
>      loop;
>      # vec_lhs' = PHI <vec_lhs>
>      new_tree = BIT_FIELD_REF <vec_lhs', ...>;
>      lhs' = new_tree;
>
> I noticed that there are some SLP cases that have same lhs
> and vec_lhs but different offsets, which can make us have
> more PHIs for the same vec_lhs there.  But I think it would
> be fine since only one of them is actually live, the others
> should be eliminated by the following dce.  So the patch
> doesn't check whether there is one phi for vec_lhs, just
> create one directly instead.
>
> Bootstrapped/regtested on powerpc64le-linux-gnu (LE) P8.
>
> Is it ok for trunk?

OK.

Thanks,
Richard.

> BR,
> Kewen
> -----------
>
> gcc/ChangeLog
>
> 2020-MM-DD  Kewen Lin  <linkw@gcc.gnu.org>
>
>         PR tree-optimization/94043
>         * tree-vect-loop.c (vectorizable_live_operation): Generate loop-closed
>         phi for vec_lhs and use it for lane extraction.
>
> gcc/testsuite/ChangeLog
>
> 2020-MM-DD  Kewen Lin  <linkw@gcc.gnu.org>
>
>         PR tree-optimization/94043
>         * gfortran.dg/graphite/vect-pr94043.f90: New test.
>

  reply	other threads:[~2020-03-30 10:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-30 10:24 Kewen.Lin
2020-03-30 10:38 ` Richard Biener [this message]
2020-04-01 22:51   ` H.J. Lu
2020-04-02 10:43     ` [PATCH] Fix PR94443 with gsi_insert_seq_before Kewen.Lin
2020-04-02 18:55       ` H.J. Lu
2020-04-03  7:01       ` 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='CAFiYyc0PjJDL-qYJaX-9U0OApWnk9n=gt-0Xbwx=ERyq9brTLQ@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=linkw@linux.ibm.com \
    --cc=segher@kernel.crashing.org \
    --cc=wschmidt@linux.ibm.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).