public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/34195] missed optimization with store motion (vectorizer)
       [not found] <bug-34195-4@http.gcc.gnu.org/bugzilla/>
@ 2021-07-07 11:46 ` rguenth at gcc dot gnu.org
  2021-07-07 11:50 ` cvs-commit at gcc dot gnu.org
  1 sibling, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-07 11:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34195

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
We apply store-motion to the inner loop (if you disable unrolling with a pragma
or -fdisable-tree-cunrolli or by incrasing M).  We apply outer loop
vectorization with the inner loop not unrolled and loop vectorization when it
is unrolled.

So IMHO nothing left to fix here (whatever the exact desire was ;)).

I'll add a testcase.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/34195] missed optimization with store motion (vectorizer)
       [not found] <bug-34195-4@http.gcc.gnu.org/bugzilla/>
  2021-07-07 11:46 ` [Bug tree-optimization/34195] missed optimization with store motion (vectorizer) rguenth at gcc dot gnu.org
@ 2021-07-07 11:50 ` cvs-commit at gcc dot gnu.org
  1 sibling, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-07 11:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=34195

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:005f31a0370cf35e332db9415a0ff538320bcddc

commit r12-2098-g005f31a0370cf35e332db9415a0ff538320bcddc
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Jul 7 13:46:48 2021 +0200

    tree-optimization/34195 - testcase for fixed vectorization

    This adds a testcase for an old fixed PR.

    2021-07-07  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/34195
            * gcc.dg/vect/pr34195.c: New testcase.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/34195] missed optimization with store motion (vectorizer)
  2007-11-22 15:30 [Bug tree-optimization/34195] New: " eres at il dot ibm dot com
                   ` (3 preceding siblings ...)
  2007-11-30 13:47 ` rguenth at gcc dot gnu dot org
@ 2007-11-30 17:24 ` eres at il dot ibm dot com
  4 siblings, 0 replies; 7+ messages in thread
From: eres at il dot ibm dot com @ 2007-11-30 17:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from eres at il dot ibm dot com  2007-11-30 17:24 -------
(In reply to comment #4)
> That moves the stores
>           pS[i].x += (a[i]+b[i]);
>           pS[i].y += (a[i]-b[i]);
> out of the inner loop, but still none of the loops are vectorized (on x86_64).

Also on ppc64.  It seems to be the same problem as PR32824. Nevertheless lim
can improved performance regardless of vectorization, as was mentioned before.

Taken from the vectorizer dump:
u.c:17: note: vect_is_simple_use: operand pS_I__ypS_I_I_lsm.16_15
u.c:17: note: def_stmt: pS_I__ypS_I_I_lsm.16_15 = PHI
<pS_I__ypS_I_I_lsm.16_23(6), pS_I__ypS_I_I_lsm.16_12(4)>
u.c:17: note: Unsupported pattern.
u.c:17: note: not vectorized: unsupported use in stmt.
u.c:17: note: unexpected pattern.(get_loop_exit_condition


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34195


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/34195] missed optimization with store motion (vectorizer)
  2007-11-22 15:30 [Bug tree-optimization/34195] New: " eres at il dot ibm dot com
                   ` (2 preceding siblings ...)
  2007-11-30 13:41 ` rguenth at gcc dot gnu dot org
@ 2007-11-30 13:47 ` rguenth at gcc dot gnu dot org
  2007-11-30 17:24 ` eres at il dot ibm dot com
  4 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-11-30 13:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2007-11-30 13:46 -------
That moves the stores

          pS[i].x += (a[i]+b[i]);
          pS[i].y += (a[i]-b[i]);

out of the inner loop, but still none of the loops are vectorized (on x86_64).


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |missed-optimization
   Last reconfirmed|0000-00-00 00:00:00         |2007-11-30 13:46:49
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34195


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/34195] missed optimization with store motion (vectorizer)
  2007-11-22 15:30 [Bug tree-optimization/34195] New: " eres at il dot ibm dot com
  2007-11-22 16:02 ` [Bug tree-optimization/34195] " rguenth at gcc dot gnu dot org
  2007-11-25 11:21 ` eres at il dot ibm dot com
@ 2007-11-30 13:41 ` rguenth at gcc dot gnu dot org
  2007-11-30 13:47 ` rguenth at gcc dot gnu dot org
  2007-11-30 17:24 ` eres at il dot ibm dot com
  4 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-11-30 13:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2007-11-30 13:41 -------
Created an attachment (id=14673)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14673&action=view)
updated patch

I have updated Zdeneks patch for using an alias oracle for store motion and
loop invariant motion to mainline.  Of the store-motion cases in the testcase
there fail two, test4 and test5.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34195


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/34195] missed optimization with store motion (vectorizer)
  2007-11-22 15:30 [Bug tree-optimization/34195] New: " eres at il dot ibm dot com
  2007-11-22 16:02 ` [Bug tree-optimization/34195] " rguenth at gcc dot gnu dot org
@ 2007-11-25 11:21 ` eres at il dot ibm dot com
  2007-11-30 13:41 ` rguenth at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: eres at il dot ibm dot com @ 2007-11-25 11:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from eres at il dot ibm dot com  2007-11-25 11:21 -------
I have been testing Zdenek's initial lim patch on SPEC2006 and tramp3d but saw
no effect on the preformance.  We had an example which is similar to the
testcase shown in (http://gcc.gnu.org/ml/gcc-patches/2007-03/txt00067.txt)
which boosted the performance x1.5 due to the store motion (it also opened
opportunity for the vectorizer).  On the other hand; this patch may increased
register pressure.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34195


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/34195] missed optimization with store motion (vectorizer)
  2007-11-22 15:30 [Bug tree-optimization/34195] New: " eres at il dot ibm dot com
@ 2007-11-22 16:02 ` rguenth at gcc dot gnu dot org
  2007-11-25 11:21 ` eres at il dot ibm dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-11-22 16:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2007-11-22 16:01 -------
Actually the refined patch at
http://gcc.gnu.org/ml/gcc-patches/2007-01/msg02550.html should be more
up-to-date.

Still the idea of an alias oracle needs to be done elsewhere.  We'll be working
on it.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34195


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-07-07 11:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-34195-4@http.gcc.gnu.org/bugzilla/>
2021-07-07 11:46 ` [Bug tree-optimization/34195] missed optimization with store motion (vectorizer) rguenth at gcc dot gnu.org
2021-07-07 11:50 ` cvs-commit at gcc dot gnu.org
2007-11-22 15:30 [Bug tree-optimization/34195] New: " eres at il dot ibm dot com
2007-11-22 16:02 ` [Bug tree-optimization/34195] " rguenth at gcc dot gnu dot org
2007-11-25 11:21 ` eres at il dot ibm dot com
2007-11-30 13:41 ` rguenth at gcc dot gnu dot org
2007-11-30 13:47 ` rguenth at gcc dot gnu dot org
2007-11-30 17:24 ` eres at il dot ibm dot com

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).