public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/94603] New: ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128
@ 2020-04-15  7:02 zsojka at seznam dot cz
  2020-04-15  7:27 ` [Bug target/94603] " marxin at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: zsojka at seznam dot cz @ 2020-04-15  7:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94603

            Bug ID: 94603
           Summary: ICE: in extract_insn, at recog.c:2343 (unrecognizable
                    insn) with -mno-sse2 and __builtin_ia32_movq128
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu

Created attachment 48277
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48277&action=edit
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)

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/94603] ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128
  2020-04-15  7:02 [Bug target/94603] New: ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128 zsojka at seznam dot cz
@ 2020-04-15  7:27 ` marxin at gcc dot gnu.org
  2020-04-15  7:57 ` ubizjak at gmail dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-04-15  7:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94603

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-04-15
     Ever confirmed|0                           |1

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, at least as old as 4.8.0.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/94603] ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128
  2020-04-15  7:02 [Bug target/94603] New: ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128 zsojka at seznam dot cz
  2020-04-15  7:27 ` [Bug target/94603] " marxin at gcc dot gnu.org
@ 2020-04-15  7:57 ` ubizjak at gmail dot com
  2020-04-15  8:16 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2020-04-15  7:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94603

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |ubizjak at gmail dot com
             Status|NEW                         |ASSIGNED

--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 48278
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48278&action=edit
Patch in testing.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/94603] ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128
  2020-04-15  7:02 [Bug target/94603] New: ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128 zsojka at seznam dot cz
  2020-04-15  7:27 ` [Bug target/94603] " marxin at gcc dot gnu.org
  2020-04-15  7:57 ` ubizjak at gmail dot com
@ 2020-04-15  8:16 ` jakub at gcc dot gnu.org
  2020-04-15  8:22 ` ubizjak at gmail dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-15  8:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94603

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The testcase will need -msse -mno-sse2.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/94603] ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128
  2020-04-15  7:02 [Bug target/94603] New: ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128 zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2020-04-15  8:16 ` jakub at gcc dot gnu.org
@ 2020-04-15  8:22 ` ubizjak at gmail dot com
  2020-04-15  8:25 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2020-04-15  8:22 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94603

--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
(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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/94603] ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128
  2020-04-15  7:02 [Bug target/94603] New: ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128 zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2020-04-15  8:22 ` ubizjak at gmail dot com
@ 2020-04-15  8:25 ` jakub at gcc dot gnu.org
  2020-04-15  8:38 ` ubizjak at gmail dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-04-15  8:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94603

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/94603] ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128
  2020-04-15  7:02 [Bug target/94603] New: ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128 zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2020-04-15  8:25 ` jakub at gcc dot gnu.org
@ 2020-04-15  8:38 ` ubizjak at gmail dot com
  2020-04-15 15:08 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2020-04-15  8:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94603

--- Comment #6 from Uroš Bizjak <ubizjak at gmail dot com> ---
(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--

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/94603] ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128
  2020-04-15  7:02 [Bug target/94603] New: ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128 zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2020-04-15  8:38 ` ubizjak at gmail dot com
@ 2020-04-15 15:08 ` cvs-commit at gcc dot gnu.org
  2020-04-15 20:03 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-15 15:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94603

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/94603] ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128
  2020-04-15  7:02 [Bug target/94603] New: ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128 zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2020-04-15 15:08 ` cvs-commit at gcc dot gnu.org
@ 2020-04-15 20:03 ` cvs-commit at gcc dot gnu.org
  2020-04-15 21:26 ` cvs-commit at gcc dot gnu.org
  2020-04-15 21:27 ` ubizjak at gmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-15 20:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94603

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/94603] ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128
  2020-04-15  7:02 [Bug target/94603] New: ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128 zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  2020-04-15 20:03 ` cvs-commit at gcc dot gnu.org
@ 2020-04-15 21:26 ` cvs-commit at gcc dot gnu.org
  2020-04-15 21:27 ` ubizjak at gmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-15 21:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94603

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug target/94603] ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128
  2020-04-15  7:02 [Bug target/94603] New: ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128 zsojka at seznam dot cz
                   ` (8 preceding siblings ...)
  2020-04-15 21:26 ` cvs-commit at gcc dot gnu.org
@ 2020-04-15 21:27 ` ubizjak at gmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2020-04-15 21:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94603

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |8.5
             Status|ASSIGNED                    |RESOLVED

--- Comment #10 from Uroš Bizjak <ubizjak at gmail dot com> ---
Fixed for gcc-8.5+.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-04-15 21:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15  7:02 [Bug target/94603] New: ICE: in extract_insn, at recog.c:2343 (unrecognizable insn) with -mno-sse2 and __builtin_ia32_movq128 zsojka at seznam dot cz
2020-04-15  7:27 ` [Bug target/94603] " marxin at gcc dot gnu.org
2020-04-15  7:57 ` ubizjak at gmail dot com
2020-04-15  8:16 ` jakub at gcc dot gnu.org
2020-04-15  8:22 ` ubizjak at gmail dot com
2020-04-15  8:25 ` jakub at gcc dot gnu.org
2020-04-15  8:38 ` ubizjak at gmail dot com
2020-04-15 15:08 ` cvs-commit at gcc dot gnu.org
2020-04-15 20:03 ` cvs-commit at gcc dot gnu.org
2020-04-15 21:26 ` cvs-commit at gcc dot gnu.org
2020-04-15 21:27 ` ubizjak at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).