[all-commits] [llvm/llvm-project] d59859: [Clang][ARM][Sema] Reject bad sizes of __builtin_a...
Simon Tatham via All-commits
all-commits at lists.llvm.org
Tue Jul 29 01:01:58 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d5985905ae8e5b2e108d1b2772b554134db162dd
https://github.com/llvm/llvm-project/commit/d5985905ae8e5b2e108d1b2772b554134db162dd
Author: Simon Tatham <simon.tatham at arm.com>
Date: 2025-07-29 (Tue, 29 Jul 2025)
Changed paths:
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/include/clang/Basic/TargetInfo.h
M clang/include/clang/Sema/SemaARM.h
M clang/lib/Basic/Targets/ARM.cpp
M clang/lib/Basic/Targets/ARM.h
M clang/lib/Sema/SemaARM.cpp
A clang/test/Sema/builtins-arm-exclusive-124.c
A clang/test/Sema/builtins-arm-exclusive-4.c
A clang/test/Sema/builtins-arm-exclusive-none.c
M clang/test/Sema/builtins-arm-exclusive.c
Log Message:
-----------
[Clang][ARM][Sema] Reject bad sizes of __builtin_arm_ldrex (#150419)
Depending on the particular version of the AArch32 architecture,
load/store exclusive operations might be available for various subset of
8, 16, 32, and 64-bit quantities. Sema knew nothing about this and was
accepting all four sizes, leading to a compiler crash at isel time if
you used a size not available on the target architecture.
Now the Sema checking stage emits a more sensible diagnostic, pointing
at the location in the code.
In order to allow Sema to query the set of supported sizes, I've moved
the enum of LDREX_x sizes out of its Arm-specific header into
`TargetInfo.h`.
Also, in order to allow the diagnostic to specify the correct list of
supported sizes, I've filled it with `%select{}`. (The alternative was
to make separate error messages for each different list of sizes.)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list