Created attachment 30528 [details] Preprocessed tescase -mcpu=power8 causes ICE in testcase g++.dg/torture/vshuf-v2di.C. [pthaugen@igoo p8]$ ~/install/gcc/trunk/bin/g++ -c -m32 -mcpu=power8 -std=c++11 -O3 vshuf-v2di.ii rs6000_secondary_reload_inner:15144, type = load (parallel [ (set (reg:V16QI 78 1) (reg:V16QI 32 0)) (clobber (reg:SI 10 10)) ]) In file included from vshuf-v2di.C:18:0: /home/pthaugen/src/gcc/gcc-4_9-power8/gcc/gcc/testsuite/g++.dg/torture/vshuf-main.inc: In function ‘int main()’: /home/pthaugen/src/gcc/gcc-4_9-power8/gcc/gcc/testsuite/g++.dg/torture/vshuf-main.inc:29:1: internal compiler error: in rs6000_secondary_reload_fail, at config/rs6000/rs6000.c:15117 } ^ 0x10b106b7 rs6000_secondary_reload_fail /home/pthaugen/src/gcc/trunk/gcc/gcc/config/rs6000/rs6000.c:15117 0x10b3e837 rs6000_secondary_reload_inner(rtx_def*, rtx_def*, rtx_def*, bool) /home/pthaugen/src/gcc/trunk/gcc/gcc/config/rs6000/rs6000.c:15144 0x10bfd367 gen_reload_v16qi_si_load(rtx_def*, rtx_def*, rtx_def*) /home/pthaugen/src/gcc/trunk/gcc/gcc/config/rs6000/vector.md:196 0x100e5b23 emit_input_reload_insns /home/pthaugen/src/gcc/trunk/gcc/gcc/reload1.c:7542 0x100e5b23 do_input_reload /home/pthaugen/src/gcc/trunk/gcc/gcc/reload1.c:7880 0x100e5b23 emit_reload_insns /home/pthaugen/src/gcc/trunk/gcc/gcc/reload1.c:8072 0x100e5b23 reload_as_needed /home/pthaugen/src/gcc/trunk/gcc/gcc/reload1.c:4648 0x107c9efb reload(rtx_def*, int) /home/pthaugen/src/gcc/trunk/gcc/gcc/reload1.c:1054 0x106ac0e7 do_reload /home/pthaugen/src/gcc/trunk/gcc/gcc/ira.c:4701 0x106ac0e7 rest_of_handle_reload /home/pthaugen/src/gcc/trunk/gcc/gcc/ira.c:4801 Please submit a full bug report,
This one also seems to be fixed by the patch in pr58675.
No, cancel comment #1, I was fooled by version skew between the unpatched and the patched compiler. The testcase doesn't ICE on recent versions of gcc.
The testcase doesn't ICE since 206639. That wasn't an rs6000 patch so we probably still have the underlying issue in the rs6000 backend.
Created attachment 32130 [details] ccf2q412.out.gz I think I may be encountering the same or similar while compiling the eigen3 test cases. This is on RHEL7 ppc64 with gcc-4.8.2-3.el7. [ 13%] Building CXX object test/CMakeFiles/product_extra_3.dir/product_extra.cpp.o cd /builddir/build/BUILD/eigen-eigen-ffa86ffb5570/ppc64-redhat-linux-gnu/test && /usr/bin/c++ -DEIGEN_CHOLMOD_SUPPORT -DEIGEN_SPQR_SUPPORT -DEIGEN_SUPERLU_SUPPORT -DEIGEN_UMFPACK_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mcpu=power7 -mtune=power7 -fexceptions -pedantic -Wall -Wextra -Wundef -Wcast-align -Wchar-subscripts -Wnon-virtual-dtor -Wunused-local-typedefs -Wpointer-arith -Wwrite-strings -Wformat-security -Wno-psabi -Wno-variadic-macros -Wno-long-long -fno-check-new -fno-common -fstrict-aliasing -ansi -g2 -g0 -O2 -fno-inline-functions -I/builddir/build/BUILD/eigen-eigen-ffa86ffb5570/ppc64-redhat-linux-gnu/test -I/builddir/build/BUILD/eigen-eigen-ffa86ffb5570/test -I/builddir/build/BUILD/eigen-eigen-ffa86ffb5570 -I/builddir/build/BUILD/eigen-eigen-ffa86ffb5570/ppc64-redhat-linux-gnu -I/usr/include/suitesparse -I/usr/include/SuperLU -isystem /usr/include/QtGui -isystem /usr/include/QtCore -DEIGEN_TEST_MAX_SIZE=320 -DEIGEN_TEST_FUNC=product_extra -DEIGEN_TEST_PART_3=1 -o CMakeFiles/product_extra_3.dir/product_extra.cpp.o -c /builddir/build/BUILD/eigen-eigen-ffa86ffb5570/test/product_extra.cpp rs6000_secondary_reload_inner:15249, type = load (parallel [ (set (reg:V4SI 77 0) (reg:V4SI 32 0)) (clobber (reg:DI 3 3)) ]) /builddir/build/BUILD/eigen-eigen-ffa86ffb5570/test/product_extra.cpp: In function 'void product_extra(const MatrixType&) [with MatrixType = Eigen::Matrix<std::complex<float>, -1, -1>]': /builddir/build/BUILD/eigen-eigen-ffa86ffb5570/test/product_extra.cpp:101:1: internal compiler error: in rs6000_secondary_reload_fail, at config/rs6000/rs6000.c:15222 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://bugzilla.redhat.com/bugzilla> for instructions. Preprocessed source stored into /tmp/ccf2q412.out file, please attach this to your bugreport.
There's a currently reproducible failure on ibm/gcc-4_8-branch that looks very similar, though the insn it fails on is different. This occurs with -mcpu=power8 as the default, and only reproduces for a big-endian target. wschmidt@makalu-lp1:~/gcc/build/gcc-at7_0-test$ /home/wschmidt/gcc/build/gcc-at7_0-test/gcc/xgcc -B/home/wschmidt/gcc/build/gcc-at7_0-test/gcc/ /home/wschmidt/gcc/gcc-at7_0-test/gcc/testsuite/gcc.target/powerpc/ppc64-abi-dfp-1.c -fno-diagnostics-show-caret -std=gnu99 -O2 -fno-strict-aliasing -lm -m64 -o ./ppc64-abi-dfp-1.exe rs6000_secondary_reload_inner:16417, type = load (parallel [ (set (reg:SD 10 10) (mem/c:SD (plus:DI (plus:DI (reg/f:DI 31 31) (const_int 144 [0x90])) (reg:DI 10 10 [250])) [0 a14+0 S4 A32])) (clobber (reg:DI 7 7)) ]) /home/wschmidt/gcc/gcc-at7_0-test/gcc/testsuite/gcc.target/powerpc/ppc64-abi-dfp-1.c: In function ‘func5’: /home/wschmidt/gcc/gcc-at7_0-test/gcc/testsuite/gcc.target/powerpc/ppc64-abi-dfp-1.c:286:1: internal compiler error: in rs6000_secondary_reload_fail, at config/rs6000/rs6000.c:16353 0x106e4af7 rs6000_secondary_reload_fail /home/wschmidt/gcc/gcc-at7_0-test/gcc/config/rs6000/rs6000.c:16353 0x10712e47 rs6000_secondary_reload_inner(rtx_def*, rtx_def*, rtx_def*, bool) /home/wschmidt/gcc/gcc-at7_0-test/gcc/config/rs6000/rs6000.c:16380 0x107e15d7 gen_reload_sd_di_load(rtx_def*, rtx_def*, rtx_def*) /home/wschmidt/gcc/gcc-at7_0-test/gcc/config/rs6000/vector.md:207 0x10466a3f insn_gen_fn::operator()(rtx_def*, rtx_def*, rtx_def*) const /home/wschmidt/gcc/gcc-at7_0-test/gcc/recog.h:285 0x10466a3f emit_input_reload_insns /home/wschmidt/gcc/gcc-at7_0-test/gcc/reload1.c:7542 0x10466a3f do_input_reload /home/wschmidt/gcc/gcc-at7_0-test/gcc/reload1.c:7880 0x10466a3f emit_reload_insns /home/wschmidt/gcc/gcc-at7_0-test/gcc/reload1.c:8072 0x10466a3f reload_as_needed /home/wschmidt/gcc/gcc-at7_0-test/gcc/reload1.c:4648 0x1046c49f reload(rtx_def*, int) /home/wschmidt/gcc/gcc-at7_0-test/gcc/reload1.c:1054 0x103696d3 do_reload /home/wschmidt/gcc/gcc-at7_0-test/gcc/ira.c:4679 0x103696d3 rest_of_handle_reload /home/wschmidt/gcc/gcc-at7_0-test/gcc/ira.c:4779 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.
Bill, the ppc64-abi-dfp-1.c ICE is cured by the patch committed for pr58675 on the trunk. Now committed to ibm-4.8.
Blah, committed the patch with the wrong pr number, 57935 vs 57936. Author: amodra Date: Wed Feb 26 21:57:40 2014 New Revision: 208186 URL: http://gcc.gnu.org/viewcvs?rev=208186&root=gcc&view=rev Log: PR target/57936 * reload1.c (emit_input_reload_insns): When reload_override_in, set old to rl->in_reg when rl->in_reg is a subreg. Modified: trunk/gcc/ChangeLog trunk/gcc/reload1.c