On Thu, Nov 07, 2024 at 10:54:40AM +0000, Andrew Stubbs wrote: > On 07/11/2024 00:37, haochen.jiang wrote: > > d334f729e53867b838e867375b3f475ba793d96e is the first bad commit > > commit d334f729e53867b838e867375b3f475ba793d96e > > Author: Andrew Stubbs <a...@baylibre.com> > > Date: Wed Nov 6 12:26:08 2024 +0000 > > > > openmp: Add testcases for omp_max_vf > > > > caused > > > > FAIL: gcc.dg/gomp/max_vf-1.c scan-tree-dump-times ompexp "\\+ 16" 1 > > FAIL: gcc.dg/gomp/max_vf-1.c scan-tree-dump-times ompexp "\\* 16" 2 > > FAIL: gcc.dg/gomp/max_vf-1.c scan-tree-dump-times ompexp > > "__builtin_GOMP_parallel_loop_nonmonotonic_dynamic \\(.*, 16, 0\\);" 1 > > > > with GCC configured with > > > > ../../gcc/configure > > --prefix=/export/users/haochenj/src/gcc-bisect/master/master/r15-4988/usr > > --enable-clocale=gnu --with-system-zlib --with-demangler-in-ld > > --with-fpmath=sse --enable-languages=c,c++,fortran --enable-cet > > --without-isl --enable-libmpx x86_64-linux --disable-bootstrap > > > > To reproduce: > > > > $ cd {build_dir}/gcc && make check > > RUNTESTFLAGS="gomp.exp=gcc.dg/gomp/max_vf-1.c --target_board='unix{-m32\ > > -march=cascadelake}'" > > $ cd {build_dir}/gcc && make check > > RUNTESTFLAGS="gomp.exp=gcc.dg/gomp/max_vf-1.c --target_board='unix{-m64\ > > -march=cascadelake}'" > > This problem was supposed to be avoided by explicitly passing "-msse2" in > the testcase. Apparently -march=cascadelake silently overrides that setting > ... maybe don't do that?
What do yo mean by overrides? -march=cascadelake -msse2 (or the other ordering too) certainly doesn't override the enabling of SSE2, the -mISA and -mno-ISA flags take precedence over -march=; though other flags can be set too from the -march= or its default set when configuring the compiler. So, if the testcase relies on SSE2 enabled and SSE3 not enabled, it should use -msse2 -mno-sse3. Seems the testcase actually relies on AVX not being enabled, so it should use "-msse2 -mno-avx". That will work fine even with -march=cascadelake, whether it is the default or requested through --target_board. Jakub