On Tue, 2021-09-28 at 13:28 +0200, Richard Biener wrote: > On Sun, 26 Sep 2021, Ilya Leoshkevich wrote: > > > Add both positive and negative tests. > > The tests will likely be quite fragile with respect to what is > actually vectorized on which target. If you move the tests > to gcc.dg/vect/ you could at least do > > /* { dg-require-effective-target vect_int } */ > > do you need to look for the exact GIMPLE IL or is it enough to > verify we are vectorizing the reduction?
Actually I don't think vectorization is that important here, and I only check how many times sum_x = sum_y + _z appears. So I use (?:vect_)?, which may or may not be there. An alternative I considered was to use -fno-tree-vectorize to get smaller regexes, but I thought it would be nice to know that vectorization does not mess up reassociation results. Best regards, Ilya