Created attachment 48277 [details] reduced testcase Compiler output: $ x86_64-pc-linux-gnu-gcc -mno-sse2 testcase.c testcase.c: In function 'foo': testcase.c:7:1: error: unrecognizable insn: 7 | } | ^ (insn 7 6 8 2 (set (reg:V2DI 84) (vec_concat:V2DI (vec_select:DI (subreg:V2DI (reg:TI 85) 0) (parallel [ (const_int 0 [0]) ])) (const_int 0 [0]))) "testcase.c":6:10 -1 (nil)) during RTL pass: vregs testcase.c:7:1: internal compiler error: in extract_insn, at recog.c:2294 0x6d3efe _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) /repo/gcc-trunk/gcc/rtl-error.c:108 0x6d3f81 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) /repo/gcc-trunk/gcc/rtl-error.c:116 0x6c3367 extract_insn(rtx_insn*) /repo/gcc-trunk/gcc/recog.c:2294 0xca8923 instantiate_virtual_regs_in_insn /repo/gcc-trunk/gcc/function.c:1607 0xca8923 instantiate_virtual_regs /repo/gcc-trunk/gcc/function.c:1977 0xca8923 execute /repo/gcc-trunk/gcc/function.c:2026 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. $ x86_64-pc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r10-7691-20200412170534-g87be4cecfc6-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/10.0.1/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++ --enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra --with-cloog --with-ppl --with-isl --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld --with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-r10-7691-20200412170534-g87be4cecfc6-checking-yes-rtl-df-extra-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.0.1 20200412 (experimental) (GCC)
Confirmed, at least as old as 4.8.0.
Created attachment 48278 [details] Patch in testing.
The testcase will need -msse -mno-sse2.
(In reply to Jakub Jelinek from comment #3) > The testcase will need -msse -mno-sse2. Yes, but the testcase is invalid, because __builtin_ia32_movq128 should not be used without SSE2. Fixed compiler reports: pr94603.c: In function ‘foo’: pr94603.c:6:10: warning: implicit declaration of function ‘__builtin_ia32_movq128’; did you mean ‘__builtin_ia32_movntps’? [-Wimplicit-function-declaration] pr94603.c:6:10: error: incompatible types when returning type ‘int’ but ‘V’ {aka ‘__vector(2) long long int’} was expected
(In reply to Uroš Bizjak from comment #4) > (In reply to Jakub Jelinek from comment #3) > > The testcase will need -msse -mno-sse2. > > Yes, but the testcase is invalid, because __builtin_ia32_movq128 should not > be used without SSE2. Fixed compiler reports: > > pr94603.c: In function ‘foo’: > pr94603.c:6:10: warning: implicit declaration of function > ‘__builtin_ia32_movq128’; did you mean ‘__builtin_ia32_movntps’? > [-Wimplicit-function-declaration] > pr94603.c:6:10: error: incompatible types when returning type ‘int’ but ‘V’ > {aka ‘__vector(2) long long int’} was expected I know. But we (often) include even invalid testcases, perhaps with just dg-error "" and dg-warning "" (or use -w too) if we don't care about exact wording but just want to verify there is no ICE.
(In reply to Jakub Jelinek from comment #5) > (In reply to Uroš Bizjak from comment #4) > > (In reply to Jakub Jelinek from comment #3) > > > The testcase will need -msse -mno-sse2. > > > > Yes, but the testcase is invalid, because __builtin_ia32_movq128 should not > > be used without SSE2. Fixed compiler reports: > > > > pr94603.c: In function ‘foo’: > > pr94603.c:6:10: warning: implicit declaration of function > > ‘__builtin_ia32_movq128’; did you mean ‘__builtin_ia32_movntps’? > > [-Wimplicit-function-declaration] > > pr94603.c:6:10: error: incompatible types when returning type ‘int’ but ‘V’ > > {aka ‘__vector(2) long long int’} was expected > > I know. But we (often) include even invalid testcases, perhaps with just > dg-error "" and dg-warning "" (or use -w too) if we don't care about exact > wording but just want to verify there is no ICE. This is the testcase: --cut here-- /* PR target/94603 */ /* { dg-do compile } */ /* { dg-options "-Wno-implicit-function-declaration -msse -mno-sse2" } */ typedef long long __attribute__ ((__vector_size__ (16))) V; V foo (V v) { return __builtin_ia32_movq128 (v); /* { dg-error "" } */ } --cut here--
The master branch has been updated by Uros Bizjak <uros@gcc.gnu.org>: https://gcc.gnu.org/g:d4f655724c6e19ef0aeb5ac9e8d04abd962ccde7 commit r10-7737-gd4f655724c6e19ef0aeb5ac9e8d04abd962ccde7 Author: Uros Bizjak <ubizjak@gmail.com> Date: Wed Apr 15 17:08:07 2020 +0200 i386: Require OPTION_MASK_ISA_SSE2 for __builtin_ia32_movq128 [PR94603] PR target/94603 * config/i386/i386-builtin.def (__builtin_ia32_movq128): Require OPTION_MASK_ISA_SSE2. testsuite/ChangeLog: PR target/94603 * gcc.target/i386/pr94603.c: New test.
The releases/gcc-9 branch has been updated by Uros Bizjak <uros@gcc.gnu.org>: https://gcc.gnu.org/g:1eccf9955614a6f0597bf624bbc88788b8b0fdc5 commit r9-8499-g1eccf9955614a6f0597bf624bbc88788b8b0fdc5 Author: Uros Bizjak <ubizjak@gmail.com> Date: Wed Apr 15 22:02:39 2020 +0200 i386: Require OPTION_MASK_ISA_SSE2 for __builtin_ia32_movq128 [PR94603] PR target/94603 * config/i386/i386-builtin.def (__builtin_ia32_movq128): Require OPTION_MASK_ISA_SSE2. testsuite/ChangeLog: PR target/94603 * gcc.target/i386/pr94603.c: New test.
The releases/gcc-8 branch has been updated by Uros Bizjak <uros@gcc.gnu.org>: https://gcc.gnu.org/g:06d6120b7a5621d584bd0c861bc94096cc8b60b7 commit r8-10183-g06d6120b7a5621d584bd0c861bc94096cc8b60b7 Author: Uros Bizjak <ubizjak@gmail.com> Date: Wed Apr 15 23:25:27 2020 +0200 i386: Require OPTION_MASK_ISA_SSE2 for __builtin_ia32_movq128 [PR94603] PR target/94603 * config/i386/i386-builtin.def (__builtin_ia32_movq128): Require OPTION_MASK_ISA_SSE2. testsuite/ChangeLog: PR target/94603 * gcc.target/i386/pr94603.c: New test.
Fixed for gcc-8.5+.