public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/102914] New: spurious warnings are emitted on ARM about non-delegitimized UNSPEC UNSPEC_TLS
@ 2021-10-24 15:08 ardb at kernel dot org
2021-10-24 15:13 ` [Bug target/102914] " pinskia at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: ardb at kernel dot org @ 2021-10-24 15:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102914
Bug ID: 102914
Summary: spurious warnings are emitted on ARM about
non-delegitimized UNSPEC UNSPEC_TLS
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: ardb at kernel dot org
Target Milestone: ---
Target: ARM
The Linux/ARM kernel uses __builtin_thread_pointer() to access the TPIDRURO TLS
register, which triggers warning such as this one when using GCC 12.0.0. The
warning does not appear with 11.2
/home/ard/linux/init/calibrate.c: In function ‘calibrate_delay’:
/home/ard/linux/init/calibrate.c:275:6: note: non-delegitimized UNSPEC
UNSPEC_TLS (17) found in variable location
275 | void calibrate_delay(void)
| ^~~~~~~~~~~~~~~
This appears to be triggered by the presence of notes in the RTL such as the
one below:
(note 1826 74 76 2 (var_location this_cpu (mem:SI (plus:SI (unspec:SI [
(const_int 0 [0])
] UNSPEC_TLS)
(const_int 8 [0x8])) [5 MEM[(struct thread_info *)cur_24].cpu+0 S4
A64])) NOTE_INSN_VAR_LOCATION)
which are generated from dereferences of the (struct thread_info *) pointer
which is initialized from __builtin_thread_pointer().
(insn 50 2215 2217 2 (set (reg/v/f:SI 3 r3 [orig:124 cur ] [124])
(unspec:SI [
(const_int 0 [0])
] UNSPEC_TLS))
"/home/ard/linux/arch/arm/include/asm/current.h":36:8 401 {load_tp_hard}
(expr_list:REG_EQUIV (unspec:SI [
(const_int 0 [0])
] UNSPEC_TLS)
(nil)))
(insn 54 2226 1499 2 (set (reg/v:SI 2 r2 [orig:125 this_cpu ] [125])
(mem:SI (plus:SI (reg/v/f:SI 3 r3 [orig:124 cur ] [124])
(const_int 8 [0x8])) [5 MEM[(struct thread_info *)cur_24].cpu+0
S4 A64])) "/home/ard/linux/init/calibrate.c":279:6 990 {*thumb2_movsi_insn}
(expr_list:REG_DEAD (reg/v/f:SI 3 r3 [orig:124 cur ] [124])
(nil)))
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/102914] spurious warnings are emitted on ARM about non-delegitimized UNSPEC UNSPEC_TLS
2021-10-24 15:08 [Bug target/102914] New: spurious warnings are emitted on ARM about non-delegitimized UNSPEC UNSPEC_TLS ardb at kernel dot org
@ 2021-10-24 15:13 ` pinskia at gcc dot gnu.org
2021-10-25 18:23 ` acoplan at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-24 15:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102914
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This warning only happens with checking turned on which is the default for
building off the trunk.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/102914] spurious warnings are emitted on ARM about non-delegitimized UNSPEC UNSPEC_TLS
2021-10-24 15:08 [Bug target/102914] New: spurious warnings are emitted on ARM about non-delegitimized UNSPEC UNSPEC_TLS ardb at kernel dot org
2021-10-24 15:13 ` [Bug target/102914] " pinskia at gcc dot gnu.org
@ 2021-10-25 18:23 ` acoplan at gcc dot gnu.org
2021-10-25 18:25 ` pinskia at gcc dot gnu.org
2021-10-26 8:14 ` acoplan at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-10-25 18:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102914
Alex Coplan <acoplan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |acoplan at gcc dot gnu.org
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Dup.
*** This bug has been marked as a duplicate of bug 100354 ***
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/102914] spurious warnings are emitted on ARM about non-delegitimized UNSPEC UNSPEC_TLS
2021-10-24 15:08 [Bug target/102914] New: spurious warnings are emitted on ARM about non-delegitimized UNSPEC UNSPEC_TLS ardb at kernel dot org
2021-10-24 15:13 ` [Bug target/102914] " pinskia at gcc dot gnu.org
2021-10-25 18:23 ` acoplan at gcc dot gnu.org
@ 2021-10-25 18:25 ` pinskia at gcc dot gnu.org
2021-10-26 8:14 ` acoplan at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-25 18:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102914
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|RESOLVED |NEW
Last reconfirmed| |2021-10-25
Resolution|DUPLICATE |---
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
They are not duplicates. The other is for aarch64 while this one for arm. The
problems are similar in the sense the warning is the similar but the backends
are different and needs to be changed seperately.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/102914] spurious warnings are emitted on ARM about non-delegitimized UNSPEC UNSPEC_TLS
2021-10-24 15:08 [Bug target/102914] New: spurious warnings are emitted on ARM about non-delegitimized UNSPEC UNSPEC_TLS ardb at kernel dot org
` (2 preceding siblings ...)
2021-10-25 18:25 ` pinskia at gcc dot gnu.org
@ 2021-10-26 8:14 ` acoplan at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-10-26 8:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102914
Alex Coplan <acoplan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=100354
--- Comment #4 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Ah, yeah. For some reason I thought this PR was for aarch64. Sorry about that.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-10-26 8:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-24 15:08 [Bug target/102914] New: spurious warnings are emitted on ARM about non-delegitimized UNSPEC UNSPEC_TLS ardb at kernel dot org
2021-10-24 15:13 ` [Bug target/102914] " pinskia at gcc dot gnu.org
2021-10-25 18:23 ` acoplan at gcc dot gnu.org
2021-10-25 18:25 ` pinskia at gcc dot gnu.org
2021-10-26 8:14 ` acoplan 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).