Message ID | 201011221322.55254.ebotcazou@adacore.com |
---|---|
State | New |
Headers | show |
On Mon, Nov 22, 2010 at 1:22 PM, Eric Botcazou <ebotcazou@adacore.com> wrote: > Hi, > > gcc.dg/vect/vect-peel-3.c almost passes on the SPARC, but one of the 2 loops > isn't vectorized because there is an unsupported shift operation: > > for (i = 0; i < N+10; i++) > { > ib[i] = i; > ic[i] = i+2; > ia[i] = i/2; > } > > so I suggest changing the '/' into a '-'. OK for mainline? Hmm. Can it do division? If so please file a missed optimziation bug instead (and XFAIL it on sparc instead). Thanks, Richard. > > 2010-11-22 Eric Botcazou <ebotcazou@adacore.com> > > PR testsuite/46230 > * gcc.dg/vect/vect-peel-3.c (RES): Adjust. > (main): Use subtraction instead of division by 2. > > > -- > Eric Botcazou >
> Hmm. Can it do division? If so please file a missed optimziation > bug instead (and XFAIL it on sparc instead). No, it cannot either, no multiplication and no division. Note that this isn't the "main" loop (despite the name of the function), only the initialization.
On Mon, Nov 22, 2010 at 1:46 PM, Eric Botcazou <ebotcazou@adacore.com> wrote: >> Hmm. Can it do division? If so please file a missed optimziation >> bug instead (and XFAIL it on sparc instead). > > No, it cannot either, no multiplication and no division. Note that this isn't > the "main" loop (despite the name of the function), only the initialization. Ah, I see. I suppose adding a asm volatile ("" : : "memory") to it like in other testcases and instead checking for 1 vectorized loops would also do the trick. I'd prefer that. Thanks, Richard. > -- > Eric Botcazou >
Index: gcc.dg/vect/vect-peel-3.c =================================================================== --- gcc.dg/vect/vect-peel-3.c (revision 167028) +++ gcc.dg/vect/vect-peel-3.c (working copy) @@ -4,7 +4,7 @@ #include "tree-vect.h" #define N 128 -#define RES 21888 +#define RES 25792 /* unaligned store. */ @@ -42,7 +42,7 @@ int main (void) { ib[i] = i; ic[i] = i+2; - ia[i] = i/2; + ia[i] = i-2; } return main1 ();