public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/18940] New: Loop is not vectorized when it should be
@ 2004-12-11 18:47 pinskia at gcc dot gnu dot org
  2004-12-11 18:52 ` [Bug tree-optimization/18940] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-11 18:47 UTC (permalink / raw)
  To: gcc-bugs

Here is another case which my tree combiner confuses the other tree optimizations but it should not.
I get in .vect: "not vectorized: number of iterations cannot be computed.".
If I change D1360 to be just n, it works.
If I change "n <= 1" to be "D1360 <= 0" It works (on the mainline without my tree combiner which is 
the opposite of what my tree combiner does).


typedef float afloat __attribute__ ((__aligned__(16)));
int
main1 (int n , afloat * __restrict__ pa, afloat * __restrict__ pb)
{
  int i;
  int ivtmp51;
  int ivtmp35;
  int D1360 = n/2;
  
  if (n <= 1) return 0;
  
  ivtmp35 = 1;

  do {
    ivtmp51 = ivtmp35;
    pa[ivtmp51] = pb[ivtmp51];
    ivtmp35 = ivtmp51 + 1;
  }  while (D1360 > ivtmp51);
  
  return 0;
}

-- 
           Summary: Loop is not vectorized when it should be
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: minor
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18940


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-03-23  3:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-11 18:47 [Bug tree-optimization/18940] New: Loop is not vectorized when it should be pinskia at gcc dot gnu dot org
2004-12-11 18:52 ` [Bug tree-optimization/18940] " pinskia at gcc dot gnu dot org
2004-12-12  5:00 ` dberlin at gcc dot gnu dot org
2004-12-22  7:38 ` pinskia at gcc dot gnu dot org
2005-03-23  3:08 ` pinskia 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).