public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/108603] New: [11/12 Regression] ICE in output_operand_lossage with SVE and ilp32
@ 2023-01-30 18:12 acoplan at gcc dot gnu.org
  2023-01-31  8:46 ` [Bug target/108603] [12/13 " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: acoplan at gcc dot gnu.org @ 2023-01-30 18:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108603
           Summary: [11/12 Regression] ICE in output_operand_lossage with
                    SVE and ilp32
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

The following fails:

$ gcc/xgcc -B gcc -v
Reading specs from gcc/specs
COLLECT_GCC=gcc/xgcc
COLLECT_LTO_WRAPPER=gcc/lto-wrapper
Target: aarch64-none-elf
Configured with: /home/alecop01/toolchain/src/gcc/configure
--prefix=/data_sdb/toolchain/cc1s/aarch64 --enable-langauges=c,c++
--disable-bootstrap --target=aarch64-none-elf
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 13.0.1 20230130 (experimental) (GCC)
$ cat t.c
int a[128];
long long *p;
void f() {
  for (long i = 0; i < sizeof(long); i++)
    p[i] = a[i];
}
$ gcc/xgcc -B gcc -c t.c -O2 -march=armv8.2-a+sve -mabi=ilp32 -fdata-sections
t.c:6:1: internal compiler error: output_operand: invalid expression as operand
    6 | }
      | ^
0xa99b40 output_operand_lossage(char const*, ...)
        /home/alecop01/toolchain/src/gcc/gcc/final.cc:3190
0xa9a3dd output_addr_const(_IO_FILE*, rtx_def*)
        /home/alecop01/toolchain/src/gcc/gcc/final.cc:3787
0xa9a163 output_addr_const(_IO_FILE*, rtx_def*)
        /home/alecop01/toolchain/src/gcc/gcc/final.cc:3767
0x12c647e assemble_integer_with_op(char const*, rtx_def*)
        /home/alecop01/toolchain/src/gcc/gcc/varasm.cc:2845
0x12c64d2 default_assemble_integer(rtx_def*, unsigned int, int)
        /home/alecop01/toolchain/src/gcc/gcc/varasm.cc:2861
0x12c652c assemble_integer(rtx_def*, unsigned int, unsigned int, int)
        /home/alecop01/toolchain/src/gcc/gcc/varasm.cc:2877
0x12c6d56 output_constant_pool_1
        /home/alecop01/toolchain/src/gcc/gcc/varasm.cc:4170
0x12dc5c6 output_constant_pool_contents
        /home/alecop01/toolchain/src/gcc/gcc/varasm.cc:4327
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

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

* [Bug target/108603] [12/13 Regression] ICE in output_operand_lossage with SVE and ilp32
  2023-01-30 18:12 [Bug target/108603] New: [11/12 Regression] ICE in output_operand_lossage with SVE and ilp32 acoplan at gcc dot gnu.org
@ 2023-01-31  8:46 ` rguenth at gcc dot gnu.org
  2023-02-06 14:23 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-01-31  8:46 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.3

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

