public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/33246] New: Missed opportunities for vectorization due to data ref analysis
@ 2007-08-30 3:02 spop at gcc dot gnu dot org
2007-08-30 3:07 ` [Bug tree-optimization/33246] " spop at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: spop at gcc dot gnu dot org @ 2007-08-30 3:02 UTC (permalink / raw)
To: gcc-bugs
Here is a reduced testcase for Polyhedron:fatigue.f90:928. The non
vectorized loops that compute stress_tensor show up on the top user
times in the profile of that benchmark:
module perdida_m
integer, parameter, private :: LONGreal = selected_real_kind(15,90)
contains
subroutine perdida (lambda, mu, stress_tensor, strain_tensor,
plastic_strain_tensor)
real (kind = LONGreal), intent(in) :: lambda, mu
real (kind = LONGreal), dimension(:,:), intent(in) :: strain_tensor
real (kind = LONGreal), dimension(:,:), intent(inout) ::
plastic_strain_tensor
real (kind = LONGreal), dimension(:,:), intent(out) :: stress_tensor
stress_tensor(:,:) = (1.0_LONGreal - damage) *
&
generalized_hookes_law
(strain_tensor(:,:) - &
plastic_strain_tensor(:,:), lambda, mu)
end subroutine perdida
function generalized_hookes_law (strain_tensor, lambda, mu) result
(stress_tensor)
real (kind = LONGreal), dimension(:,:), intent(in) :: strain_tensor
real (kind = LONGreal), intent(in) :: lambda, mu
real (kind = LONGreal), dimension(3,3) :: stress_tensor
end function generalized_hookes_law
end module perdida_m
This is due to data ref analysis problems:
./fatigue.f90:14: note: not vectorized: data ref analysis failed
(*stress_tensor.0_16)[D.1508_168] = D.1513_173
./fatigue.f90:14: note: bad data references.
and
./fatigue.f90:14: note: not vectorized: data ref analysis failed D.1489_133 =
(*strain_tensor.0_41)[D.1488_132]
./fatigue.f90:14: note: bad data references.
--
Summary: Missed opportunities for vectorization due to data ref
analysis
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: spop at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33246
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/33246] Missed opportunities for vectorization due to data ref analysis
2007-08-30 3:02 [Bug tree-optimization/33246] New: Missed opportunities for vectorization due to data ref analysis spop at gcc dot gnu dot org
@ 2007-08-30 3:07 ` spop at gcc dot gnu dot org
2007-08-30 8:07 ` steven at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: spop at gcc dot gnu dot org @ 2007-08-30 3:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from spop at gcc dot gnu dot org 2007-08-30 03:07 -------
Created an attachment (id=14136)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14136&action=view)
testcase
I just realized that all these inlined testcases were scrambled by bugzilla.
I'm submitting the testcases as attachments.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33246
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/33246] Missed opportunities for vectorization due to data ref analysis
2007-08-30 3:02 [Bug tree-optimization/33246] New: Missed opportunities for vectorization due to data ref analysis spop at gcc dot gnu dot org
2007-08-30 3:07 ` [Bug tree-optimization/33246] " spop at gcc dot gnu dot org
@ 2007-08-30 8:07 ` steven at gcc dot gnu dot org
2007-08-31 13:57 ` dorit at gcc dot gnu dot org
2007-08-31 14:19 ` spop at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: steven at gcc dot gnu dot org @ 2007-08-30 8:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from steven at gcc dot gnu dot org 2007-08-30 08:07 -------
Having this case vectorized might help us look better compared to other
compilers. gfortran produces a 65% slower "fatigue" binary than the faster
compiler (Sun f95, see http://www.eleves.ens.fr/home/coudert/benchmark.pdf)
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-08-30 08:07:00
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33246
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/33246] Missed opportunities for vectorization due to data ref analysis
2007-08-30 3:02 [Bug tree-optimization/33246] New: Missed opportunities for vectorization due to data ref analysis spop at gcc dot gnu dot org
2007-08-30 3:07 ` [Bug tree-optimization/33246] " spop at gcc dot gnu dot org
2007-08-30 8:07 ` steven at gcc dot gnu dot org
@ 2007-08-31 13:57 ` dorit at gcc dot gnu dot org
2007-08-31 14:19 ` spop at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: dorit at gcc dot gnu dot org @ 2007-08-31 13:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dorit at gcc dot gnu dot org 2007-08-31 13:57 -------
...
> This is due to data ref analysis problems:
> ./fatigue.f90:14: note: not vectorized: data ref analysis failed
> (*stress_tensor.0_16)[D.1508_168] = D.1513_173
> ./fatigue.f90:14: note: bad data references.
> and
> ./fatigue.f90:14: note: not vectorized: data ref analysis failed D.1489_133 =
> (*strain_tensor.0_41)[D.1488_132]
> ./fatigue.f90:14: note: bad data references.
The data-ref analyzer reports:
failed: evolution of offset is not affine.
As a result, the DR fields that represent the access relative to the inner-most
loop are almost all empty:
base_address:
offset from base address:
constant offset from base address:
step:
aligned to:
base_object: (*(real8[0:D.1433] *) D.1437_15)[0]
symbol tag: SMT.79
However note that the DR fields relative to the outer-loop are computable:
outer base_address: &A.23
outer offset from base address: 0
outer constant offset from base address: 0
outer step: 24
outer aligned to: 128
If the data-ref analyzer can return the expression for the evolution in the
inner-loop, instead of failing, we would at least have a chance to do
outer-loop vectorization.
This is a duplicate of PR33113.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33246
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/33246] Missed opportunities for vectorization due to data ref analysis
2007-08-30 3:02 [Bug tree-optimization/33246] New: Missed opportunities for vectorization due to data ref analysis spop at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-08-31 13:57 ` dorit at gcc dot gnu dot org
@ 2007-08-31 14:19 ` spop at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: spop at gcc dot gnu dot org @ 2007-08-31 14:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from spop at gcc dot gnu dot org 2007-08-31 14:19 -------
Duplicate.
*** This bug has been marked as a duplicate of 33113 ***
--
spop at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33246
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-08-31 14:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-30 3:02 [Bug tree-optimization/33246] New: Missed opportunities for vectorization due to data ref analysis spop at gcc dot gnu dot org
2007-08-30 3:07 ` [Bug tree-optimization/33246] " spop at gcc dot gnu dot org
2007-08-30 8:07 ` steven at gcc dot gnu dot org
2007-08-31 13:57 ` dorit at gcc dot gnu dot org
2007-08-31 14:19 ` spop at gcc dot gnu dot 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).