On Mon, Mar 11, 2024 at 11:14:04AM +0100, Andreas Krebbel wrote: > On 2/29/24 13:15, Stefan Schulze Frielinghaus wrote: > > Starting with r14-8319-g86de9b66480b71 fwprop improved so that vpdi is > > no longer required. > > > > gcc/testsuite/ChangeLog: > > > > * gcc.target/s390/vector/long-double-to-i64.c: Fix scan > > assembler directive. > > Should we perhaps rather turn the scan-assembler directives into something > which checks for the > absence of vpdi then? In order to get notified once this really useful > optimization breaks?
I thought about checking for the most optimal code which would be just two loads and a convert instruction. Thus if this fails, then we have a regression. Speaking of regressions, the old behaviour was restored by r14-9412-g3e3e4156a5f93e which means we are back using vpdi. Thus, I will leave this patch on hold and have a second look. Cheers, Stefan > > Andreas > > > --- > > .../gcc.target/s390/vector/long-double-to-i64.c | 13 +++++++++---- > > 1 file changed, 9 insertions(+), 4 deletions(-) > > > > diff --git a/gcc/testsuite/gcc.target/s390/vector/long-double-to-i64.c > > b/gcc/testsuite/gcc.target/s390/vector/long-double-to-i64.c > > index 2dbbb5d1c03..ed89878e6ee 100644 > > --- a/gcc/testsuite/gcc.target/s390/vector/long-double-to-i64.c > > +++ b/gcc/testsuite/gcc.target/s390/vector/long-double-to-i64.c > > @@ -1,19 +1,24 @@ > > /* { dg-do compile } */ > > /* { dg-options "-O3 -march=z14 -mzarch --save-temps" } */ > > /* { dg-do run { target { s390_z14_hw } } } */ > > +/* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } } } */ > > + > > #include <assert.h> > > #include <stdint.h> > > > > +/* > > +** long_double_to_i64: > > +** ld %f0,0\(%r2\) > > +** ld %f2,8\(%r2\) > > +** cgxbr %r2,5,%f0 > > +** br %r14 > > +*/ > > __attribute__ ((noipa)) static int64_t > > long_double_to_i64 (long double x) > > { > > return x; > > } > > > > -/* { dg-final { scan-assembler-times {\n\tvpdi\t%v\d+,%v\d+,%v\d+,1\n} 1 } > > } */ > > -/* { dg-final { scan-assembler-times {\n\tvpdi\t%v\d+,%v\d+,%v\d+,5\n} 1 } > > } */ > > -/* { dg-final { scan-assembler-times {\n\tcgxbr\t} 1 } } */ > > - > > int > > main (void) > > { >