Jakub Jelinek <ja...@redhat.com> writes: > On Mon, Oct 23, 2017 at 06:26:12PM +0100, Richard Sandiford wrote: >> 2017-10-23 Richard Sandiford <richard.sandif...@linaro.org> >> Alan Hayward <alan.hayw...@arm.com> >> David Sherwood <david.sherw...@arm.com> > ... > >> --- /dev/null 2017-10-21 08:51:42.385141415 +0100 >> +++ gcc/testsuite/gcc.dg/vect-opt-info-1.c 2017-10-23 >> 17:22:26.571498977 +0100 >> @@ -0,0 +1,11 @@ >> +/* { dg-options "-std=c99 -fopt-info -O3" } */ >> + >> +void >> +vadd (int *dst, int *op1, int *op2, int count) >> +{ >> + for (int i = 0; i < count; ++i) >> + dst[i] = op1[i] + op2[i]; >> +} >> + >> +/* { dg-message "loop vectorized" "" { target *-*-* } 6 } */ >> +/* { dg-message "loop versioned for vectorization because of possible >> aliasing" "" { target *-*-* } 6 } */ > > This testcase fails e.g. on i686-linux. The problem is > 1) it really should be at least guarded with > /* { dg-do compile { target vect_int } } */ > because on targets that can't vectorize even simple int operations > this will obviously fail
Hmm, yeah. > 2) that won't help for i686 though, because we need -msse2 added > to options for it to work; that is normally added by > check_vect_support_and_set_flags > only when in vect.exp. If it was just that target, we could add > dg-additional-options, but I'm afraid many other targets add some options. > > The following works for me, calling it nodump-* ensures that > -fdump-tree-* isn't added, which I believe is essential for the testcase; Yeah, that's right, the bug was using dump_file when dump_enabled_p (), which would segfault when -fopt-info was passed and -fdump-tree-vect* wasn't. > tested on x86_64-linux with > RUNTESTFLAGS='--target_board=unix\{-m32,-m32/-mno-sse,-m64\} vect.exp=nodump*' > ok for trunk? > > Sadly I don't have your broken development version of the patch, so can't > verify it fails with the broken patch. Me neither any more, but it looks good to me FWIW. Thanks, Richard