public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113995] New: ICE: in change_address_1, at emit-rtl.cc:2299 with [[arm::streaming_compatible]] and -march=armv9-a+sve -finstrument-functions -fstack-clash-protection
@ 2024-02-19 15:23 zsojka at seznam dot cz
  2024-02-19 21:45 ` [Bug target/113995] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2024-02-19 15:23 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113995
           Summary: ICE: in change_address_1, at emit-rtl.cc:2299 with
                    [[arm::streaming_compatible]] and -march=armv9-a+sve
                    -finstrument-functions -fstack-clash-protection
           Product: gcc
           Version: 14.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: aarch64-unknown-linux-gnu

Created attachment 57461
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57461&action=edit
reduced testcase (from gcc.target/aarch64/sve/acle/general-c/func_redef_5.c)

Compiler output:
$ aarch64-unknown-linux-gnu-gcc -march=armv9-a+sve -finstrument-functions
-fstack-clash-protection testcase.c 
during RTL pass: pro_and_epilogue
testcase.c: In function 'svadd_u8_x':
testcase.c:1:68: internal compiler error: in change_address_1, at
emit-rtl.cc:2299
    1 | __SVUint8_t svadd_u8_x(__SVUint8_t) [[arm::streaming_compatible]] {}
      |                                                                    ^
0x7af34f change_address_1
        /repo/gcc-trunk/gcc/emit-rtl.cc:2299
0xeee695 emit_move_insn(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/expr.cc:4712
0x17207ee aarch64_save_callee_saves
        /repo/gcc-trunk/gcc/config/aarch64/aarch64.cc:8573
0x172322d aarch64_expand_prologue()
        /repo/gcc-trunk/gcc/config/aarch64/aarch64.cc:9626
0x1d615da gen_prologue()
        /repo/gcc-trunk/gcc/config/aarch64/aarch64.md:1003
0x170c175 target_gen_prologue
        /repo/gcc-trunk/gcc/config/aarch64/aarch64.md:8109
0xf6b3e7 make_prologue_seq
        /repo/gcc-trunk/gcc/function.cc:5816
0xf6b583 thread_prologue_and_epilogue_insns()
        /repo/gcc-trunk/gcc/function.cc:6051
0xf6bf22 rest_of_handle_thread_prologue_and_epilogue
        /repo/gcc-trunk/gcc/function.cc:6565
0xf6bf22 execute
        /repo/gcc-trunk/gcc/function.cc:6651
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.

$ aarch64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-aarch64/bin/aarch64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-9062-20240219114159-geb17bdc211a-checking-yes-rtl-df-extra-aarch64/bin/../libexec/gcc/aarch64-unknown-linux-gnu/14.0.1/lto-wrapper
Target: aarch64-unknown-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
--with-sysroot=/usr/aarch64-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=aarch64-unknown-linux-gnu
--with-ld=/usr/bin/aarch64-unknown-linux-gnu-ld
--with-as=/usr/bin/aarch64-unknown-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-9062-20240219114159-geb17bdc211a-checking-yes-rtl-df-extra-aarch64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240219 (experimental) (GCC)

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

* [Bug target/113995] ICE: in change_address_1, at emit-rtl.cc:2299 with [[arm::streaming_compatible]] and -march=armv9-a+sve -finstrument-functions -fstack-clash-protection
  2024-02-19 15:23 [Bug target/113995] New: ICE: in change_address_1, at emit-rtl.cc:2299 with [[arm::streaming_compatible]] and -march=armv9-a+sve -finstrument-functions -fstack-clash-protection zsojka at seznam dot cz
@ 2024-02-19 21:45 ` pinskia at gcc dot gnu.org
  2024-02-20 10:45 ` rsandifo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-19 21:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-02-19

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
You don't need -finstrument-functions really, just a function call like:
```
void f();
void svadd_u8_x(__SVUint8_t) [[arm::streaming_compatible]]
{
  f();
}
```

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

* [Bug target/113995] ICE: in change_address_1, at emit-rtl.cc:2299 with [[arm::streaming_compatible]] and -march=armv9-a+sve -finstrument-functions -fstack-clash-protection
  2024-02-19 15:23 [Bug target/113995] New: ICE: in change_address_1, at emit-rtl.cc:2299 with [[arm::streaming_compatible]] and -march=armv9-a+sve -finstrument-functions -fstack-clash-protection zsojka at seznam dot cz
  2024-02-19 21:45 ` [Bug target/113995] " pinskia at gcc dot gnu.org
