https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102080
Bug ID: 102080 Summary: [12 Regression] avx512vl related ICE, on firefox-92 gcc ICEs: in expand_insn, at optabs.c:7946 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- Observed gcc-12 ICE on today's gcc when was building firefox checkout. I might have reduced it down to something invalid. Here is the minimal reproducer: // cat dec_reconstruct.cc.cc #pragma GCC target "avx" typedef float __m256 __attribute__((__vector_size__(32))); __m256 _mm256_blendv_ps___Y, _mm256_blendv_ps___M, _mm256_mul_ps___A, _mm256_mul_ps___B, IfThenElse___trans_tmp_9; void IfThenElse(__m256 no) { IfThenElse___trans_tmp_9 = __builtin_ia32_blendvps256( no, _mm256_blendv_ps___Y, _mm256_blendv_ps___M); } #pragma GCC target "avx512vl" void EncodedFromDisplay() { __m256 __trans_tmp_11 = _mm256_mul_ps___A * _mm256_mul_ps___B; IfThenElse(__trans_tmp_11); } -O0 works, -O2 fails: $ /tmp/gcc-c/gcc/xg++ -B/tmp/gcc-c/gcc -c dec_reconstruct.cc.cc -O0 $ /tmp/gcc-c/gcc/xg++ -B/tmp/gcc-c/gcc -c dec_reconstruct.cc.cc -O2 during RTL pass: expand dec_reconstruct.cc.cc: In function 'void EncodedFromDisplay()': dec_reconstruct.cc.cc:10:6: internal compiler error: in expand_insn, at optabs.c:7946 10 | void EncodedFromDisplay() { | ^~~~~~~~~~~~~~~~~~ 0x7f3941d62286 __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0x7f3941d62337 __libc_start_main_impl ../csu/libc-start.c:409 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. $ /tmp/gcc-c/gcc/xg++ -B/tmp/gcc-c/gcc -v Reading specs from /tmp/gcc-c/gcc/specs COLLECT_GCC=/tmp/gcc-c/gcc/xg++ COLLECT_LTO_WRAPPER=/tmp/gcc-c/gcc/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /home/slyfox/dev/git/gcc/configure --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --enable-languages=c,c++ --disable-bootstrap --with-multilib-list=m64 --prefix=/tmp/gcc-c/../gcc-native-quick-installed --disable-nls --without-isl --disable-libsanitizer --disable-libvtv --disable-libgomp --disable-libstdcxx-pch --disable-libunwind-exceptions CFLAGS='-O1 ' CXXFLAGS='-O1 ' Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.0.0 20210826 (experimental) (GCC)