[Bug target/59839] New: i686 AVX2 gather intrinsic not compiling with -O0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59839 Bug ID: 59839 Summary: i686 AVX2 gather intrinsic not compiling with -O0 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: dejan.crnila at dewesoft dot si Created attachment 31850 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31850&action=edit preprocesed source the following source does #include void test(const float* data) { __m256i i = _mm256_set1_epi32(1); __m256 d = _mm256_i32gather_ps(data, i, 1); } does not compile with gcc -mavx2 -O0 -c test.c note: it does compile with -O1 or above error: test.c: In function 'test': test.c:7:1: error: unrecognizable insn: } ^ (insn 28 27 0 2 (parallel [ (set (mem/c:V8SF (plus:SI (reg/f:SI 54 virtual-stack-vars (const_int -64 [0xffc0])) [0 d+0 (unspec:V8SF [ (reg:V8SF 61 [ D.7004 ]) (mem:SF (unspec:SI [ (reg/f:SI 71) (reg:V8SI 60 [ D.7005 ]) (const_int 1 [0x1]) ] UNSPEC_VSIBADDR) [0 S4 A8]) (mem:BLK (scratch) [0 A8]) (reg:V8SF 59 [ D.7004 ]) ] UNSPEC_GATHER)) (clobber (scratch:V8SF)) ]) test.c:6 -1 (nil)) test.c:7:1: internal compiler error: in extract_insn, at recog.c:2150 Please submit a full bug report, with preprocessed source if appropriate. See <http://sourceforge.net/projects/mingwbuilds/> for instructions. gcc -v: Using built-in specs. COLLECT_GCC=c:\mingw\bin\gcc.exe COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/i686-w64-mingw32/4.8.0/lto-wrapper.exe Target: i686-w64-mingw32 Configured with: ../../../src/gcc-4.8.0/configure --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32 --prefix=/mingw32 --with-sysroot=/t emp/x32-480-win32-sjlj-r2/mingw32 --enable-shared --enable-static --enable-targets=all --enable-multilib --enable-languages=c,c++,fortran,lto --enable-libstdcxx -time=yes --enable-threads=win32 --enable-libgomp --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --enable-version-specif ic-runtime-libs --enable-sjlj-exceptions --disable-isl-version-check --disable-cloog-version-check --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-b ootstrap --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch-32=i686 --with-arch-6 4=nocona --with-tune-32=generic --with-tune-64=core2 --with-host-libstdcxx='-static -lstdc++' --with-libiconv --with-system-zlib --with-gmp=/temp/mingw-prereq/i 686-w64-mingw32-static --with-mpfr=/temp/mingw-prereq/i686-w64-mingw32-static --with-mpc=/temp/mingw-prereq/i686-w64-mingw32-static --with-isl=/temp/mingw-prere q/i686-w64-mingw32-static --with-cloog=/temp/mingw-prereq/i686-w64-mingw32-static --enable-cloog-backend=isl --with-pkgversion='rev2, Built by MinGW-builds proj ect' --with-bugurl=http://sourceforge.net/projects/mingwbuilds/ CFLAGS='-O2 -pipe -I/temp/x32-480-win32-sjlj-r2/libs/include -I/temp/mingw-prereq/x32-zlib/inclu de -I/temp/mingw-prereq/i686-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -I/temp/x32-480-win32-sjlj-r2/libs/include -I/temp/mingw-prereq/x32-zlib/include -I /temp/mingw-prereq/i686-w64-mingw32-static/include' CPPFLAGS= LDFLAGS='-pipe -L/temp/x32-480-win32-sjlj-r2/libs/lib -L/temp/mingw-prereq/x32-zlib/lib -L/temp/mi ngw-prereq/i686-w64-mingw32-static/lib -L/temp/x32-480-win32-sjlj-r2/mingw32/opt/lib' Thread model: win32 gcc version 4.8.0 (rev2, Built by MinGW-builds project)
[Bug tree-optimization/66580] New: max reduction does not auto vectorize
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66580 Bug ID: 66580 Summary: max reduction does not auto vectorize Product: gcc Version: 5.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: dejan.crnila at dewesoft dot si Target Milestone: --- following code does (max reduction) not auto vectorize on x64/mingw gcc #include #include int main() { float a[] __attribute__((aligned(0x20))) = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}; float maxval = -FLT_MAX; for (size_t i = 0; i < 16; i++) maxval = a[i] > maxval ? a[i] : maxval; printf("%g\n", maxval); } compiled as gcc test.c -O3 -Wall -o test.exe -ftree-vectorizer-verbose=6 -fopt-info-vec-all -ffast-math -mavx not supported or bug?