Created attachment 34458 [details] reduced testcase Compiler output: $ gcc -O -ftree-vectorize -mavx512bw -march=slm testcase.c testcase.c: In function 'foo': testcase.c:34:1: internal compiler error: Max. number of generated reload insns per insn is achieved (90) } ^ 0xadff12 lra_constraints(bool) /mnt/svn/gcc-trunk/gcc/lra-constraints.c:4307 0xacb97b lra(_IO_FILE*) /mnt/svn/gcc-trunk/gcc/lra.c:2280 0xa7ad91 do_reload /mnt/svn/gcc-trunk/gcc/ira.c:5407 0xa7ad91 execute /mnt/svn/gcc-trunk/gcc/ira.c:5578 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=/mnt/svn/gcc-trunk/binary-latest/bin/gcc COLLECT_LTO_WRAPPER=/mnt/svn/gcc-trunk/binary-219632-lto-fortran-checking-yes-rtl-df/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /mnt/svn/gcc-trunk//configure --enable-checking=yes,rtl,df --enable-languages=c,c++,lto,fortran --prefix=/mnt/svn/gcc-trunk/binary-219632-lto-fortran-checking-yes-rtl-df/ --without-cloog --without-ppl Thread model: posix gcc version 5.0.0 20150115 (experimental) (GCC) Tested revisions: r219632 - ICE
Started with my r218565.
The patterns in question are (define_insn "<mask_codefor><avx512>_vec_dup_gpr<mode><mask_name>" [(set (match_operand:VI12_AVX512VL 0 "register_operand" "=v,v") (vec_duplicate:VI12_AVX512VL (match_operand:<ssescalarmode> 1 "nonimmediate_operand" "vm,r")))] and thus ought to support both HImode MEM as well as GPR. (insn 60 242 62 4 (set (reg:V32HI 114 [ vect_cst_.38 ]) (vec_duplicate:V32HI (reg/v:HI 169 [ a1 ]))) 4194 {*avx512bw_vec_dup_gprv32hi} (expr_list:REG_DEAD (reg/v:HI 169 [ a1 ]) (nil))) (insn 62 60 64 4 (set (reg:V32HI 129 [ vect_cst_.41 ]) (vec_duplicate:V32HI (reg/v:HI 171 [ a2 ]))) 4194 {*avx512bw_vec_dup_gprv32hi} (expr_list:REG_DEAD (reg/v:HI 171 [ a2 ]) (nil))) ... Vlad, can you please have a look?
Author: vmakarov Date: Fri Jan 30 17:47:44 2015 New Revision: 220294 URL: https://gcc.gnu.org/viewcvs?rev=220294&root=gcc&view=rev Log: 2015-01-30 Vladimir Makarov <vmakarov@redhat.com> PR target/64617 * lra-constraints.c (prohibited_class_reg_set_mode_p): New function. (process_alt_operands): Use it. (curr_insn_transform): Check the optional reload pseudo class is ok for the mode. 2015-01-30 Vladimir Makarov <vmakarov@redhat.com> PR target/64617 * gcc.target/i386/pr64617.c: New test. Added: trunk/gcc/testsuite/gcc.target/i386/pr64617.c Modified: trunk/gcc/ChangeLog trunk/gcc/lra-constraints.c trunk/gcc/testsuite/ChangeLog
*** Bug 64311 has been marked as a duplicate of this bug. ***
Should be fixed on trunk with Vlad's patch.