On Tue, Apr 16, 2024 at 09:00:53AM +0200, Richard Biener wrote:
> >     PR tree-optimization/114403
> >     * gcc.dg/vect/vect-early-break_124-pr114403.c: Skip in ilp32.
> > 
> > ---
> > diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c 
> > b/gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c
> > index 
> > 1751296ab813fe85eaab1f58dc674bac10f6eb7a..db8e00556f116ca81c5a6558ec6ecd3b222ec93d
> >  100644
> > --- a/gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c
> > +++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c
> > @@ -2,11 +2,11 @@
> >  /* { dg-require-effective-target vect_early_break_hw } */
> >  /* { dg-require-effective-target vect_long_long } */
> >  
> > -/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
> > +/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { ! ilp32 
> > } } } } */
> >  
> >  #include "tree-vect.h"
> >  
> > -typedef unsigned long PV;
> > +typedef unsigned long long PV;
> >  typedef struct _buff_t {
> >      int foo;
> >      PV Val;

As discussed on IRC, I think we want
--- gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c.jj        
2024-04-16 08:43:36.001729192 +0200
+++ gcc/testsuite/gcc.dg/vect/vect-early-break_124-pr114403.c   2024-04-16 
08:55:11.296214959 +0200
@@ -64,8 +64,8 @@ int main ()
 
   int store_size = sizeof(PV);
 #pragma GCC novector
-  for (int i = 0; i < NUM - 1; i+=store_size)
-    if (0 != __builtin_memcmp (buffer+i, (char*)&tmp[i].Val, store_size))
+  for (int i = 0; i < NUM - 1; i++)
+    if (0 != __builtin_memcmp (buffer+i*store_size, (char*)&tmp[i].Val, 
store_size))
       __builtin_abort ();
 
   return 0;

instead (and then I think there is no need to switch PV from unsigned long
to unsigned long long, nor disabling on ilp32.

        Jakub

Reply via email to