public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4
@ 2023-03-15 9:43 sam at gentoo dot org
2023-03-15 9:43 ` [Bug target/109140] " sam at gentoo dot org
` (17 more replies)
0 siblings, 18 replies; 19+ messages in thread
From: sam at gentoo dot org @ 2023-03-15 9:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
Bug ID: 109140
Summary: ICE when building qemu (qemu-user, MIPS component) on
sparc64-unknown-linux-gnu with -march=niagara4
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: sam at gentoo dot org
Target Milestone: ---
Host: sparc64-unknown-linux-gnu
Target: sparc64-unknown-linux-gnu
Build: sparc64-unknown-linux-gnu
Hit when building QEMU 7.2.0's qemu-user component for mips on sparc64. This
one is reproducible with cross.
It needs -O2 -mcpu=niagara4 at least and -O2 -march=ultrasparc is fine.
```
$ sparc64-unknown-linux-gnu-gcc target_mips_tcg_lmmi_helper.c.i -O2
-mcpu=niagara4 -c
../target/mips/tcg/lmmi_helper.c: In function ‘helper_pcmpgtb’:
../target/mips/tcg/lmmi_helper.c:554:1: error: unrecognizable insn:
(insn 9 8 10 2 (set (reg:DI 118)
(unspec:DI [
(ltu:V8QI (subreg:V8QI (reg/v:DI 115 [ ft ]) 0)
(subreg:V8QI (reg/v:DI 114 [ fs ]) 0))
] UNSPEC_FUCMP)) "../target/mips/tcg/lmmi_helper.c":551:18 -1
(nil))
during RTL pass: vregs
../target/mips/tcg/lmmi_helper.c:554:1: internal compiler error: in
extract_insn, at recog.cc:2791
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://bugs.gentoo.org/> for instructions.
$ sparc64-unknown-linux-gnu-gcc --version
sparc64-unknown-linux-gnu-gcc (Gentoo Hardened 12.2.1_p20230304 p13) 12.2.1
20230304
Copyright (C) 2022 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
```
Attached the preprocessed source, not yet reduced or bisected, but I'll be
doing both later.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
@ 2023-03-15 9:43 ` sam at gentoo dot org
2023-03-15 9:45 ` sam at gentoo dot org
` (16 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: sam at gentoo dot org @ 2023-03-15 9:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
--- Comment #1 from Sam James <sam at gentoo dot org> ---
Created attachment 54669
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54669&action=edit
target_mips_tcg_lmmi_helper.c.i.xz
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
2023-03-15 9:43 ` [Bug target/109140] " sam at gentoo dot org
@ 2023-03-15 9:45 ` sam at gentoo dot org
2023-03-15 9:47 ` sam at gentoo dot org
` (15 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: sam at gentoo dot org @ 2023-03-15 9:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
--- Comment #2 from Sam James <sam at gentoo dot org> ---
Created attachment 54670
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54670&action=edit
reduced.i
Attached reduced version.
```
# sparc64-unknown-linux-gnu-gcc reduced.i -O2 -mcpu=niagara4 -c
reduced.i:3:1: warning: no semicolon at end of struct or union
3 | } LMIValue;
| ^
reduced.i:6:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
6 | helper_pcmpgtb() {
| ^~~~~~~~~~~~~~
reduced.i: In function ‘helper_pcmpgtb’:
reduced.i:10:1: error: unrecognizable insn:
10 | }
| ^
(insn 24 23 25 2 (set (reg:DI 130)
(unspec:DI [
(gtu:V8QI (reg:V8QI 125)
(reg:V8QI 119))
] UNSPEC_FUCMP)) "reduced.i":9:55 -1
(nil))
during RTL pass: vregs
reduced.i:10:1: internal compiler error: in extract_insn, at recog.cc:2791
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://bugs.gentoo.org/> for instructions.
```
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
2023-03-15 9:43 ` [Bug target/109140] " sam at gentoo dot org
2023-03-15 9:45 ` sam at gentoo dot org
@ 2023-03-15 9:47 ` sam at gentoo dot org
2023-03-15 10:16 ` [Bug target/109140] ICE (during RTL pass: internal compiler error: in extract_insn, at recog.cc:2791) when building qemu " sam at gentoo dot org
` (14 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: sam at gentoo dot org @ 2023-03-15 9:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
--- Comment #3 from Sam James <sam at gentoo dot org> ---
I'll bisect later but someone is free to beat me if they want. I think 11 was
fine, but need to check.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] ICE (during RTL pass: internal compiler error: in extract_insn, at recog.cc:2791) when building qemu on sparc64-unknown-linux-gnu with -march=niagara4
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
` (2 preceding siblings ...)
2023-03-15 9:47 ` sam at gentoo dot org
@ 2023-03-15 10:16 ` sam at gentoo dot org
2023-03-15 15:49 ` mikpelinux at gmail dot com
` (13 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: sam at gentoo dot org @ 2023-03-15 10:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
Sam James <sam at gentoo dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |11.3.1
Known to fail| |12.2.1
--- Comment #4 from Sam James <sam at gentoo dot org> ---
so far:
11.3.1 20230303 is OK.
12.2.1 20230304 isn't.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] ICE (during RTL pass: internal compiler error: in extract_insn, at recog.cc:2791) when building qemu on sparc64-unknown-linux-gnu with -march=niagara4
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
` (3 preceding siblings ...)
2023-03-15 10:16 ` [Bug target/109140] ICE (during RTL pass: internal compiler error: in extract_insn, at recog.cc:2791) when building qemu " sam at gentoo dot org
@ 2023-03-15 15:49 ` mikpelinux at gmail dot com
2023-03-15 15:58 ` mikpelinux at gmail dot com
` (12 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mikpelinux at gmail dot com @ 2023-03-15 15:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
Mikael Pettersson <mikpelinux at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpelinux at gmail dot com
--- Comment #5 from Mikael Pettersson <mikpelinux at gmail dot com> ---
I can reproduce with a cross to sparc64-linux-gnu hosted on x86_64-linux-gnu.
git bisect between 11.3.0 (good) and 12.2.0 (bad) identified:
2b8453c401b699ed93c085d0413ab4b5030bcdb8 is the first bad commit
commit 2b8453c401b699ed93c085d0413ab4b5030bcdb8
Author: liuhongt <hongtao.liu@intel.com>
Date: Mon Sep 6 13:48:49 2021 +0800
Enable auto-vectorization at O2 with very-cheap cost model.
which tells me the issue is pre-existing.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] ICE (during RTL pass: internal compiler error: in extract_insn, at recog.cc:2791) when building qemu on sparc64-unknown-linux-gnu with -march=niagara4
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
` (4 preceding siblings ...)
2023-03-15 15:49 ` mikpelinux at gmail dot com
@ 2023-03-15 15:58 ` mikpelinux at gmail dot com
2023-03-15 17:32 ` mikpelinux at gmail dot com
` (11 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mikpelinux at gmail dot com @ 2023-03-15 15:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
--- Comment #6 from Mikael Pettersson <mikpelinux at gmail dot com> ---
With -O2 -ftree-vectorize -mcpu=niagara4 the ICE reproduces with gcc-10.4.0 but
not with gcc-9.5.0.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] ICE (during RTL pass: internal compiler error: in extract_insn, at recog.cc:2791) when building qemu on sparc64-unknown-linux-gnu with -march=niagara4
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
` (5 preceding siblings ...)
2023-03-15 15:58 ` mikpelinux at gmail dot com
@ 2023-03-15 17:32 ` mikpelinux at gmail dot com
2023-03-15 17:58 ` pinskia at gcc dot gnu.org
` (10 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mikpelinux at gmail dot com @ 2023-03-15 17:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
--- Comment #7 from Mikael Pettersson <mikpelinux at gmail dot com> ---
With -O2 -ftree-vectorize -mcpu=niagara4 a bisect between 9.5.0 (good) and
10.4.0 (bad) found
6271dd984d7f920d4fb17ad37af6a1f8e6b796dc is the first bad commit
commit 6271dd984d7f920d4fb17ad37af6a1f8e6b796dc
Author: Wilco Dijkstra <wdijkstr@arm.com>
Date: Wed Nov 20 16:29:23 2019 +0000
PR85678: Change default to -fno-common
And sure enough, with -O2 -ftree-vectorize -fno-common -mcpu=niagara4 gcc-9.5.0
also ICEs.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] ICE (during RTL pass: internal compiler error: in extract_insn, at recog.cc:2791) when building qemu on sparc64-unknown-linux-gnu with -march=niagara4
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
` (6 preceding siblings ...)
2023-03-15 17:32 ` mikpelinux at gmail dot com
@ 2023-03-15 17:58 ` pinskia at gcc dot gnu.org
2023-03-15 19:03 ` mikpelinux at gmail dot com
` (9 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-03-15 17:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Mikael Pettersson from comment #7)
> With -O2 -ftree-vectorize -mcpu=niagara4 a bisect between 9.5.0 (good) and
> 10.4.0 (bad) found
>
> 6271dd984d7f920d4fb17ad37af6a1f8e6b796dc is the first bad commit
> commit 6271dd984d7f920d4fb17ad37af6a1f8e6b796dc
> Author: Wilco Dijkstra <wdijkstr@arm.com>
> Date: Wed Nov 20 16:29:23 2019 +0000
>
> PR85678: Change default to -fno-common
>
> And sure enough, with -O2 -ftree-vectorize -fno-common -mcpu=niagara4
> gcc-9.5.0 also ICEs.
Right still latent from before that commit ...
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] ICE (during RTL pass: internal compiler error: in extract_insn, at recog.cc:2791) when building qemu on sparc64-unknown-linux-gnu with -march=niagara4
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
` (7 preceding siblings ...)
2023-03-15 17:58 ` pinskia at gcc dot gnu.org
@ 2023-03-15 19:03 ` mikpelinux at gmail dot com
2023-03-16 17:15 ` mikpelinux at gmail dot com
` (8 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mikpelinux at gmail dot com @ 2023-03-15 19:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
--- Comment #9 from Mikael Pettersson <mikpelinux at gmail dot com> ---
I can reproduce all the way down to gcc-4.7.4, gcc-4.6.4 doesn't support
-mcpu=niagara4.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] ICE (during RTL pass: internal compiler error: in extract_insn, at recog.cc:2791) when building qemu on sparc64-unknown-linux-gnu with -march=niagara4
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
` (8 preceding siblings ...)
2023-03-15 19:03 ` mikpelinux at gmail dot com
@ 2023-03-16 17:15 ` mikpelinux at gmail dot com
2023-03-16 18:27 ` sam at gentoo dot org
` (7 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: mikpelinux at gmail dot com @ 2023-03-16 17:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
--- Comment #10 from Mikael Pettersson <mikpelinux at gmail dot com> ---
A bisect between 4.6.4 (good) and 4.7.4 (bad) found:
1f9ed162eb30f1b40b65d164b3a40ac78e1f006e is the first bad commit
commit 1f9ed162eb30f1b40b65d164b3a40ac78e1f006e
Author: David S. Miller <davem@davemloft.net>
Date: Tue Nov 1 08:42:57 2011 +0000
Add vcond/vcondu patterns to sparc backend.
If I disable the "vconduv8qiv8qi" expander this test case doesn't cause an ICE.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] ICE (during RTL pass: internal compiler error: in extract_insn, at recog.cc:2791) when building qemu on sparc64-unknown-linux-gnu with -march=niagara4
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
` (9 preceding siblings ...)
2023-03-16 17:15 ` mikpelinux at gmail dot com
@ 2023-03-16 18:27 ` sam at gentoo dot org
2023-03-27 9:48 ` [Bug target/109140] internal error on array element comparison in loop with -O2 -mvis3 ebotcazou at gcc dot gnu.org
` (6 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: sam at gentoo dot org @ 2023-03-16 18:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
Sam James <sam at gentoo dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |davem at davemloft dot net
--- Comment #11 from Sam James <sam at gentoo dot org> ---
Thank you for the extremely thorough bisect!
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] internal error on array element comparison in loop with -O2 -mvis3
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
` (10 preceding siblings ...)
2023-03-16 18:27 ` sam at gentoo dot org
@ 2023-03-27 9:48 ` ebotcazou at gcc dot gnu.org
2023-03-27 9:49 ` ebotcazou at gcc dot gnu.org
` (5 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-03-27 9:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Target Milestone|--- |13.0
CC| |ebotcazou at gcc dot gnu.org
Last reconfirmed| |2023-03-27
Ever confirmed|0 |1
Summary|ICE (during RTL pass: |internal error on array
|internal compiler error: in |element comparison in loop
|extract_insn, at |with -O2 -mvis3
|recog.cc:2791) when |
|building qemu on |
|sparc64-unknown-linux-gnu |
|with -march=niagara4 since |
|r0-112855-g1f9ed162eb30f1 |
--- Comment #12 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
I can reproduce.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] internal error on array element comparison in loop with -O2 -mvis3
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
` (11 preceding siblings ...)
2023-03-27 9:48 ` [Bug target/109140] internal error on array element comparison in loop with -O2 -mvis3 ebotcazou at gcc dot gnu.org
@ 2023-03-27 9:49 ` ebotcazou at gcc dot gnu.org
2023-03-28 8:01 ` [Bug target/109140] [12/13 regression] " ebotcazou at gcc dot gnu.org
` (4 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-03-27 9:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |ebotcazou at gcc dot gnu.org
--- Comment #13 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Investigating.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] [12/13 regression] internal error on array element comparison in loop with -O2 -mvis3
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
` (12 preceding siblings ...)
2023-03-27 9:49 ` ebotcazou at gcc dot gnu.org
@ 2023-03-28 8:01 ` ebotcazou at gcc dot gnu.org
2023-03-28 8:42 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-03-28 8:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|13.0 |12.3
Summary|internal error on array |[12/13 regression] internal
|element comparison in loop |error on array element
|with -O2 -mvis3 |comparison in loop with -O2
| |-mvis3
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] [12/13 regression] internal error on array element comparison in loop with -O2 -mvis3
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
` (13 preceding siblings ...)
2023-03-28 8:01 ` [Bug target/109140] [12/13 regression] " ebotcazou at gcc dot gnu.org
@ 2023-03-28 8:42 ` cvs-commit at gcc dot gnu.org
2023-03-28 8:46 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-28 8:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Eric Botcazou <ebotcazou@gcc.gnu.org>:
https://gcc.gnu.org/g:a21bd7faba67997a6da457dbda16f15bca1a9156
commit r13-6893-ga21bd7faba67997a6da457dbda16f15bca1a9156
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue Mar 28 10:13:24 2023 +0200
Fix PR target/109140
This is a regression present on the mainline and 12 branch at -O2, but the
issue is related to vectorization so was present at -O3 in earlier
versions.
The vcondu expander that was added for VIS 3 more than a decade ago does
not
fully work, because it does not filter out the unsigned condition codes
(the
instruction is an UNSPEC that accepts only signed condition codes).
While I was at it, I also added the missing vcond and vcondu expanders for
the new comparison instructions that were added in VIS 4.
gcc/
PR target/109140
* config/sparc/sparc.cc (sparc_expand_vcond): Call signed_condition
on operand #3 to get the final condition code. Use std::swap.
* config/sparc/sparc.md (vcondv8qiv8qi): New VIS 4 expander.
(fucmp<gcond:code>8<P:mode>_vis): Move around.
(fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis): Likewise.
(vcondu<GCM:mode><GCM:mode>): New VIS 4 expander.
gcc/testsuite/
* gcc.target/sparc/20230328-1.c: New test.
* gcc.target/sparc/20230328-2.c: Likewise.
* gcc.target/sparc/20230328-3.c: Likewise.
* gcc.target/sparc/20230328-4.c: Likewise.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] [12/13 regression] internal error on array element comparison in loop with -O2 -mvis3
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
` (14 preceding siblings ...)
2023-03-28 8:42 ` cvs-commit at gcc dot gnu.org
@ 2023-03-28 8:46 ` cvs-commit at gcc dot gnu.org
2023-03-28 8:48 ` cvs-commit at gcc dot gnu.org
2023-03-28 8:50 ` ebotcazou at gcc dot gnu.org
17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-28 8:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Eric Botcazou
<ebotcazou@gcc.gnu.org>:
https://gcc.gnu.org/g:6f2bb57f909014618aaf770bfaaf49e28e410311
commit r12-9324-g6f2bb57f909014618aaf770bfaaf49e28e410311
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue Mar 28 10:13:24 2023 +0200
Fix PR target/109140
This is a regression present on the mainline and 12 branch at -O2, but the
issue is related to vectorization so was present at -O3 in earlier
versions.
The vcondu expander that was added for VIS 3 more than a decade ago does
not
fully work, because it does not filter out the unsigned condition codes
(the
instruction is an UNSPEC that accepts only signed condition codes).
While I was at it, I also added the missing vcond and vcondu expanders for
the new comparison instructions that were added in VIS 4.
gcc/
PR target/109140
* config/sparc/sparc.cc (sparc_expand_vcond): Call signed_condition
on operand #3 to get the final condition code. Use std::swap.
* config/sparc/sparc.md (vcondv8qiv8qi): New VIS 4 expander.
(fucmp<gcond:code>8<P:mode>_vis): Move around.
(fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis): Likewise.
(vcondu<GCM:mode><GCM:mode>): New VIS 4 expander.
gcc/testsuite/
* gcc.target/sparc/20230328-1.c: New test.
* gcc.target/sparc/20230328-2.c: Likewise.
* gcc.target/sparc/20230328-3.c: Likewise.
* gcc.target/sparc/20230328-4.c: Likewise.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] [12/13 regression] internal error on array element comparison in loop with -O2 -mvis3
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
` (15 preceding siblings ...)
2023-03-28 8:46 ` cvs-commit at gcc dot gnu.org
@ 2023-03-28 8:48 ` cvs-commit at gcc dot gnu.org
2023-03-28 8:50 ` ebotcazou at gcc dot gnu.org
17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-28 8:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
--- Comment #16 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Eric Botcazou
<ebotcazou@gcc.gnu.org>:
https://gcc.gnu.org/g:002470a073ca0742820991ee221986a722848ff2
commit r11-10601-g002470a073ca0742820991ee221986a722848ff2
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue Mar 28 10:13:24 2023 +0200
Fix PR target/109140
This is a regression present on the mainline and 12 branch at -O2, but the
issue is related to vectorization so was present at -O3 in earlier
versions.
The vcondu expander that was added for VIS 3 more than a decade ago does
not
fully work, because it does not filter out the unsigned condition codes
(the
instruction is an UNSPEC that accepts only signed condition codes).
While I was at it, I also added the missing vcond and vcondu expanders for
the new comparison instructions that were added in VIS 4.
gcc/
PR target/109140
* config/sparc/sparc.c (sparc_expand_vcond): Call signed_condition
on operand #3 to get the final condition code. Use std::swap.
* config/sparc/sparc.md (vcondv8qiv8qi): New VIS 4 expander.
(fucmp<gcond:code>8<P:mode>_vis): Move around.
(fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis): Likewise.
(vcondu<GCM:mode><GCM:mode>): New VIS 4 expander.
gcc/testsuite/
* gcc.target/sparc/20230328-1.c: New test.
* gcc.target/sparc/20230328-2.c: Likewise.
* gcc.target/sparc/20230328-3.c: Likewise.
* gcc.target/sparc/20230328-4.c: Likewise.
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Bug target/109140] [12/13 regression] internal error on array element comparison in loop with -O2 -mvis3
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
` (16 preceding siblings ...)
2023-03-28 8:48 ` cvs-commit at gcc dot gnu.org
@ 2023-03-28 8:50 ` ebotcazou at gcc dot gnu.org
17 siblings, 0 replies; 19+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2023-03-28 8:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #17 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Thanks for reporting the problem.
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2023-03-28 8:50 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15 9:43 [Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4 sam at gentoo dot org
2023-03-15 9:43 ` [Bug target/109140] " sam at gentoo dot org
2023-03-15 9:45 ` sam at gentoo dot org
2023-03-15 9:47 ` sam at gentoo dot org
2023-03-15 10:16 ` [Bug target/109140] ICE (during RTL pass: internal compiler error: in extract_insn, at recog.cc:2791) when building qemu " sam at gentoo dot org
2023-03-15 15:49 ` mikpelinux at gmail dot com
2023-03-15 15:58 ` mikpelinux at gmail dot com
2023-03-15 17:32 ` mikpelinux at gmail dot com
2023-03-15 17:58 ` pinskia at gcc dot gnu.org
2023-03-15 19:03 ` mikpelinux at gmail dot com
2023-03-16 17:15 ` mikpelinux at gmail dot com
2023-03-16 18:27 ` sam at gentoo dot org
2023-03-27 9:48 ` [Bug target/109140] internal error on array element comparison in loop with -O2 -mvis3 ebotcazou at gcc dot gnu.org
2023-03-27 9:49 ` ebotcazou at gcc dot gnu.org
2023-03-28 8:01 ` [Bug target/109140] [12/13 regression] " ebotcazou at gcc dot gnu.org
2023-03-28 8:42 ` cvs-commit at gcc dot gnu.org
2023-03-28 8:46 ` cvs-commit at gcc dot gnu.org
2023-03-28 8:48 ` cvs-commit at gcc dot gnu.org
2023-03-28 8:50 ` ebotcazou 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).