[Bug target/118501] [14 regression] aarch64: ICE in simplify_context::simplify_subreg
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118501 Richard Sandiford changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED|RESOLVED --- Comment #18 from Richard Sandiford --- Fixed.
[Bug target/118501] [14 regression] aarch64: ICE in simplify_context::simplify_subreg
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118501 --- Comment #16 from GCC Commits --- The releases/gcc-14 branch has been updated by Richard Sandiford : https://gcc.gnu.org/g:14fe427ab5eec008e12e7aa275caf046c0588c68 commit r14-11634-g14fe427ab5eec008e12e7aa275caf046c0588c68 Author: Richard Sandiford Date: Wed Apr 16 13:20:27 2025 +0100 aarch64: Fix invalid subregs in xorsign [PR118501] In the testcase, we try to use xorsign on: (subreg:DF (reg:TI R) 8) i.e. the highpart of the TI. xorsign wants to take a V2DF paradoxical subreg of this, which is rightly rejected as a direct operation. In cases like this, we need to force the highpart into a fresh register first. gcc/ PR target/118501 * config/aarch64/aarch64.md (@xorsign3): Use force_lowpart_subreg. gcc/testsuite/ PR target/118501 * gcc.c-torture/compile/pr118501.c: New test. (cherry picked from commit 6612b8e55471fabd2071a9637a06d3ffce2b05a6)
[Bug target/118501] [14 regression] aarch64: ICE in simplify_context::simplify_subreg
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118501 --- Comment #17 from GCC Commits --- The releases/gcc-14 branch has been updated by Richard Sandiford : https://gcc.gnu.org/g:e192f1f2c7c3ccfdb1a146fa5d14ded5c6fe5384 commit r14-11635-ge192f1f2c7c3ccfdb1a146fa5d14ded5c6fe5384 Author: Xi Ruoyao Date: Wed Apr 16 13:20:28 2025 +0100 LoongArch: Fix invalid subregs in xorsign [PR118501] The test case added in r15-7073 now triggers an ICE, indicating we need the same fix as AArch64. gcc/ChangeLog: PR target/118501 * config/loongarch/loongarch.md (@xorsign3): Use force_lowpart_subreg. (cherry picked from commit 9ddf4a6cc650360e620c8fd97f550bf833cc177a)
[Bug target/118501] [14 regression] aarch64: ICE in simplify_context::simplify_subreg
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118501 --- Comment #17 from GCC Commits --- The releases/gcc-14 branch has been updated by Richard Sandiford : https://gcc.gnu.org/g:e192f1f2c7c3ccfdb1a146fa5d14ded5c6fe5384 commit r14-11635-ge192f1f2c7c3ccfdb1a146fa5d14ded5c6fe5384 Author: Xi Ruoyao Date: Wed Apr 16 13:20:28 2025 +0100 LoongArch: Fix invalid subregs in xorsign [PR118501] The test case added in r15-7073 now triggers an ICE, indicating we need the same fix as AArch64. gcc/ChangeLog: PR target/118501 * config/loongarch/loongarch.md (@xorsign3): Use force_lowpart_subreg. (cherry picked from commit 9ddf4a6cc650360e620c8fd97f550bf833cc177a)
[Bug target/118501] [14 regression] aarch64: ICE in simplify_context::simplify_subreg
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118501 Pavol Rusnak changed: What|Removed |Added CC||pavol at rusnak dot io --- Comment #15 from Pavol Rusnak --- ISTM that fix should be backported together with https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118892 and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119133
[Bug target/118501] [14 regression] aarch64: ICE in simplify_context::simplify_subreg
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118501 --- Comment #14 from Richard Earnshaw --- (In reply to Matthias Klose from comment #13) > the backport requires some more work: > > ../../src/gcc/config/aarch64/aarch64.md:7255:13: error: > 'force_lowpart_subreg' was not declared in this scope; did you mean > 'lowpart_subreg'? > 7255 | rtx op1 = force_lowpart_subreg (mode, operands[1], > mode); > | ^~~~ > | lowpart_subreg force_lowpart_subreg is a new function in gcc-15 (explow.cc). But it's a trivial piece of code that could easily be backported. It doesn't change any existing code to add it to gcc-14.
[Bug target/118501] [14 regression] aarch64: ICE in simplify_context::simplify_subreg
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118501 --- Comment #13 from Matthias Klose --- the backport requires some more work: ../../src/gcc/config/aarch64/aarch64.md:7255:13: error: 'force_lowpart_subreg' was not declared in this scope; did you mean 'lowpart_subreg'? 7255 | rtx op1 = force_lowpart_subreg (mode, operands[1], mode); | ^~~~ | lowpart_subreg
[Bug target/118501] [14 regression] aarch64: ICE in simplify_context::simplify_subreg
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118501 --- Comment #12 from Xi Ruoyao --- LoongArch fixed on trunk too.
[Bug target/118501] [14 regression] aarch64: ICE in simplify_context::simplify_subreg
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118501 --- Comment #11 from GCC Commits --- The master branch has been updated by Xi Ruoyao : https://gcc.gnu.org/g:9ddf4a6cc650360e620c8fd97f550bf833cc177a commit r15-7145-g9ddf4a6cc650360e620c8fd97f550bf833cc177a Author: Xi Ruoyao Date: Wed Jan 22 17:16:29 2025 +0800 LoongArch: Fix invalid subregs in xorsign [PR118501] The test case added in r15-7073 now triggers an ICE, indicating we need the same fix as AArch64. gcc/ChangeLog: PR target/118501 * config/loongarch/loongarch.md (@xorsign3): Use force_lowpart_subreg.
[Bug target/118501] [14 regression] aarch64: ICE in simplify_context::simplify_subreg
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118501 --- Comment #10 from Andrew Pinski --- (In reply to Xi Ruoyao from comment #9) > The test case has caught a bug on LoongArch: Looks like to be a similar issue. loongarch.md contains almost the same code path too: ``` machine_mode lsx_mode = mode == SFmode ? V4SFmode : V2DFmode; rtx tmp = gen_reg_rtx (lsx_mode); rtx op1 = lowpart_subreg (lsx_mode, operands[1], mode); rtx op2 = lowpart_subreg (lsx_mode, operands[2], mode); ```
[Bug target/118501] [14 regression] aarch64: ICE in simplify_context::simplify_subreg
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118501 Xi Ruoyao changed: What|Removed |Added CC||xry111 at gcc dot gnu.org --- Comment #9 from Xi Ruoyao --- The test case has caught a bug on LoongArch: FAIL: gcc.c-torture/compile/pr118501.c -O2 (internal compiler error: Segmentation fault) FAIL: gcc.c-torture/compile/pr118501.c -O2 (test for excess errors) FAIL: gcc.c-torture/compile/pr118501.c -O3 -g (internal compiler error: Segmentation fault) FAIL: gcc.c-torture/compile/pr118501.c -O3 -g (test for excess errors) FAIL: gcc.c-torture/compile/pr118501.c -Os (internal compiler error: Segmentation fault) FAIL: gcc.c-torture/compile/pr118501.c -Os (test for excess errors) FAIL: gcc.c-torture/compile/pr118501.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (internal compiler error: Segmentation fault) FAIL: gcc.c-torture/compile/pr118501.c -O2 -flto -fno-use-linker-plugin -flto-partition=none (test for excess errors)
[Bug target/118501] [14 regression] aarch64: ICE in simplify_context::simplify_subreg
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118501 Richard Sandiford changed: What|Removed |Added Summary|[14/15 regression] aarch64: |[14 regression] aarch64: |ICE in |ICE in |simplify_context::simplify_ |simplify_context::simplify_ |subreg |subreg Known to fail|15.0| Known to work||15.0 --- Comment #8 from Richard Sandiford --- Fixed on trunk, will backport after a grace period.
