Created attachment 38307 [details] Reproducer GCC gives internal compiler error on knl, broadwell and skylake-avx512 targets with -O3 and -Ofast. Reproducer: > g++ -std=c++11 -Ofast -march=knl -c -o out small.cpp > g++ -std=c++11 -Ofast -march=broadwell -c -o out small.cpp > g++ -std=c++11 -Ofast -march=skylake-avx512 -c -o out small.cpp Output: small.cpp: In function 'void fn1()': small.cpp:9:6: internal compiler error: Segmentation fault void fn1() { ^~~ 0xcf8d3f crash_signal /export/users/gnutester/stability/svn/trunk/gcc/toplev.c:335 0xa71c81 is_gimple_reg_type /export/users/gnutester/stability/svn/trunk/gcc/gimple-expr.h:75 0xa71c81 is_gimple_val(tree_node*) /export/users/gnutester/stability/svn/trunk/gcc/gimple-expr.c:781 0xd26cdf verify_gimple_assign_binary /export/users/gnutester/stability/svn/trunk/gcc/tree-cfg.c:3704 0xd3a063 verify_gimple_in_cfg(function*, bool) /export/users/gnutester/stability/svn/trunk/gcc/tree-cfg.c:5052 0xc2e1a3 execute_function_todo /export/users/gnutester/stability/svn/trunk/gcc/passes.c:1968 0xc2eb6b execute_todo /export/users/gnutester/stability/svn/trunk/gcc/passes.c:2020 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. --------------- > gcc -v --------------- Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/export/users/amitrokh/gcc_trunk/bin/../libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /export/users/gnutester/stability/svn/trunk/configure --with-arch=corei7 --with-cpu=corei7 --enable-clocale=gnu --with-system-zlib --enable-shared --with-demangler-in-ld --enable-cloog-backend=isl --with-fpmath=sse --with-pkgversion=Revision=235172/svn-rev:235172/ --prefix=/export/users/gnutester/stability/work/trunk/64/install --enable-languages=c,c++,fortran,java,lto Thread model: posix gcc version 7.0.0 20160418 (experimental) (Revision=235172/svn-rev:235172/)
Confirmed. We end up with a released SSA name in the IL after BB vectorization.
I will have a look.
Author: rguenth Date: Wed Apr 20 07:20:16 2016 New Revision: 235236 URL: https://gcc.gnu.org/viewcvs?rev=235236&root=gcc&view=rev Log: 2016-04-20 Richard Biener <rguenther@suse.de> PR tree-optimization/70726 * tree-vect-stmts.c (vectorizable_shift): Do not use scalar shift amounts from a pattern stmt operand. * g++.dg/vect/pr70726.cc: New testcase. Added: trunk/gcc/testsuite/g++.dg/vect/pr70726.cc Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-vect-stmts.c
Fixed.
Author: rguenth Date: Wed Apr 20 07:21:42 2016 New Revision: 235237 URL: https://gcc.gnu.org/viewcvs?rev=235237&root=gcc&view=rev Log: 2016-04-20 Richard Biener <rguenther@suse.de> PR tree-optimization/70726 * tree-vect-stmts.c (vectorizable_shift): Do not use scalar shift amounts from a pattern stmt operand. * g++.dg/vect/pr70726.cc: New testcase. Added: branches/gcc-6-branch/gcc/testsuite/g++.dg/vect/pr70726.cc Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/testsuite/ChangeLog branches/gcc-6-branch/gcc/tree-vect-stmts.c