Revision 177268 failed to bootstrap with AVX enabled.
Started from here http://gcc.gnu.org/ml/gcc-regression/2011-08/msg00051.html
It is caused by revision 177218: http://gcc.gnu.org/ml/gcc-cvs/2011-08/msg00228.html On Linux/ia32, adding -march=corei7-avx caused: [hjl@gnu-snb-1 src]$ /export/gnu/import/rrs-bootstrap/177218/bld/./gcc/xgcc -shared-libgcc -B/export/gnu/import/rrs-bootstrap/177218/bld/./gcc -nostdinc++ -L/export/gnu/import/rrs-bootstrap/177218/bld/x86_64-unknown-linux-gnu/32/libstdc++-v3/src -L/export/gnu/import/rrs-bootstrap/177218/bld/x86_64-unknown-linux-gnu/32/libstdc++-v3/src/.libs -B/export/gnu/import/rrs-bootstrap/177218/usr/x86_64-unknown-linux-gnu/bin/ -B/export/gnu/import/rrs-bootstrap/177218/usr/x86_64-unknown-linux-gnu/lib/ -isystem /export/gnu/import/rrs-bootstrap/177218/usr/x86_64-unknown-linux-gnu/include -isystem /export/gnu/import/rrs-bootstrap/177218/usr/x86_64-unknown-linux-gnu/sys-include -m32 -I/export/gnu/import/rrs-bootstrap/177218/bld/x86_64-unknown-linux-gnu/32/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/export/gnu/import/rrs-bootstrap/177218/bld/x86_64-unknown-linux-gnu/32/libstdc++-v3/include -I/export/gnu/import/rrs-bootstrap/177218/src/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=functexcept.lo -g -O2 -D_GNU_SOURCE -m32 -std=gnu++0x -c ../../../../../src/libstdc++-v3/src/functexcept.cc -fPIC -DPIC -S -march=corei7-avx ../../../../../src/libstdc++-v3/src/functexcept.cc: In function ‘void std::__throw_system_error(int)’: ../../../../../src/libstdc++-v3/src/functexcept.cc:106:62: internal compiler error: in fixup_args_size_notes, at expr.c:3586 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. [hjl@gnu-snb-1 src]$
Mine.
It's a bug in the i386 backend: (call_insn 28 27 136 2 (parallel [ (parallel [ (call (mem:QI (mem/f:SI (plus:SI (reg/f:SI 73 [ __ec$_M_cat_2->_vptr.error_category ]) (const_int 12 [0xc])) [3 MEM[(int (*__vtbl_ptr_type) () *)D.126512_12 + 12B]+0 S4 A32]) [0 *OBJ_TYPE_REF(D.126513_13;__ec$_M_cat_2->3) S1 A8]) (const_int 12 [0xc])) (set (reg/f:SI 7 sp) (plus:SI (reg/f:SI 7 sp) (const_int 4 [0x4]))) ]) (unspec [ (const_int 2 [0x2]) ] UNSPEC_CALL_NEEDS_VZEROUPPER) ]) /home/rth/work/gcc/bld/i686-linux/libstdc++-v3/include/system_error:158 480 {*call_pop_vzeroupper} Note the nested PARALLEL.
Created attachment 24910 [details] A patch I am testing this.
Created attachment 24911 [details] full patch Your patch misses several patterns. This bootstraps, but I don't have an avx cpu locally.
(In reply to comment #6) > Created attachment 24911 [details] > full patch > > Your patch misses several patterns. > > This bootstraps, but I don't have an avx cpu locally. I am testing it now. Thanks.
(In reply to comment #6) > Created attachment 24911 [details] > full patch > > Your patch misses several patterns. > > This bootstraps, but I don't have an avx cpu locally. It works: http://gcc.gnu.org/ml/gcc-testresults/2011-08/msg00355.html
Author: rth Date: Thu Aug 4 15:47:42 2011 New Revision: 177408 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177408 Log: PR target/49964 * config/i386/i386.c (ix86_expand_call): Don't create nested PARALLELs for TARGET_VZEROUPPER. (ix86_split_call_vzeroupper): Fix extraction of the original call. * config/i386/i386.md (*call_rex64_ms_sysv_vzeroupper): Don't recognize nested PARALLELs. (*call_pop_vzeroupper, *sibcall_pop_vzeroupper, *call_value_rex64_ms_sysv_vzeroupper, *call_value_pop_vzeroupper, *sibcall_value_pop_vzeroupper): Likewise. Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.c trunk/gcc/config/i386/i386.md
Fixed.