public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/33447] New: Non-empty latch block prevents loop vectorization
@ 2007-09-16 11:49 irar at il dot ibm dot com
2009-01-03 0:52 ` [Bug tree-optimization/33447] " steven at gcc dot gnu dot org
0 siblings, 1 reply; 3+ messages in thread
From: irar at il dot ibm dot com @ 2007-09-16 11:49 UTC (permalink / raw)
To: gcc-bugs
The following loop (from linpk.f90) contains a non-empty latch block before
tree optimizations:
Source code:
Line
m = MOD(N,4)
323 IF ( m.NE.0 ) THEN
324 DO i = 1 , m
325 Dy(i) = Dy(i) + Da*Dx(i)
326 ENDDO
327 IF ( N.LT.4 ) RETURN
328 ENDIF
329 mp1 = m + 1
330 DO i = mp1 , N , 4
331 Dy(i) = Dy(i) + Da*Dx(i)
332 Dy(i+1) = Dy(i+1) + Da*Dx(i+1)
333 Dy(i+2) = Dy(i+2) + Da*Dx(i+2)
334 Dy(i+3) = Dy(i+3) + Da*Dx(i+3)
335 ENDDO
The first SSA dump:
<bb 17>:
...
if (countm1.32_8 == 0)
goto <bb 19>;
else
goto <bb 18>;
<bb 18>:
countm1.32_98 = countm1.32_8 + 4294967295;
goto <bb 17>;
This is also related to PR 28643 and PR 33244. However, in these PRs some tree
optimization puts stmts/phi nodes in the latch block, while in the lnpck
example the latch block is non-empty to begin with.
--
Summary: Non-empty latch block prevents loop vectorization
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: irar at il dot ibm dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33447
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/33447] Non-empty latch block prevents loop vectorization
2007-09-16 11:49 [Bug tree-optimization/33447] New: Non-empty latch block prevents loop vectorization irar at il dot ibm dot com
@ 2009-01-03 0:52 ` steven at gcc dot gnu dot org
0 siblings, 0 replies; 3+ messages in thread
From: steven at gcc dot gnu dot org @ 2009-01-03 0:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from steven at gcc dot gnu dot org 2009-01-03 00:48 -------
Perhaps the front end should not emit this code on the latch?
--
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 |2009-01-03 00:48:52
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33447
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/33447] Non-empty latch block prevents loop vectorization
[not found] <bug-33447-4@http.gcc.gnu.org/bugzilla/>
@ 2014-10-16 8:33 ` rguenth at gcc dot gnu.org
0 siblings, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-10-16 8:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33447
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to work| |4.8.3, 4.9.1, 5.0
Resolution|--- |FIXED
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed in 4.8+
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-10-16 8:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-16 11:49 [Bug tree-optimization/33447] New: Non-empty latch block prevents loop vectorization irar at il dot ibm dot com
2009-01-03 0:52 ` [Bug tree-optimization/33447] " steven at gcc dot gnu dot org
[not found] <bug-33447-4@http.gcc.gnu.org/bugzilla/>
2014-10-16 8:33 ` 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).