public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug target/115342] New: [14/15 Regression] AArch64: Function multiversioning initialization incorrect @ 2024-06-04 9:11 wilco at gcc dot gnu.org 2024-06-05 6:42 ` [Bug target/115342] " rguenth at gcc dot gnu.org ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: wilco at gcc dot gnu.org @ 2024-06-04 9:11 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115342 Bug ID: 115342 Summary: [14/15 Regression] AArch64: Function multiversioning initialization incorrect Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: wilco at gcc dot gnu.org Target Milestone: --- The CPU features initialization code uses CPUID registers. It uses incorrect comparisons so that for example SVE is not set if SVE2 is available. Using HWCAPs for these is both simpler and works correctly. The initialization must also be done atomically so to avoid multiple threads causing corruption due to non-atomic RMW of the global. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/115342] [14/15 Regression] AArch64: Function multiversioning initialization incorrect 2024-06-04 9:11 [Bug target/115342] New: [14/15 Regression] AArch64: Function multiversioning initialization incorrect wilco at gcc dot gnu.org @ 2024-06-05 6:42 ` rguenth at gcc dot gnu.org 2024-06-05 13:21 ` cvs-commit at gcc dot gnu.org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2024-06-05 6:42 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115342 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |14.2 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/115342] [14/15 Regression] AArch64: Function multiversioning initialization incorrect 2024-06-04 9:11 [Bug target/115342] New: [14/15 Regression] AArch64: Function multiversioning initialization incorrect wilco at gcc dot gnu.org 2024-06-05 6:42 ` [Bug target/115342] " rguenth at gcc dot gnu.org @ 2024-06-05 13:21 ` cvs-commit at gcc dot gnu.org 2024-06-20 4:47 ` ramana at gcc dot gnu.org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2024-06-05 13:21 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115342 --- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Wilco Dijkstra <wilco@gcc.gnu.org>: https://gcc.gnu.org/g:d7cbcfe7c33645eaf95f175f19884d443817857b commit r15-1036-gd7cbcfe7c33645eaf95f175f19884d443817857b Author: Wilco Dijkstra <wilco.dijkstra@arm.com> Date: Wed Jun 5 14:04:33 2024 +0100 AArch64: Fix cpu features initialization [PR115342] The CPU features initialization code uses CPUID registers (rather than HWCAP). The equality comparisons it uses are incorrect: for example FEAT_SVE is not set if SVE2 is available. Using HWCAPs for these is both simpler and correct. The initialization must also be done atomically to avoid multiple threads causing corruption due to non-atomic RMW accesses to the global. libgcc: PR target/115342 * config/aarch64/cpuinfo.c (__init_cpu_features_constructor): Use HWCAP where possible. Use atomic write for initialization. Fix FEAT_PREDRES comparison. (__init_cpu_features_resolver): Use atomic load for correct initialization. (__init_cpu_features): Likewise. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/115342] [14/15 Regression] AArch64: Function multiversioning initialization incorrect 2024-06-04 9:11 [Bug target/115342] New: [14/15 Regression] AArch64: Function multiversioning initialization incorrect wilco at gcc dot gnu.org 2024-06-05 6:42 ` [Bug target/115342] " rguenth at gcc dot gnu.org 2024-06-05 13:21 ` cvs-commit at gcc dot gnu.org @ 2024-06-20 4:47 ` ramana at gcc dot gnu.org 2024-06-20 10:38 ` wilco at gcc dot gnu.org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: ramana at gcc dot gnu.org @ 2024-06-20 4:47 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115342 Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ramana at gcc dot gnu.org Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2024-06-20 --- Comment #2 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> --- Confirmed ? ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/115342] [14/15 Regression] AArch64: Function multiversioning initialization incorrect 2024-06-04 9:11 [Bug target/115342] New: [14/15 Regression] AArch64: Function multiversioning initialization incorrect wilco at gcc dot gnu.org ` (2 preceding siblings ...) 2024-06-20 4:47 ` ramana at gcc dot gnu.org @ 2024-06-20 10:38 ` wilco at gcc dot gnu.org 2024-06-21 16:33 ` cvs-commit at gcc dot gnu.org 2024-06-21 16:36 ` wilco at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: wilco at gcc dot gnu.org @ 2024-06-20 10:38 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115342 Wilco <wilco at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #3 from Wilco <wilco at gcc dot gnu.org> --- (In reply to Ramana Radhakrishnan from comment #2) > Confirmed ? And fixed on trunk. Will do the backport later. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/115342] [14/15 Regression] AArch64: Function multiversioning initialization incorrect 2024-06-04 9:11 [Bug target/115342] New: [14/15 Regression] AArch64: Function multiversioning initialization incorrect wilco at gcc dot gnu.org ` (3 preceding siblings ...) 2024-06-20 10:38 ` wilco at gcc dot gnu.org @ 2024-06-21 16:33 ` cvs-commit at gcc dot gnu.org 2024-06-21 16:36 ` wilco at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2024-06-21 16:33 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115342 --- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-14 branch has been updated by Wilco Dijkstra <wilco@gcc.gnu.org>: https://gcc.gnu.org/g:9421f02916676d27e24fcda918f85e359329ac69 commit r14-10338-g9421f02916676d27e24fcda918f85e359329ac69 Author: Wilco Dijkstra <wilco.dijkstra@arm.com> Date: Wed Jun 5 14:04:33 2024 +0100 AArch64: Fix cpu features initialization [PR115342] The CPU features initialization code uses CPUID registers (rather than HWCAP). The equality comparisons it uses are incorrect: for example FEAT_SVE is not set if SVE2 is available. Using HWCAPs for these is both simpler and correct. The initialization must also be done atomically to avoid multiple threads causing corruption due to non-atomic RMW accesses to the global. libgcc: PR target/115342 * config/aarch64/cpuinfo.c (__init_cpu_features_constructor): Use HWCAP where possible. Use atomic write for initialization. Fix FEAT_PREDRES comparison. (__init_cpu_features_resolver): Use atomic load for correct initialization. (__init_cpu_features): Likewise. (cherry picked from commit d7cbcfe7c33645eaf95f175f19884d443817857b) ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/115342] [14/15 Regression] AArch64: Function multiversioning initialization incorrect 2024-06-04 9:11 [Bug target/115342] New: [14/15 Regression] AArch64: Function multiversioning initialization incorrect wilco at gcc dot gnu.org ` (4 preceding siblings ...) 2024-06-21 16:33 ` cvs-commit at gcc dot gnu.org @ 2024-06-21 16:36 ` wilco at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: wilco at gcc dot gnu.org @ 2024-06-21 16:36 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115342 Wilco <wilco at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #5 from Wilco <wilco at gcc dot gnu.org> --- Fixed on trunk and gcc-14 branch. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-06-21 16:36 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-06-04 9:11 [Bug target/115342] New: [14/15 Regression] AArch64: Function multiversioning initialization incorrect wilco at gcc dot gnu.org 2024-06-05 6:42 ` [Bug target/115342] " rguenth at gcc dot gnu.org 2024-06-05 13:21 ` cvs-commit at gcc dot gnu.org 2024-06-20 4:47 ` ramana at gcc dot gnu.org 2024-06-20 10:38 ` wilco at gcc dot gnu.org 2024-06-21 16:33 ` cvs-commit at gcc dot gnu.org 2024-06-21 16:36 ` wilco 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).