public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791)
@ 2023-09-14  3:07 sjames at gcc dot gnu.org
  2023-09-14  3:30 ` [Bug target/111411] " pinskia at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-09-14  3:07 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111411
           Summary: [14 regression] ICE when building opus-1.4
                    (celt_decoder.c:1182:1: internal compiler error: in
                    extract_insn, at recog.cc:2791)
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 55896
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55896&action=edit
celt_decoder.c.i

```
gcc (Gentoo 14.0.0 p, commit d0b55776a4e1d2f293db5ba0e4a04aefed055ec4) 14.0.0
20230913 (experimental) 3af2af15798cb6243e2643f98f62c9270b1ca5d2
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```

```
FAILED: celt/libopus-celt.a.p/celt_decoder.c.o
aarch64-unknown-linux-gnu-gcc -Icelt/libopus-celt.a.p -Icelt -I../opus-1.4/celt
-I. -I../opus-1.4 -Iinclude -I../opus-1.4/include -Isilk -I../opus-1.4/silk
-fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -W
all -Winvalid-pch -Wextra -std=gnu99 -DOPUS_BUILD -DHAVE_CONFIG_H
-fvisibility=hidden -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes
-fstack-protector-strong -O3 -pipe -mcpu=native -fdiagnostics-c
olor=always -ggdb3 -fPIC -MD -MQ celt/libopus-celt.a.p/celt_decoder.c.o -MF
celt/libopus-celt.a.p/celt_decoder.c.o.d -o
celt/libopus-celt.a.p/celt_decoder.c.o -c ../opus-1.4/celt/celt_decoder.c
../opus-1.4/celt/celt_decoder.c: In function ‘celt_decode_with_ec’:
../opus-1.4/celt/celt_decoder.c:1182:1: error: unrecognizable insn:
 1182 | }
      | ^
(insn 5312 42 41 42 (parallel [
            (set (mem/c:SI (plus:DI (reg/f:DI 29 x29)
                        (const_int -260 [0xfffffffffffffefc])) [18 %sfp+-260 S4
A32])
                (const_int 0 [0]))
            (set (mem/c:SI (plus:DI (reg/f:DI 29 x29)
                        (const_int -256 [0xffffffffffffff00])) [18 %sfp+-256 S4
A32])
                (const_int 0 [0]))
        ]) "../opus-1.4/celt/celt_decoder.c":978:22 -1
     (nil))
during RTL pass: cprop_hardreg
../opus-1.4/celt/celt_decoder.c:1182:1: internal compiler error: in
extract_insn, at recog.cc:2791
0xaaaae5b09473 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/rtl-error.cc:108
0xaaaae5b0951b _fatal_insn_not_found(rtx_def const*, char const*, int, char
const*)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/rtl-error.cc:116
0xaaaae626d693 extract_insn(rtx_insn*)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/recog.cc:2791
0xaaaae6273fb3 extract_constrain_insn(rtx_insn*)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/recog.cc:2690
0xaaaae6278d5b copyprop_hardreg_forward_1
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/regcprop.cc:836
0xaaaae627a7e3 execute
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/regcprop.cc:1423
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

