On Thu, Aug 08, 2024 at 10:01:14PM +0200, Alejandro Colomar wrote:
> Here are the suspects:
> 
> ./gcc/testsuite/gcc.target/powerpc/sse3-addsubps.c:80:
>         for (i = 0; i < sizeof (vals) / sizeof (vals); i += 8)

This is an obvious typo as can be seen in what the test does, what similar
tests committed in the same commit do (all the others use sizeof (vals) /
sizeof (vals[0])) and what the test originates from (i386/sse3-addsubps.c
uses there constant 80, which is that sizeof (vals) / sizeof (vals[0])).

Tested on powerpc64-linux (where the test is UNSUPPORTED) and
powerpc64le-linux, where the test passes before (in that case it tests just
one vector rather than all 10) and after the change.

Committed to trunk as obvious.

2024-08-10  Jakub Jelinek  <ja...@redhat.com>

        * gcc.target/powerpc/sse3-addsubps.c (TEST): Divide by
        sizeof (vals[0]) rather than sizeof (vals).

--- gcc/testsuite/gcc.target/powerpc/sse3-addsubps.c.jj3        2024-03-18 
11:02:16.152884555 +0000
+++ gcc/testsuite/gcc.target/powerpc/sse3-addsubps.c    2024-08-10 
08:46:57.259430503 +0000
@@ -77,7 +77,7 @@ TEST (void)
   int i;
   int fail = 0;
 
-  for (i = 0; i < sizeof (vals) / sizeof (vals); i += 8)
+  for (i = 0; i < sizeof (vals) / sizeof (vals[0]); i += 8)
     {
       p1[0] = vals[i+0];
       p1[1] = vals[i+1];

        Jakub

Reply via email to