Bug 49869 - Excessive loop versioning done by vectorization + predictive commoning
Summary: Excessive loop versioning done by vectorization + predictive commoning
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization
Depends on:
Blocks: vectorizer
  Show dependency treegraph
 
Reported: 2011-07-27 14:20 UTC by Richard Biener
Modified: 2016-08-27 23:22 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Biener 2011-07-27 14:20:09 UTC
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.