public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/103894] New: ICE: in emit_move_multi_word, at expr.c:3870 with -mno-sse2
@ 2022-01-03  5:32 zsojka at seznam dot cz
  2022-01-03  8:50 ` [Bug target/103894] [12 Regression] " jakub at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2022-01-03  5:32 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103894
           Summary: ICE: in emit_move_multi_word, at expr.c:3870 with
                    -mno-sse2
           Product: gcc
           Version: 12.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
            Target: x86_64-pc-linux-gnu

Created attachment 52110
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52110&action=edit
reduced testcase

This seems to be a recent regression.

Compiler output:
$ x86_64-pc-linux-gnu-gcc -mno-sse2 testcase.c 
during RTL pass: reload
testcase.c: In function 'foo':
testcase.c:9:1: internal compiler error: in emit_move_multi_word, at
expr.c:3870
    9 | }
      | ^
0x6c6c3b emit_move_multi_word
        /repo/gcc-trunk/gcc/expr.c:3870
0xfa3d0b gen_move_insn(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/expr.c:4145
0x11ade8d curr_insn_transform
        /repo/gcc-trunk/gcc/lra-constraints.c:4214
0x11af026 lra_constraints(bool)
        /repo/gcc-trunk/gcc/lra-constraints.c:5161
0x1199994 lra(_IO_FILE*)
        /repo/gcc-trunk/gcc/lra.c:2336
0x114c429 do_reload
        /repo/gcc-trunk/gcc/ira.c:5932
0x114c429 execute
        /repo/gcc-trunk/gcc/ira.c:6118
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-r12-6173-20220102211314-g9ff206d3865-checking-yes-rtl-df-extra-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/12.0.0/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-r12-6173-20220102211314-g9ff206d3865-checking-yes-rtl-df-extra-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.0.0 20220102 (experimental) (GCC)

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

* [Bug target/103894] [12 Regression] ICE: in emit_move_multi_word, at expr.c:3870 with -mno-sse2
  2022-01-03  5:32 [Bug target/103894] New: ICE: in emit_move_multi_word, at expr.c:3870 with -mno-sse2 zsojka at seznam dot cz
@ 2022-01-03  8:50 ` jakub at gcc dot gnu.org
  2022-01-03 11:04 ` ubizjak at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-01-03  8:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-01-03
            Summary|ICE: in                     |[12 Regression] ICE: in
                   |emit_move_multi_word, at    |emit_move_multi_word, at
                   |expr.c:3870 with -mno-sse2  |expr.c:3870 with -mno-sse2
   Target Milestone|---                         |12.0
     Ever confirmed|0                           |1
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |uros at gcc dot gnu.org
           Priority|P3                          |P1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r12-6173-g9ff206d3865df5cb8407490aa9481029beac087f

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

* [Bug target/103894] [12 Regression] ICE: in emit_move_multi_word, at expr.c:3870 with -mno-sse2
  2022-01-03  5:32 [Bug target/103894] New: ICE: in emit_move_multi_word, at expr.c:3870 with -mno-sse2 zsojka at seznam dot cz
  2022-01-03  8:50 ` [Bug target/103894] [12 Regression] " jakub at gcc dot gnu.org
@ 2022-01-03 11:04 ` ubizjak at gmail dot com
  2022-01-03 19:59 ` cvs-commit at gcc dot gnu.org
  2022-01-03 20:28 ` ubizjak at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2022-01-03 11:04 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

Patch in testing.

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

* [Bug target/103894] [12 Regression] ICE: in emit_move_multi_word, at expr.c:3870 with -mno-sse2
  2022-01-03  5:32 [Bug target/103894] New: ICE: in emit_move_multi_word, at expr.c:3870 with -mno-sse2 zsojka at seznam dot cz
  2022-01-03  8:50 ` [Bug target/103894] [12 Regression] " jakub at gcc dot gnu.org
  2022-01-03 11:04 ` ubizjak at gmail dot com
@ 2022-01-03 19:59 ` cvs-commit at gcc dot gnu.org
  2022-01-03 20:28 ` ubizjak at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-03 19:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 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:1096ab1775636f35de9c6661f8f71f03299af998

commit r12-6194-g1096ab1775636f35de9c6661f8f71f03299af998
Author: Uros Bizjak <ubizjak@gmail.com>
Date:   Mon Jan 3 20:58:16 2022 +0100

    i386: Always enable mov<V_32:mode> patterns [PR103894]

    Middle end tries to generate V4QImode moves to implement V2QImode inserts
    and calls emit_move_multi_word when V4QImode moves are unavailable, as is
    the case with 32-bit vector moves, constrainted with TARGET_SSE2.

    However, this triggers

      gcc_assert (mode_size >= UNITS_PER_WORD);

    in emit_move_multi_word, since mode_size of V4QImode operand is less than
    UNITS_PER_WORD of 64-bit targets.

    The patch unconditionally enables 32-bit vector moves to match 16-bit
    vector moves.  This also enables implementation of 32-bit vector logic
    operations with GPR in a follow-up patch.

    2022-01-03  Uroš Bizjak  <ubizjak@gmail.com>

    gcc/ChangeLog:

            PR target/103894
            * config/i386/mmx.md (mov<V_32:mode>): Remove TARGET_SSE2
constraint.
            (mov<V_32:mode>_internal): Ditto.
            (*push<V_32:mode>_rex64): Ditto.
            (movmisalign<V_32:mode>): Ditto.
            (*push<V_32:mode>_rex64 splitter): Enable for
            TARGET_64BIT && TARGET_SSE.
            (*push<V_32:mode>2): Remove insn pattern.

    gcc/testsuite/ChangeLog:

            PR target/103894
            * gcc.target/i386/pr103894.c: New test.

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

* [Bug target/103894] [12 Regression] ICE: in emit_move_multi_word, at expr.c:3870 with -mno-sse2
  2022-01-03  5:32 [Bug target/103894] New: ICE: in emit_move_multi_word, at expr.c:3870 with -mno-sse2 zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2022-01-03 19:59 ` cvs-commit at gcc dot gnu.org
@ 2022-01-03 20:28 ` ubizjak at gmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2022-01-03 20:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #4 from Uroš Bizjak <ubizjak at gmail dot com> ---
Fixed.

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

end of thread, other threads:[~2022-01-03 20:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-03  5:32 [Bug target/103894] New: ICE: in emit_move_multi_word, at expr.c:3870 with -mno-sse2 zsojka at seznam dot cz
2022-01-03  8:50 ` [Bug target/103894] [12 Regression] " jakub at gcc dot gnu.org
2022-01-03 11:04 ` ubizjak at gmail dot com
2022-01-03 19:59 ` cvs-commit at gcc dot gnu.org
2022-01-03 20:28 ` 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).