On 8 November 2011 09:22, Jakub Jelinek <[email protected]> wrote:
> First of all, whether copysignf, sqrtf and/or lrint are vectorized is
> very much target specific, should I guard the dg-final lines with
> { target { i?86-*-* x86_64-*-* } }
> resp.
> { target { { i?86-*-* x86_64-*-* } && !lp64 } }
> (the latter for lrint - we don't vectorize it on x86_64), or add
> vect_call_copysignf, vect_call_sqrtf, vect_call_lrint tests in *.exp?
The second option would be nicer.
>
> For the split, some fns are hybrid, so shall I split f1+f2+f3 as slp
> and f4 as loop, or is f3 (hybrid) something else?
> What test names
> should I use? fast-math-slp-call-*.c/fast-math-vect-call-*.c or something
> else? From what I gather for bb slp the test should start with bb-slp-*
> (is that f1/f2 or just f1?), but then there is currently no way to
> add -ffast-math.
In fast-math-vect-call-1.c, f1 is basic block SLP, f2+f3 are loop SLP,
and f4 is regular loop vectorization.
So, f1 should be in fast-math-bb-slp-call-1.c, with
/* { dg-final { scan-tree-dump-times "basic block vectorized using
SLP" 1 "slp" } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
and
# -ffast-math
set VECT_SLP_CFLAGS $SAVED_VECT_SLP_CFLAGS
lappend VECT_SLP_CFLAGS "-ffast-math"
dg-runtest [lsort [glob -nocomplain
$srcdir/$subdir/fast-math-bb-slp-*.\[cS\]]] \
"" $VECT_SLP_CFLAGS
in vect.exp.
The rest can simply stay in fast-math-vect-call-1.c, but to check SLP please use
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" X "vect" } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" Y
"vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
>
>> Also there is no need in dg-do run.
>
> You mean because it is the default?
Yes.
Thanks,
Ira
> Certainly it is useful to test
> that gcc doesn't miscompile the tests.
>
> Jakub
>