gcc -c celt_decoder.c.i -O3 is enough to repro.

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791)
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
@ 2023-09-14  3:30 ` pinskia at gcc dot gnu.org
  2023-09-14  3:31 ` [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong pinskia at gcc dot gnu.org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-14  3:30 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0
           Keywords|                            |ice-on-valid-code

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
  2023-09-14  3:30 ` [Bug target/111411] " pinskia at gcc dot gnu.org
@ 2023-09-14  3:31 ` pinskia at gcc dot gnu.org
  2023-09-14  5:15 ` sjames at gcc dot gnu.org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-14  3:31 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[14 regression] ICE when    |[14 regression] ICE when
                   |building opus-1.4           |building opus-1.4,
                   |(celt_decoder.c:1182:1:     |unrecognizable insn with
                   |internal compiler error: in |-fstack-protector-strong
                   |extract_insn, at            |
                   |recog.cc:2791)              |

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I am 99% sure this was caused by the patch set that Richard S. did a few days
ago.

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
  2023-09-14  3:30 ` [Bug target/111411] " pinskia at gcc dot gnu.org
  2023-09-14  3:31 ` [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong pinskia at gcc dot gnu.org
@ 2023-09-14  5:15 ` sjames at gcc dot gnu.org
  2023-09-14 14:45 ` pinskia at gcc dot gnu.org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-09-14  5:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Sam James <sjames at gcc dot gnu.org> ---
Created attachment 55897
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55897&action=edit
reduced.i

I've attached a reduced version but the memcpy bit could do with cleaning up
for it to be a bit more sensible.

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-09-14  5:15 ` sjames at gcc dot gnu.org
@ 2023-09-14 14:45 ` pinskia at gcc dot gnu.org
  2023-09-14 15:07 ` rsandifo at gcc dot gnu.org
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-14 14:45 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ross at burtonini dot com

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 111418 has been marked as a duplicate of this bug. ***

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-09-14 14:45 ` pinskia at gcc dot gnu.org
@ 2023-09-14 15:07 ` rsandifo at gcc dot gnu.org
  2023-09-14 16:33 ` sjames at gcc dot gnu.org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2023-09-14 15:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
I'm struggling to reproduce this. Do you know what your -mcpu=native expands
to?

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-09-14 15:07 ` rsandifo at gcc dot gnu.org
@ 2023-09-14 16:33 ` sjames at gcc dot gnu.org
  2023-09-14 17:34 ` rsandifo at gcc dot gnu.org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-09-14 16:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Richard Sandiford from comment #4)
> I'm struggling to reproduce this. Do you know what your -mcpu=native expands
> to?

# arch=native; for t in param target; do cmd="gcc -Q -O2 -mcpu=$arch
--help=$t"; diff -U0 <(LANG=C $cmd -mcpu=generic) <(LANG=C $cmd -mcpu=native);
done
--- /dev/fd/63  2023-09-14 16:31:42.423739708 -0000
+++ /dev/fd/62  2023-09-14 16:31:42.423739708 -0000
@@ -8 +8 @@
-  -mcpu=                               generic
+  -mcpu=                               ares+crc+crypto+ssbs

Also needs -fstack-protector-strong. But you're also welcome to have access to
the environment if needed.

```
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-unknown-linux-gnu/14/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-14.0.0.9999/work/gcc-14.0.0.9999/configure
--host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu
--prefix=/usr --bindir=/usr/aarch64-unknown-linux-gnu/gcc-bin/14
--includedir=/usr/lib/gcc/aarch64-unknown-linux-gnu/14/include
--datadir=/usr/share/gcc-data/aarch64-unknown-linux-gnu/14
--mandir=/usr/share/gcc-data/aarch64-unknown-linux-gnu/14/man
--infodir=/usr/share/gcc-data/aarch64-unknown-linux-gnu/14/info
--with-gxx-include-dir=/usr/lib/gcc/aarch64-unknown-linux-gnu/14/include/g++-v14
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/aarch64-unknown-linux-gnu/14/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=yes,extra,rtl
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 14.0.0 p,
commit d0b55776a4e1d2f293db5ba0e4a04aefed055ec4' --with-gcc-major-version-only
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--disable-multilib --disable-fixed-point --enable-libgomp --disable-libssp
--disable-libada --disable-cet --disable-systemtap
--disable-valgrind-annotations --disable-vtable-verify --disable-libvtv
--with-zstd --without-isl --enable-default-pie --enable-host-pie
--disable-host-bind-now --enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20230913 (experimental)
3af2af15798cb6243e2643f98f62c9270b1ca5d2 (Gentoo 14.0.0 p, commit
d0b55776a4e1d2f293db5ba0e4a04aefed055ec4)
```

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-09-14 16:33 ` sjames at gcc dot gnu.org
@ 2023-09-14 17:34 ` rsandifo at gcc dot gnu.org
  2023-09-14 18:41 ` rsandifo at gcc dot gnu.org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2023-09-14 17:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
Thanks, I can reproduce it now.  I had been trying with tip of trunk, but it
seems to have gone latent after 9ea74d235c7e7816b996a17c61288f02ef767985.

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-09-14 17:34 ` rsandifo at gcc dot gnu.org
@ 2023-09-14 18:41 ` rsandifo at gcc dot gnu.org
  2023-09-14 18:41 ` rsandifo at gcc dot gnu.org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2023-09-14 18:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
It's proving difficult to generate a reliable reproducer from
pure C code, due to the ways in which we handle out-of-range
offsets.  But FWIW, here's one that uses the RTL frontend,
compiled with -O -fdisable-rtl-postreload -fpeephole2:

extern int data[];

void __RTL (startwith ("ira")) foo (void *ptr)
{
  (function "foo"
    (param "ptr"
      (DECL_RTL (reg/v:DI <0> [ ptr ]))
      (DECL_RTL_INCOMING (reg/v:DI x0 [ ptr ]))
    ) ;; param "ptr"
    (insn-chain
      (block 2
        (edge-from entry (flags "FALLTHRU"))
        (cnote 3 [bb 2] NOTE_INSN_BASIC_BLOCK)
        (insn 4 (set (reg:DI <0>) (reg:DI x0)))
        (insn 5 (set (reg:DI <1>)
                     (plus:DI (reg:DI <0>) (const_int 768))))
        (insn 6 (set (mem:SI (plus:DI (reg:DI <0>)
                                      (const_int 508)) [1 &data+508 S4 A4])
                     (const_int 0)))
        (insn 7 (set (mem:SI (plus:DI (reg:DI <1>)
                                      (const_int -256)) [1 &data+512 S4 A4])
                     (const_int 0)))
        (edge-to exit (flags "FALLTHRU"))
      ) ;; block 2
    ) ;; insn-chain
  ) ;; function
}

(This one doesn't rely on -fstack-protector-strong, or on the recent
patches.)

The problem is that the LDP/STP formation code is too loose in the
check for valid addresses: it thinks it's enough for the second address
to be valid, even though that's not the one used in the STP.

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2023-09-14 18:41 ` rsandifo at gcc dot gnu.org
@ 2023-09-14 18:41 ` rsandifo at gcc dot gnu.org
  2023-09-15  8:19 ` cvs-commit at gcc dot gnu.org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2023-09-14 18:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #8 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
Working on a fix.

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2023-09-14 18:41 ` rsandifo at gcc dot gnu.org
@ 2023-09-15  8:19 ` cvs-commit at gcc dot gnu.org
  2023-09-15  8:22 ` rsandifo at gcc dot gnu.org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-15  8:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 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:2d38f45bcca62ca0c7afef4b579f82c5c2a01610

commit r14-4010-g2d38f45bcca62ca0c7afef4b579f82c5c2a01610
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Fri Sep 15 09:19:14 2023 +0100

    aarch64: Fix loose ldpstp check [PR111411]

    aarch64_operands_ok_for_ldpstp contained the code:

      /* One of the memory accesses must be a mempair operand.
         If it is not the first one, they need to be swapped by the
         peephole.  */
      if (!aarch64_mem_pair_operand (mem_1, GET_MODE (mem_1))
           && !aarch64_mem_pair_operand (mem_2, GET_MODE (mem_2)))
        return false;

    But the requirement isn't just that one of the accesses must be a
    valid mempair operand.  It's that the lower access must be, since
    that's the access that will be used for the instruction operand.

    gcc/
            PR target/111411
            * config/aarch64/aarch64.cc (aarch64_operands_ok_for_ldpstp):
Require
            the lower memory access to a mem-pair operand.

    gcc/testsuite/
            PR target/111411
            * gcc.dg/rtl/aarch64/pr111411.c: New test.

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2023-09-15  8:19 ` cvs-commit at gcc dot gnu.org
@ 2023-09-15  8:22 ` rsandifo at gcc dot gnu.org
  2023-09-15  9:28 ` Martin.Jansa at gmail dot com
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2023-09-15  8:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
Fixed on trunk.  The patch applies cleanly to GCC 12 and 13,
so I'll backport there next week.

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2023-09-15  8:22 ` rsandifo at gcc dot gnu.org
@ 2023-09-15  9:28 ` Martin.Jansa at gmail dot com
  2023-09-15  9:28 ` Martin.Jansa at gmail dot com
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Martin.Jansa at gmail dot com @ 2023-09-15  9:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Martin Jansa <Martin.Jansa at gmail dot com> ---
I can confirm https://gcc.gnu.org/g:2d38f45bcca62ca0c7afef4b579f82c5c2a01610
fixes the other reproducer from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111418 as well.

Thank you for quick fix.

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2023-09-15  9:28 ` Martin.Jansa at gmail dot com
@ 2023-09-15  9:28 ` Martin.Jansa at gmail dot com
  2023-09-20 10:08 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: Martin.Jansa at gmail dot com @ 2023-09-15  9:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Martin Jansa <Martin.Jansa at gmail dot com> ---
I can confirm https://gcc.gnu.org/g:2d38f45bcca62ca0c7afef4b579f82c5c2a01610
fixes the other reproducer from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111418 as well.

Thank you for quick fix.

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2023-09-15  9:28 ` Martin.Jansa at gmail dot com
@ 2023-09-20 10:08 ` cvs-commit at gcc dot gnu.org
  2023-09-20 10:13 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-20 10:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:4bb1ae3c13ce4fb72129229de66f5ffbcd45fe4c

commit r13-7827-g4bb1ae3c13ce4fb72129229de66f5ffbcd45fe4c
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Wed Sep 20 11:07:50 2023 +0100

    aarch64: Fix loose ldpstp check [PR111411]

    aarch64_operands_ok_for_ldpstp contained the code:

      /* One of the memory accesses must be a mempair operand.
         If it is not the first one, they need to be swapped by the
         peephole.  */
      if (!aarch64_mem_pair_operand (mem_1, GET_MODE (mem_1))
           && !aarch64_mem_pair_operand (mem_2, GET_MODE (mem_2)))
        return false;

    But the requirement isn't just that one of the accesses must be a
    valid mempair operand.  It's that the lower access must be, since
    that's the access that will be used for the instruction operand.

    gcc/
            PR target/111411
            * config/aarch64/aarch64.cc (aarch64_operands_ok_for_ldpstp):
Require
            the lower memory access to a mem-pair operand.

    gcc/testsuite/
            PR target/111411
            * gcc.dg/rtl/aarch64/pr111411.c: New test.

    (cherry picked from commit 2d38f45bcca62ca0c7afef4b579f82c5c2a01610)

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2023-09-20 10:08 ` cvs-commit at gcc dot gnu.org
@ 2023-09-20 10:13 ` cvs-commit at gcc dot gnu.org
  2023-09-20 10:53 ` rsandifo at gcc dot gnu.org
  2023-10-05 17:22 ` pinskia at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-20 10:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 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:74f99f1adc696f446115f36974a3f94f66294a53

commit r12-9886-g74f99f1adc696f446115f36974a3f94f66294a53
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Wed Sep 20 11:13:20 2023 +0100

    aarch64: Fix loose ldpstp check [PR111411]

    aarch64_operands_ok_for_ldpstp contained the code:

      /* One of the memory accesses must be a mempair operand.
         If it is not the first one, they need to be swapped by the
         peephole.  */
      if (!aarch64_mem_pair_operand (mem_1, GET_MODE (mem_1))
           && !aarch64_mem_pair_operand (mem_2, GET_MODE (mem_2)))
        return false;

    But the requirement isn't just that one of the accesses must be a
    valid mempair operand.  It's that the lower access must be, since
    that's the access that will be used for the instruction operand.

    gcc/
            PR target/111411
            * config/aarch64/aarch64.cc (aarch64_operands_ok_for_ldpstp):
Require
            the lower memory access to a mem-pair operand.

    gcc/testsuite/
            PR target/111411
            * gcc.dg/rtl/aarch64/pr111411.c: New test.

    (cherry picked from commit 2d38f45bcca62ca0c7afef4b579f82c5c2a01610)

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2023-09-20 10:13 ` cvs-commit at gcc dot gnu.org
@ 2023-09-20 10:53 ` rsandifo at gcc dot gnu.org
  2023-10-05 17:22 ` pinskia at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2023-09-20 10:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #15 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
Fixed for GCC 12+.

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

* [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong
  2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2023-09-20 10:53 ` rsandifo at gcc dot gnu.org
@ 2023-10-05 17:22 ` pinskia at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-05 17:22 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Simon.Richter at hogyros dot de

--- Comment #16 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 111704 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2023-10-05 17:22 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-14  3:07 [Bug target/111411] New: [14 regression] ICE when building opus-1.4 (celt_decoder.c:1182:1: internal compiler error: in extract_insn, at recog.cc:2791) sjames at gcc dot gnu.org
2023-09-14  3:30 ` [Bug target/111411] " pinskia at gcc dot gnu.org
2023-09-14  3:31 ` [Bug target/111411] [14 regression] ICE when building opus-1.4, unrecognizable insn with -fstack-protector-strong pinskia at gcc dot gnu.org
2023-09-14  5:15 ` sjames at gcc dot gnu.org
2023-09-14 14:45 ` pinskia at gcc dot gnu.org
2023-09-14 15:07 ` rsandifo at gcc dot gnu.org
2023-09-14 16:33 ` sjames at gcc dot gnu.org
2023-09-14 17:34 ` rsandifo at gcc dot gnu.org
2023-09-14 18:41 ` rsandifo at gcc dot gnu.org
2023-09-14 18:41 ` rsandifo at gcc dot gnu.org
2023-09-15  8:19 ` cvs-commit at gcc dot gnu.org
2023-09-15  8:22 ` rsandifo at gcc dot gnu.org
2023-09-15  9:28 ` Martin.Jansa at gmail dot com
2023-09-15  9:28 ` Martin.Jansa at gmail dot com
2023-09-20 10:08 ` cvs-commit at gcc dot gnu.org
2023-09-20 10:13 ` cvs-commit at gcc dot gnu.org
2023-09-20 10:53 ` rsandifo at gcc dot gnu.org
2023-10-05 17:22 ` pinskia 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).