public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/96968] New: aarch64 : ICE in vregs pass lowering __builtin_aarch64_get_fpcr
@ 2020-09-08 6:22 iains at gcc dot gnu.org
2020-09-08 6:26 ` [Bug target/96968] " iains at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 15+ messages in thread
From: iains at gcc dot gnu.org @ 2020-09-08 6:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96968
Bug ID: 96968
Summary: aarch64 : ICE in vregs pass lowering
__builtin_aarch64_get_fpcr
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: iains at gcc dot gnu.org
Target Milestone: ---
Testcase from FX:
int main (void) {
unsigned int fpcr;
fpcr = __builtin_aarch64_get_fpcr ();
}
gcc11 / master r11-3035.
$ ./gcc/xgcc -Bgcc ~/fpcr-test-a.c -S
.../fpcr-test-a.c: In function ‘main’:
.../fpcr-test-a.c:7:1: error: unrecognizable insn:
7 | }
| ^
(insn 5 2 6 2 (set (mem/c:SI (plus:DI (reg/f:DI 87 virtual-stack-vars)
(const_int -4 [0xfffffffffffffffc])) [1 fpcr+0 S4 A32])
(unspec_volatile:SI [
(const_int 0 [0])
] UNSPECV_GET_FPCR)) ".../fpcr-test-a.c":5:10 -1
(nil))
during RTL pass: vregs
.../fpcr-test-a.c:7:1: internal compiler error: in extract_insn, at
recog.c:2294
0x61cf73 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../src/gcc/rtl-error.c:108
0x61cfa7 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../src/gcc/rtl-error.c:116
0xbdd5ef extract_insn(rtx_insn*)
../../src/gcc/recog.c:2294
0x96407b instantiate_virtual_regs_in_insn
../../src/gcc/function.c:1607
0x96407b instantiate_virtual_regs
../../src/gcc/function.c:1977
0x96407b execute
../../src/gcc/function.c:2026
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/96968] aarch64 : ICE in vregs pass lowering __builtin_aarch64_get_fpcr
2020-09-08 6:22 [Bug target/96968] New: aarch64 : ICE in vregs pass lowering __builtin_aarch64_get_fpcr iains at gcc dot gnu.org
@ 2020-09-08 6:26 ` iains at gcc dot gnu.org
2020-09-08 6:51 ` fxcoudert at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: iains at gcc dot gnu.org @ 2020-09-08 6:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96968
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Target| |aarch64-linux-gnu,
| |aarch64-darwin
Ever confirmed|0 |1
Last reconfirmed| |2020-09-08
Status|UNCONFIRMED |NEW
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/96968] aarch64 : ICE in vregs pass lowering __builtin_aarch64_get_fpcr
2020-09-08 6:22 [Bug target/96968] New: aarch64 : ICE in vregs pass lowering __builtin_aarch64_get_fpcr iains at gcc dot gnu.org
2020-09-08 6:26 ` [Bug target/96968] " iains at gcc dot gnu.org
@ 2020-09-08 6:51 ` fxcoudert at gcc dot gnu.org
2020-09-08 7:05 ` iains at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2020-09-08 6:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96968
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fxcoudert at gcc dot gnu.org
--- Comment #1 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
Exact same issue also occurs with __builtin_aarch64_get_fpsr().
With __builtin_aarch64_get_fpsr64() and __builtin_aarch64_get_fpcr64(), I get
"error: unrecognizable insn" at -O0, and "internal compiler error: Segmentation
fault" at -O1.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/96968] aarch64 : ICE in vregs pass lowering __builtin_aarch64_get_fpcr
2020-09-08 6:22 [Bug target/96968] New: aarch64 : ICE in vregs pass lowering __builtin_aarch64_get_fpcr iains at gcc dot gnu.org
2020-09-08 6:26 ` [Bug target/96968] " iains at gcc dot gnu.org
2020-09-08 6:51 ` fxcoudert at gcc dot gnu.org
@ 2020-09-08 7:05 ` iains at gcc dot gnu.org
2020-09-08 11:36 ` [Bug target/96968] aarch64 : ICE in vregs or expand pass, lowering __builtin_aarch64_get_{fpcr,fpsr,fpcr64,fpsr64} akrl at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: iains at gcc dot gnu.org @ 2020-09-08 7:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96968
--- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> ---
for __builtin_aarch64_get_fpcr64 () O1 the fail is:
$ ./gcc/xgcc -Bgcc ~/fpcr-test-a.c -S -O
during RTL pass: expand
.../fpcr-test-a.c: In function ‘main’:
.../fpcr-test-a.c:7:1: internal compiler error: Segmentation fault
7 | }
| ^
0xc7d9c3 crash_signal
../../src/gcc/toplev.c:327
0xab6a84 mark_jump_label_1
../../src/gcc/jump.c:1087
0xab6c23 mark_jump_label_1
../../src/gcc/jump.c:1211
0xab7033 mark_all_labels
../../src/gcc/jump.c:332
0xab7223 rebuild_jump_labels_1
../../src/gcc/jump.c:74
0xab7223 rebuild_jump_labels(rtx_insn*)
../../src/gcc/jump.c:98
0x7d35a3 execute
../../src/gcc/cfgexpand.c:6619
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/96968] aarch64 : ICE in vregs or expand pass, lowering __builtin_aarch64_get_{fpcr,fpsr,fpcr64,fpsr64}
2020-09-08 6:22 [Bug target/96968] New: aarch64 : ICE in vregs pass lowering __builtin_aarch64_get_fpcr iains at gcc dot gnu.org
` (2 preceding siblings ...)
2020-09-08 7:05 ` iains at gcc dot gnu.org
@ 2020-09-08 11:36 ` akrl at gcc dot gnu.org
2020-09-14 17:27 ` Andrea Corallo
2020-09-24 9:59 ` Andrea Corallo
2020-09-14 17:27 ` andrea.corallo at arm dot com
` (6 subsequent siblings)
10 siblings, 2 replies; 15+ messages in thread
From: akrl at gcc dot gnu.org @ 2020-09-08 11:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96968
--- Comment #3 from akrl at gcc dot gnu.org ---
Confirm this was introduced by:
0d7e5fa655e59c99035bf94a46c912e369bb9fa0
"aarch64: Add 64 bit setter getter fpsr fpcr"
I'll have a look as soon as I have a slot of time.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bug target/96968] aarch64 : ICE in vregs or expand pass, lowering __builtin_aarch64_get_{fpcr,fpsr,fpcr64,fpsr64}
2020-09-08 11:36 ` [Bug target/96968] aarch64 : ICE in vregs or expand pass, lowering __builtin_aarch64_get_{fpcr,fpsr,fpcr64,fpsr64} akrl at gcc dot gnu.org
@ 2020-09-14 17:27 ` Andrea Corallo
2020-09-24 9:59 ` Andrea Corallo
1 sibling, 0 replies; 15+ messages in thread
From: Andrea Corallo @ 2020-09-14 17:27 UTC (permalink / raw)
To: akrl at gcc dot gnu.org; +Cc: gcc-bugs, nd
Patch posted at:
https://gcc.gnu.org/pipermail/gcc-patches/2020-September/553882.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/96968] aarch64 : ICE in vregs or expand pass, lowering __builtin_aarch64_get_{fpcr,fpsr,fpcr64,fpsr64}
2020-09-08 6:22 [Bug target/96968] New: aarch64 : ICE in vregs pass lowering __builtin_aarch64_get_fpcr iains at gcc dot gnu.org
` (3 preceding siblings ...)
2020-09-08 11:36 ` [Bug target/96968] aarch64 : ICE in vregs or expand pass, lowering __builtin_aarch64_get_{fpcr,fpsr,fpcr64,fpsr64} akrl at gcc dot gnu.org
@ 2020-09-14 17:27 ` andrea.corallo at arm dot com
2020-09-21 8:40 ` cvs-commit at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: andrea.corallo at arm dot com @ 2020-09-14 17:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96968
--- Comment #4 from Andrea Corallo <andrea.corallo at arm dot com> ---
Patch posted at:
https://gcc.gnu.org/pipermail/gcc-patches/2020-September/553882.html
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/96968] aarch64 : ICE in vregs or expand pass, lowering __builtin_aarch64_get_{fpcr,fpsr,fpcr64,fpsr64}
2020-09-08 6:22 [Bug target/96968] New: aarch64 : ICE in vregs pass lowering __builtin_aarch64_get_fpcr iains at gcc dot gnu.org
` (4 preceding siblings ...)
2020-09-14 17:27 ` andrea.corallo at arm dot com
@ 2020-09-21 8:40 ` cvs-commit at gcc dot gnu.org
2020-09-24 9:59 ` andrea.corallo at arm dot com
` (4 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-21 8:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96968
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Andrea Corallo <akrl@gcc.gnu.org>:
https://gcc.gnu.org/g:f5e73de00e9c853ce65333efada7409b0d00f758
commit r11-3317-gf5e73de00e9c853ce65333efada7409b0d00f758
Author: Andrea Corallo <andrea.corallo@arm.com>
Date: Mon Sep 14 14:47:24 2020 +0100
aarch64: Fix ICE on fpsr fpcr getters [PR96968]
gcc/ChangeLog
2020-09-14 Andrea Corallo <andrea.corallo@arm.com>
PR target/96968
* config/aarch64/aarch64-builtins.c
(aarch64_expand_fpsr_fpcr_setter): Fix comment nit.
(aarch64_expand_fpsr_fpcr_getter): New function, expand these
getters using expand_insn machinery.
(aarch64_general_expand_builtin): Make use of.
gcc/testsuite/ChangeLog
2020-09-14 Andrea Corallo <andrea.corallo@arm.com>
PR target/96968
* gcc.target/aarch64/pr96968.c: New test.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bug target/96968] aarch64 : ICE in vregs or expand pass, lowering __builtin_aarch64_get_{fpcr,fpsr,fpcr64,fpsr64}
2020-09-08 11:36 ` [Bug target/96968] aarch64 : ICE in vregs or expand pass, lowering __builtin_aarch64_get_{fpcr,fpsr,fpcr64,fpsr64} akrl at gcc dot gnu.org
2020-09-14 17:27 ` Andrea Corallo
@ 2020-09-24 9:59 ` Andrea Corallo
1 sibling, 0 replies; 15+ messages in thread
From: Andrea Corallo @ 2020-09-24 9:59 UTC (permalink / raw)
To: akrl at gcc dot gnu.org; +Cc: gcc-bugs, nd
I believe f5e73de00e9c853ce65333efada7409b0d00f758 should have fixed
this.
Okay to close?
Thanks
Andrea
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/96968] aarch64 : ICE in vregs or expand pass, lowering __builtin_aarch64_get_{fpcr,fpsr,fpcr64,fpsr64}
2020-09-08 6:22 [Bug target/96968] New: aarch64 : ICE in vregs pass lowering __builtin_aarch64_get_fpcr iains at gcc dot gnu.org
` (5 preceding siblings ...)
2020-09-21 8:40 ` cvs-commit at gcc dot gnu.org
@ 2020-09-24 9:59 ` andrea.corallo at arm dot com
2020-09-24 10:07 ` iains at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: andrea.corallo at arm dot com @ 2020-09-24 9:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96968
--- Comment #6 from Andrea Corallo <andrea.corallo at arm dot com> ---
I believe f5e73de00e9c853ce65333efada7409b0d00f758 should have fixed
this.
Okay to close?
Thanks
Andrea
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/96968] aarch64 : ICE in vregs or expand pass, lowering __builtin_aarch64_get_{fpcr,fpsr,fpcr64,fpsr64}
2020-09-08 6:22 [Bug target/96968] New: aarch64 : ICE in vregs pass lowering __builtin_aarch64_get_fpcr iains at gcc dot gnu.org
` (6 preceding siblings ...)
2020-09-24 9:59 ` andrea.corallo at arm dot com
@ 2020-09-24 10:07 ` iains at gcc dot gnu.org
2020-09-24 10:11 ` Andrea Corallo
2020-09-24 10:11 ` andrea.corallo at arm dot com
` (2 subsequent siblings)
10 siblings, 1 reply; 15+ messages in thread
From: iains at gcc dot gnu.org @ 2020-09-24 10:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96968
--- Comment #7 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Andrea Corallo from comment #6)
> I believe f5e73de00e9c853ce65333efada7409b0d00f758 should have fixed
> this.
>
> Okay to close?
unfortunately, I've not been able to test since you applied this - currently
bootstrap is broken on aarch64-darwin for reasons outside our control (new
security provisions stopping the gcc/build/gen* programs from running). If it
could stay open for a few more days, while we try to find a fix for that - (or
close it and we can reopen if needed).
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Bug target/96968] aarch64 : ICE in vregs or expand pass, lowering __builtin_aarch64_get_{fpcr,fpsr,fpcr64,fpsr64}
2020-09-24 10:07 ` iains at gcc dot gnu.org
@ 2020-09-24 10:11 ` Andrea Corallo
0 siblings, 0 replies; 15+ messages in thread
From: Andrea Corallo @ 2020-09-24 10:11 UTC (permalink / raw)
To: iains at gcc dot gnu.org via Gcc-bugs; +Cc: iains at gcc dot gnu.org, nd
"iains at gcc dot gnu.org via Gcc-bugs" <gcc-bugs@gcc.gnu.org> writes:
[...]
> unfortunately, I've not been able to test since you applied this - currently
> bootstrap is broken on aarch64-darwin for reasons outside our control (new
> security provisions stopping the gcc/build/gen* programs from running). If it
> could stay open for a few more days, while we try to find a fix for that - (or
> close it and we can reopen if needed).
Sure no rush, thanks for testing it!
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/96968] aarch64 : ICE in vregs or expand pass, lowering __builtin_aarch64_get_{fpcr,fpsr,fpcr64,fpsr64}
2020-09-08 6:22 [Bug target/96968] New: aarch64 : ICE in vregs pass lowering __builtin_aarch64_get_fpcr iains at gcc dot gnu.org
` (7 preceding siblings ...)
2020-09-24 10:07 ` iains at gcc dot gnu.org
@ 2020-09-24 10:11 ` andrea.corallo at arm dot com
2020-09-29 23:24 ` iains at gcc dot gnu.org
2020-09-30 7:15 ` akrl at gcc dot gnu.org
10 siblings, 0 replies; 15+ messages in thread
From: andrea.corallo at arm dot com @ 2020-09-24 10:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96968
--- Comment #8 from Andrea Corallo <andrea.corallo at arm dot com> ---
"iains at gcc dot gnu.org via Gcc-bugs" <gcc-bugs@gcc.gnu.org> writes:
[...]
> unfortunately, I've not been able to test since you applied this - currently
> bootstrap is broken on aarch64-darwin for reasons outside our control (new
> security provisions stopping the gcc/build/gen* programs from running). If it
> could stay open for a few more days, while we try to find a fix for that - (or
> close it and we can reopen if needed).
Sure no rush, thanks for testing it!
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/96968] aarch64 : ICE in vregs or expand pass, lowering __builtin_aarch64_get_{fpcr,fpsr,fpcr64,fpsr64}
2020-09-08 6:22 [Bug target/96968] New: aarch64 : ICE in vregs pass lowering __builtin_aarch64_get_fpcr iains at gcc dot gnu.org
` (8 preceding siblings ...)
2020-09-24 10:11 ` andrea.corallo at arm dot com
@ 2020-09-29 23:24 ` iains at gcc dot gnu.org
2020-09-30 7:15 ` akrl at gcc dot gnu.org
10 siblings, 0 replies; 15+ messages in thread
From: iains at gcc dot gnu.org @ 2020-09-29 23:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96968
--- Comment #9 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Andrea Corallo from comment #8)
> "iains at gcc dot gnu.org via Gcc-bugs" <gcc-bugs@gcc.gnu.org> writes:
> [...]
> > unfortunately, I've not been able to test since you applied this - currently
> > bootstrap is broken on aarch64-darwin for reasons outside our control (new
> > security provisions stopping the gcc/build/gen* programs from running). If it
> > could stay open for a few more days, while we try to find a fix for that - (or
> > close it and we can reopen if needed).
>
> Sure no rush, thanks for testing it!
I managed to do a manual build on arm64-darwin, and the ICE is gone. Not sure
if the flags are supported by the hardware but that's a different issue. Fine
to close this from my pov.
We get this for the simple test-case (mach-o/darwin format object):
.arch armv8-a
.text
.align 2
.globl _main
_main:
LFB0:
.cfi_startproc
sub sp, sp, #16
.cfi_def_cfa_offset 16
mrs x0, fpcr
str w0, [sp, 12]
mov w0, 0
add sp, sp, 16
.cfi_def_cfa_offset 0
ret
.cfi_endproc
LFE0:
.ident "GCC: (GNU) 11.0.0 20200929 (experimental)"
.subsections_via_symbols
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug target/96968] aarch64 : ICE in vregs or expand pass, lowering __builtin_aarch64_get_{fpcr,fpsr,fpcr64,fpsr64}
2020-09-08 6:22 [Bug target/96968] New: aarch64 : ICE in vregs pass lowering __builtin_aarch64_get_fpcr iains at gcc dot gnu.org
` (9 preceding siblings ...)
2020-09-29 23:24 ` iains at gcc dot gnu.org
@ 2020-09-30 7:15 ` akrl at gcc dot gnu.org
10 siblings, 0 replies; 15+ messages in thread
From: akrl at gcc dot gnu.org @ 2020-09-30 7:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96968
akrl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #10 from akrl at gcc dot gnu.org ---
Thanks, closing.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2020-09-30 7:15 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-08 6:22 [Bug target/96968] New: aarch64 : ICE in vregs pass lowering __builtin_aarch64_get_fpcr iains at gcc dot gnu.org
2020-09-08 6:26 ` [Bug target/96968] " iains at gcc dot gnu.org
2020-09-08 6:51 ` fxcoudert at gcc dot gnu.org
2020-09-08 7:05 ` iains at gcc dot gnu.org
2020-09-08 11:36 ` [Bug target/96968] aarch64 : ICE in vregs or expand pass, lowering __builtin_aarch64_get_{fpcr,fpsr,fpcr64,fpsr64} akrl at gcc dot gnu.org
2020-09-14 17:27 ` Andrea Corallo
2020-09-24 9:59 ` Andrea Corallo
2020-09-14 17:27 ` andrea.corallo at arm dot com
2020-09-21 8:40 ` cvs-commit at gcc dot gnu.org
2020-09-24 9:59 ` andrea.corallo at arm dot com
2020-09-24 10:07 ` iains at gcc dot gnu.org
2020-09-24 10:11 ` Andrea Corallo
2020-09-24 10:11 ` andrea.corallo at arm dot com
2020-09-29 23:24 ` iains at gcc dot gnu.org
2020-09-30 7:15 ` akrl 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).