[llvm-commits] [PATCH] Adding the Linpack test to the test suite

Duncan Sands baldrick at free.fr
Tue Nov 27 09:18:51 PST 2012


Hi Renato, I think I found the issue.  The array px is defined as:

   double Px[101][25];

However the 101 somehow became 1001 in this loop:

   for ( i=0; i<1001 ; i++ )
     {
       x0[i] = x[i];
       w0[i] = w[i];
       for (j=0 ; j<25 ; j++ )
         {
           cx[i][j] = x[i]*buzz;
           px[i][j] = w[i]*fuzz;
         }
     }

Well, x0 and w0 do have 1001 elements, so it is OK for them, but both cx and px
only have 101.

Unfortunately moving the cx and px initialization down to the 101 length loop
a bit below doesn't fix the test :(

Another issue is why globalopt broke a1 into individual fields when it can see
that users are accessing off the end of arrays (which is valid as long as they
are still indexing into the containing structure).

Ciao, Duncan.



More information about the llvm-commits mailing list