@ 2024-02-20 10:45 ` rsandifo at gcc dot gnu.org
  2024-02-21 11:12 ` cvs-commit at gcc dot gnu.org
  2024-02-21 11:17 ` rsandifo at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2024-02-20 10:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rsandifo at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |rsandifo at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #2 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
Possibly a dup of some of the other PRs in this area.

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

* [Bug target/113995] ICE: in change_address_1, at emit-rtl.cc:2299 with [[arm::streaming_compatible]] and -march=armv9-a+sve -finstrument-functions -fstack-clash-protection
  2024-02-19 15:23 [Bug target/113995] New: ICE: in change_address_1, at emit-rtl.cc:2299 with [[arm::streaming_compatible]] and -march=armv9-a+sve -finstrument-functions -fstack-clash-protection zsojka at seznam dot cz
  2024-02-19 21:45 ` [Bug target/113995] " pinskia at gcc dot gnu.org
  2024-02-20 10:45 ` rsandifo at gcc dot gnu.org
@ 2024-02-21 11:12 ` cvs-commit at gcc dot gnu.org
  2024-02-21 11:17 ` rsandifo at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-21 11:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from GCC 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:ad4df8cd080c9be738f61b5e91cc70a594c4419d

commit r14-9098-gad4df8cd080c9be738f61b5e91cc70a594c4419d
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Wed Feb 21 11:12:27 2024 +0000

    aarch64: Stack-clash prologues and VG saves [PR113995]

    This patch fixes an ICE for a combination of:

    - -fstack-clash-protection
    - a frame that has SVE save slots
    - a frame that has no GPR save slots
    - a frame that has a VG save slot

    The allocation code was folding the SVE save slot allocation into
    the initial frame allocation, so that we had one allocation of
    size <size of SVE registers> + 16.  But the VG save code itself
    expected the allocations to remain separate, since it wants to
    store at a constant offset from SP or FP.

    The VG save isn't shrink-wrapped and so acts as a probe of the
    initial allocations.  It should therefore be safe to keep separate
    allocations in this case.

    The scans in locally_streaming_1.c expect no stack clash protection,
    so the patch forces that and adds a separate compile-only test for
    when protection is enabled.

    gcc/
            PR target/113995
            * config/aarch64/aarch64.cc (aarch64_expand_prologue): Don't
            fold the SVE allocation into the initial allocation if the
            initial allocation includes a VG save.

    gcc/testsuite/
            PR target/113995
            * gcc.target/aarch64/sme/locally_streaming_1.c: Require
            -fno-stack-clash-protection.
            * gcc.target/aarch64/sme/locally_streaming_1_scp.c: New test.

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

* [Bug target/113995] ICE: in change_address_1, at emit-rtl.cc:2299 with [[arm::streaming_compatible]] and -march=armv9-a+sve -finstrument-functions -fstack-clash-protection
  2024-02-19 15:23 [Bug target/113995] New: ICE: in change_address_1, at emit-rtl.cc:2299 with [[arm::streaming_compatible]] and -march=armv9-a+sve -finstrument-functions -fstack-clash-protection zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2024-02-21 11:12 ` cvs-commit at gcc dot gnu.org
@ 2024-02-21 11:17 ` rsandifo at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2024-02-21 11:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2024-02-21 11:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-19 15:23 [Bug target/113995] New: ICE: in change_address_1, at emit-rtl.cc:2299 with [[arm::streaming_compatible]] and -march=armv9-a+sve -finstrument-functions -fstack-clash-protection zsojka at seznam dot cz
2024-02-19 21:45 ` [Bug target/113995] " pinskia at gcc dot gnu.org
2024-02-20 10:45 ` rsandifo at gcc dot gnu.org
2024-02-21 11:12 ` cvs-commit at gcc dot gnu.org
2024-02-21 11:17 ` 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).