* [Bug target/108603] [12/13 Regression] ICE in output_operand_lossage with SVE and ilp32
  2023-01-30 18:12 [Bug target/108603] New: [11/12 Regression] ICE in output_operand_lossage with SVE and ilp32 acoplan at gcc dot gnu.org
  2023-01-31  8:46 ` [Bug target/108603] [12/13 " rguenth at gcc dot gnu.org
@ 2023-02-06 14:23 ` marxin at gcc dot gnu.org
  2023-02-09 10:34 ` rsandifo at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-02-06 14:23 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-4240-g2b8453c401b699 which is about enabled vectorization for
-O2.

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

* [Bug target/108603] [12/13 Regression] ICE in output_operand_lossage with SVE and ilp32
  2023-01-30 18:12 [Bug target/108603] New: [11/12 Regression] ICE in output_operand_lossage with SVE and ilp32 acoplan at gcc dot gnu.org
  2023-01-31  8:46 ` [Bug target/108603] [12/13 " rguenth at gcc dot gnu.org
  2023-02-06 14:23 ` marxin at gcc dot gnu.org
@ 2023-02-09 10:34 ` rsandifo at gcc dot gnu.org
  2023-02-21 12:51 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2023-02-09 10:34 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-02-09
                 CC|                            |rsandifo at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rsandifo at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Mine.

(insn 30 29 31 4 (set (reg/f:DI 116)
        (mem/u/c:DI (reg/f:DI 117) [0  S8 A64])) "...":5:13 -1
     (expr_list:REG_EQUAL (const:DI (reg:DI 111))
        (nil)))

Heh.

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

* [Bug target/108603] [12/13 Regression] ICE in output_operand_lossage with SVE and ilp32
  2023-01-30 18:12 [Bug target/108603] New: [11/12 Regression] ICE in output_operand_lossage with SVE and ilp32 acoplan at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-02-09 10:34 ` rsandifo at gcc dot gnu.org
@ 2023-02-21 12:51 ` rguenth at gcc dot gnu.org
  2023-03-02 10:30 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-02-21 12:51 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

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

* [Bug target/108603] [12/13 Regression] ICE in output_operand_lossage with SVE and ilp32
  2023-01-30 18:12 [Bug target/108603] New: [11/12 Regression] ICE in output_operand_lossage with SVE and ilp32 acoplan at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-02-21 12:51 ` rguenth at gcc dot gnu.org
@ 2023-03-02 10:30 ` cvs-commit at gcc dot gnu.org
  2023-04-03  8:57 ` [Bug target/108603] [12 " cvs-commit at gcc dot gnu.org
  2023-04-03  9:02 ` rsandifo at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-02 10:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:b09dc74801cf4e19bdf5fcd18a5cd53fc9e9ca9a

commit r13-6410-gb09dc74801cf4e19bdf5fcd18a5cd53fc9e9ca9a
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Thu Mar 2 10:30:21 2023 +0000

    Avoid creating (const (reg ...)) [PR108603]

    convert_memory_address_addr_space_1 has two modes: one in which it
    tries to create a self-contained RTL expression (which might fail)
    and one in which it can emit new instructions where necessary.

    When handling a CONST, the function recurses into the CONST's
    operand and then constifies the result.  But that's only valid if
    the result is still a self-contained expression.  If new instructions
    have been emitted, the expression will refer to the (non-constant)
    results of those instructions.

    In the PR, this caused us to emit a nonsensical (const (reg ...))
    REG_EQUAL note.

    gcc/
            PR tree-optimization/108603
            * explow.cc (convert_memory_address_addr_space_1): Only wrap
            the result of a recursive call in a CONST if no instructions
            were emitted.

    gcc/testsuite/
            PR tree-optimization/108603
            * gcc.target/aarch64/sve/pr108603.c: New test.

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

* [Bug target/108603] [12 Regression] ICE in output_operand_lossage with SVE and ilp32
  2023-01-30 18:12 [Bug target/108603] New: [11/12 Regression] ICE in output_operand_lossage with SVE and ilp32 acoplan at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-03-02 10:30 ` cvs-commit at gcc dot gnu.org
@ 2023-04-03  8:57 ` cvs-commit at gcc dot gnu.org
  2023-04-03  9:02 ` rsandifo at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-04-03  8:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Richard Sandiford
<rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:caecd24e230c4727c88ad117bab0342f378e81f7

commit r12-9380-gcaecd24e230c4727c88ad117bab0342f378e81f7
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Mon Apr 3 09:57:07 2023 +0100

    Avoid creating (const (reg ...)) [PR108603]

    convert_memory_address_addr_space_1 has two modes: one in which it
    tries to create a self-contained RTL expression (which might fail)
    and one in which it can emit new instructions where necessary.

    When handling a CONST, the function recurses into the CONST's
    operand and then constifies the result.  But that's only valid if
    the result is still a self-contained expression.  If new instructions
    have been emitted, the expression will refer to the (non-constant)
    results of those instructions.

    In the PR, this caused us to emit a nonsensical (const (reg ...))
    REG_EQUAL note.

    gcc/
            PR tree-optimization/108603
            * explow.cc (convert_memory_address_addr_space_1): Only wrap
            the result of a recursive call in a CONST if no instructions
            were emitted.

    gcc/testsuite/
            PR tree-optimization/108603
            * gcc.target/aarch64/sve/pr108603.c: New test.

    (cherry picked from commit b09dc74801cf4e19bdf5fcd18a5cd53fc9e9ca9a)

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

* [Bug target/108603] [12 Regression] ICE in output_operand_lossage with SVE and ilp32
  2023-01-30 18:12 [Bug target/108603] New: [11/12 Regression] ICE in output_operand_lossage with SVE and ilp32 acoplan at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-04-03  8:57 ` [Bug target/108603] [12 " cvs-commit at gcc dot gnu.org
@ 2023-04-03  9:02 ` rsandifo at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2023-04-03  9:02 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

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

--- Comment #5 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2023-04-03  9:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-30 18:12 [Bug target/108603] New: [11/12 Regression] ICE in output_operand_lossage with SVE and ilp32 acoplan at gcc dot gnu.org
2023-01-31  8:46 ` [Bug target/108603] [12/13 " rguenth at gcc dot gnu.org
2023-02-06 14:23 ` marxin at gcc dot gnu.org
2023-02-09 10:34 ` rsandifo at gcc dot gnu.org
2023-02-21 12:51 ` rguenth at gcc dot gnu.org
2023-03-02 10:30 ` cvs-commit at gcc dot gnu.org
2023-04-03  8:57 ` [Bug target/108603] [12 " cvs-commit at gcc dot gnu.org
2023-04-03  9:02 ` rsandifo at gcc dot gnu.org

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).