public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/49957] New: Fails to SLP in 410.bwaves
@ 2011-08-03 9:24 rguenth at gcc dot gnu.org
2011-08-03 11:11 ` [Bug tree-optimization/49957] " rguenth at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-03 9:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49957
Summary: Fails to SLP in 410.bwaves
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: rguenth@gcc.gnu.org
CC: spop@gcc.gnu.org, irar@gcc.gnu.org
While the loop
subroutine shell(nx,ny,nz)
implicit none
integer i,j,k,l,nx,ny,nz
real*8 q(21,nx,ny,nz),dq(21,nx,ny,nz)
do k=1,nz
do j=1,ny
do i=1,nx
do l=1,21
q(l,i,j,k)=q(l,i,j,k)+dq(l,i,j,k)
enddo
enddo
enddo
enddo
return
end
is vectorized using loop vectorization the following variant is not
(as appearing in 410.bwaves):
subroutine shell(nx,ny,nz)
implicit none
integer i,j,k,l,nx,ny,nz
real*8 q(5,nx,ny,nz),dq(5,nx,ny,nz)
do k=1,nz
do j=1,ny
do i=1,nx
do l=1,5
q(l,i,j,k)=q(l,i,j,k)+dq(l,i,j,k)
enddo
enddo
enddo
enddo
return
end
first of all dependence checking on the innermost unrolled loop fails:
(compute_affine_dependence
(stmt_a =
D.1639_140 = *q_54[D.1638_139];
)
(stmt_b =
*q_54[D.1638_157] = D.1647_160;
)
(subscript_dependence_tester
(analyze_overlapping_iterations
(chrec_a = {((pretmp.33_209 + 6) + pretmp.33_213) + offset.5_32, +, 5}_3)
(chrec_b = {((pretmp.33_209 + 7) + pretmp.33_213) + offset.5_32, +, 5}_3)
(analyze_siv_subscript
siv test failed: unimplemented.
)
as pretmp.33 is signed and we thus do not associate the constant offset
(well, I think this might be the problem at least).
That shouldn't prevent vectorization (and it doesn't). But then
(probably due to the same reason) we get
t.f:7: note: === vect_analyze_data_ref_accesses ===
t.f:7: note: not consecutive access D.1639_140 = *q_54[D.1638_139];
t.f:7: note: not vectorized: complicated access pattern.
t.f:7: note: bad data access.
t.f:1: note: vectorized 0 loops in function.
so in the end it _does_ seem to be the underlying issue.
I will see what can be done here.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/49957] Fails to SLP in 410.bwaves
2011-08-03 9:24 [Bug tree-optimization/49957] New: Fails to SLP in 410.bwaves rguenth at gcc dot gnu.org
@ 2011-08-03 11:11 ` rguenth at gcc dot gnu.org
2011-08-03 14:05 ` burnus at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-03 11:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49957
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011.08.03 11:10:57
Ever Confirmed|0 |1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-03 11:10:57 UTC ---
When associating the index expression "properly" it works.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/49957] Fails to SLP in 410.bwaves
2011-08-03 9:24 [Bug tree-optimization/49957] New: Fails to SLP in 410.bwaves rguenth at gcc dot gnu.org
2011-08-03 11:11 ` [Bug tree-optimization/49957] " rguenth at gcc dot gnu.org
@ 2011-08-03 14:05 ` burnus at gcc dot gnu.org
2011-08-03 14:42 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2011-08-03 14:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49957
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-08-03 14:05:13 UTC ---
Cf. RFC Fortran patch at http://gcc.gnu.org/ml/fortran/2011-08/msg00012.html to
change the index order into the canonical form.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/49957] Fails to SLP in 410.bwaves
2011-08-03 9:24 [Bug tree-optimization/49957] New: Fails to SLP in 410.bwaves rguenth at gcc dot gnu.org
2011-08-03 11:11 ` [Bug tree-optimization/49957] " rguenth at gcc dot gnu.org
2011-08-03 14:05 ` burnus at gcc dot gnu.org
@ 2011-08-03 14:42 ` rguenth at gcc dot gnu.org
2011-08-03 15:18 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-03 14:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49957
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-03 14:41:49 UTC ---
The patch now makes us vectorize
shell_lam.f:303: note: LOOP VECTORIZED.
shell_lam.f:262: note: LOOP VECTORIZED.
shell_lam.f:205: note: LOOP VECTORIZED.
compared to just
shell_lam.f:262: note: LOOP VECTORIZED.
without.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/49957] Fails to SLP in 410.bwaves
2011-08-03 9:24 [Bug tree-optimization/49957] New: Fails to SLP in 410.bwaves rguenth at gcc dot gnu.org
` (2 preceding siblings ...)
2011-08-03 14:42 ` rguenth at gcc dot gnu.org
@ 2011-08-03 15:18 ` rguenth at gcc dot gnu.org
2011-08-04 12:24 ` rguenth at gcc dot gnu.org
2011-08-04 12:24 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-03 15:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49957
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-03 15:17:42 UTC ---
Mine.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/49957] Fails to SLP in 410.bwaves
2011-08-03 9:24 [Bug tree-optimization/49957] New: Fails to SLP in 410.bwaves rguenth at gcc dot gnu.org
` (4 preceding siblings ...)
2011-08-04 12:24 ` rguenth at gcc dot gnu.org
@ 2011-08-04 12:24 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-04 12:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49957
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-04 12:23:10 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/49957] Fails to SLP in 410.bwaves
2011-08-03 9:24 [Bug tree-optimization/49957] New: Fails to SLP in 410.bwaves rguenth at gcc dot gnu.org
` (3 preceding siblings ...)
2011-08-03 15:18 ` rguenth at gcc dot gnu.org
@ 2011-08-04 12:24 ` rguenth at gcc dot gnu.org
2011-08-04 12:24 ` rguenth at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-04 12:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49957
--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-04 12:22:47 UTC ---
Author: rguenth
Date: Thu Aug 4 12:22:42 2011
New Revision: 177368
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177368
Log:
2011-08-04 Richard Guenther <rguenther@suse.de>
PR fortran/49957
* trans-array.c (add_to_offset): New function.
(gfc_conv_array_ref): Build the array index expression in optimally
associated order.
(gfc_walk_variable_expr): Adjust for the backward walk.
* gfortran.dg/vect/O3-pr49957.f: New testcase.
Added:
trunk/gcc/testsuite/gfortran.dg/vect/O3-pr49957.f
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-array.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-08-04 12:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-03 9:24 [Bug tree-optimization/49957] New: Fails to SLP in 410.bwaves rguenth at gcc dot gnu.org
2011-08-03 11:11 ` [Bug tree-optimization/49957] " rguenth at gcc dot gnu.org
2011-08-03 14:05 ` burnus at gcc dot gnu.org
2011-08-03 14:42 ` rguenth at gcc dot gnu.org
2011-08-03 15:18 ` rguenth at gcc dot gnu.org
2011-08-04 12:24 ` rguenth at gcc dot gnu.org
2011-08-04 12:24 ` rguenth at gcc dot gnu.org
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).