public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/49869] New: Excessive loop versioning done by vectorization + predictive commoning
@ 2011-07-27 14:20 rguenth at gcc dot gnu.org
2021-08-05 23:36 ` [Bug tree-optimization/49869] " pinskia at gcc dot gnu.org
2021-08-06 7:33 ` rguenth at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-07-27 14:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49869
Summary: Excessive loop versioning done by vectorization +
predictive commoning
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
SUBROUTINE ANYAVG(NLVLS,HTS,PARRAY,ZBOT,NDXABV,ZTOP,NDXBLW,VALAVG)
IMPLICIT NONE
INTEGER I , NLVLS , NDXABV , NDXBLW
REAL HTS(NLVLS) , PARRAY(NLVLS) , ZBOT , ZTOP , SUM , VALAVG
REAL VALBOT , VALTOP
IF ( ZBOT.LT.0.5 ) THEN
ZBOT = 0.5
NDXABV = 2
ENDIF
IF ( ZTOP.LT.0.51 ) THEN
ZTOP = 0.51
NDXBLW = 2
ENDIF
IF ( NDXBLW.LE.NDXABV ) GOTO 200
DO I = NDXABV + 1 , NDXBLW
SUM = SUM + (HTS(I)-HTS(I-1))*0.5*(PARRAY(I)+PARRAY(I-1))
ENDDO
200 CONTINUE
VALAVG = SUM/(ZTOP-ZBOT)
END
ends up with 5 loop copies.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/49869] Excessive loop versioning done by vectorization + predictive commoning
2011-07-27 14:20 [Bug tree-optimization/49869] New: Excessive loop versioning done by vectorization + predictive commoning rguenth at gcc dot gnu.org
@ 2021-08-05 23:36 ` pinskia at gcc dot gnu.org
2021-08-06 7:33 ` rguenth at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-05 23:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49869
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
On the trunk I only see one copy of the loop:
.L11:
movups (%rbx,%rax), %xmm7
movups 0(%rbp,%rax), %xmm0
movups (%r9,%rax), %xmm1
subps %xmm7, %xmm0
movups (%r11,%rax), %xmm7
addq $16, %rax
addps %xmm7, %xmm1
mulps %xmm6, %xmm0
mulps %xmm1, %xmm0
movaps %xmm0, %xmm1
addss %xmm2, %xmm1
movaps %xmm0, %xmm2
shufps $85, %xmm0, %xmm2
addss %xmm2, %xmm1
movaps %xmm0, %xmm2
unpckhps %xmm0, %xmm2
shufps $255, %xmm0, %xmm0
addss %xmm2, %xmm1
movaps %xmm1, %xmm2
addss %xmm0, %xmm2
cmpq %rax, %r10
jne .L11
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug tree-optimization/49869] Excessive loop versioning done by vectorization + predictive commoning
2011-07-27 14:20 [Bug tree-optimization/49869] New: Excessive loop versioning done by vectorization + predictive commoning rguenth at gcc dot gnu.org
2021-08-05 23:36 ` [Bug tree-optimization/49869] " pinskia at gcc dot gnu.org
@ 2021-08-06 7:33 ` rguenth at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-08-06 7:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49869
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |WORKSFORME
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
pcom and vect have been exchanged, now we no longer perform predictive
commoning. We're also better in identifying single-iteration loops. Let's
close the issue.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-06 7:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-27 14:20 [Bug tree-optimization/49869] New: Excessive loop versioning done by vectorization + predictive commoning rguenth at gcc dot gnu.org
2021-08-05 23:36 ` [Bug tree-optimization/49869] " pinskia at gcc dot gnu.org
2021-08-06 7: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).