[qt/clang/llvm-project]: Summary of bulk changes made
KDE Git Services - Bulk Change <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git repository change summary for qt/clang/llvm-project
Pushed by mirror-service into branch 'upstream/users/boomanaiden154/main.transforms-remove-bugpoint-references'.
Changed from 0000000000000000000000000000000000000000 to ef7992a5a9cd510c11ae9688e64bccf857bb2599
Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository.
This change contains the following new commits:
Git commit f80ea9af1f29cc202d0b6ba077e79769b6f6184c by GitHub (on behalf of David Spickett) on 05/08/2026 at 11:24..
[lldb] Rename some register type classes (#213684)
Follow up to #196960.
So that when more types are added, the hierarchy is clear.
RegisterType
-> RegisterTypeEnum
-> RegisterTypeFlags
(in future also...)
-> RegisterTypeUnion
-> RegisterTypeVector
Renamed and moved the test file as it will cover all the classes derived
from RegisterType.
https://invent.kde.org/qt/clang/llvm-project/-/commit/f80ea9af1f29cc202d0b6ba077e79769b6f6184c
Git commit f4f973e3cdf8076209d462ae918dfd9299b741f4 by GitHub (on behalf of Matt Arsenault) on 05/08/2026 at 11:30..
RuntimeLibcalls: Split soft-float three-way compares into distinct libcall kinds (#211617)
https://invent.kde.org/qt/clang/llvm-project/-/commit/f4f973e3cdf8076209d462ae918dfd9299b741f4
Git commit 0c6550088dad824f0bc464775da0fb628d9ce848 by GitHub (on behalf of Donát Nagy) on 05/08/2026 at 11:31..
[analyzer] Generalize MemRegion::getDescriptiveName (#213991)
Previously `ArrayBoundChecker` had a utility function called
`getRegionName` that acted as a wrapper around
`MemRegion::getDescriptiveName` and provided fallback descriptions like
"the heap area" or "the string literal" in cases when there was no exact
name and `Memregion::getDescriptiveName` just returned an empty string.
As this functionality may be useful for other checkers in the future,
this commit moves it to `getDescriptiveName`, which now gains a second
optional parameter called `AllowFallback` (which defaults to false).
Calling `getDescriptiveName` with `AllowFallback == true` is almost
equivalent to the utility function `getRegionName`: the only difference
is that `getDescriptiveName` uses `getRawMemorySpace()` to remain
independent of the current `State` -- while `getRegionName` took the
`Space` (calculated with `Reg->getMemorySpace(State)`) as an argument.
This introduces a very minor functional change in
`security.ArrayBoundChecker`: if a symbolic region was originally
created in the Unknown memory space but later we deduced that it is on
the heap, then before this commit it was described as "the heap area"
but now it is referred to as "the region".
As this is a very rare situation and the new, less specific message is
also completely acceptable, I don't think that we need to complicate the
code to preserve the old behavior.
This commit eliminates the useless variable `VariableName` from
`getDescriptiveName`, other technical debt is left unchanged.
https://invent.kde.org/qt/clang/llvm-project/-/commit/0c6550088dad824f0bc464775da0fb628d9ce848
Git commit 859c49360c4f9408474df94bdf3b34811360e378 by GitHub (on behalf of Balázs Benics) on 05/08/2026 at 11:42..
[clang][CFG][NFC] Add some tests for guaranteed eval orders (#212116)
Depends on #212115
rdar://183254267
Assisted-By: claude
https://invent.kde.org/qt/clang/llvm-project/-/commit/859c49360c4f9408474df94bdf3b34811360e378
Git commit 9f7c5cdad763372d99375fb9296247ef1a79f274 by GitHub (on behalf of Jiahao Guo) on 05/08/2026 at 11:56..
[CIR][AArch64] Lower AArch64 scalar saturating subtract intrinsics (#213658)
### summary
This PR is a follow-up to #207189 and adds CIR lowering support for the
eight AArch64 scalar signed and unsigned saturating subtract intrinsics.
It reuses the common Neon SISD lowering infrastructure introduced by
#209389.
The legacy CodeGen tests are migrated to the ACLE-organized subtraction
test file with corresponding CIR and LLVM checks.
Assisted by : gpt5.6-sol high
https://invent.kde.org/qt/clang/llvm-project/-/commit/9f7c5cdad763372d99375fb9296247ef1a79f274
Git commit b5b34ff378896572ccac8c77445f8e90c0547988 by GitHub (on behalf of babadany2999) on 05/08/2026 at 11:57..
[Clang][Sema] Fix an assertion crash when instantiating a nested requirement (#213660)
We should check if the expression is valid before getConstraintExpr.
Fixes #213575
https://invent.kde.org/qt/clang/llvm-project/-/commit/b5b34ff378896572ccac8c77445f8e90c0547988
Git commit b2b88d98cec1930d3a32242055a0b3ecfc9b4d10 by GitHub (on behalf of Petar Avramovic) on 05/08/2026 at 12:04..
AMDGPU/GlobalISel: Fix G_PTR_ADD handling in getBaseWithConstantOffset (#213968)
There was a discrepancy compared to SDAG when G_PTR_ADD was being matched
and there was no nuw flag check. In case of G_PTR_ADD, nuw flag comes
from inbounds flag on getelementptr. For reference, SDAG does not have
pointers so PTR_ADD is integer ADD in SDAG.
https://invent.kde.org/qt/clang/llvm-project/-/commit/b2b88d98cec1930d3a32242055a0b3ecfc9b4d10
Git commit 4f14eaa227b32a6549c540fafe6b8de2036c6b9d by GitHub (on behalf of Ruoyu Qiu) on 05/08/2026 at 12:13..
[DA] Rewrite Banerjee MIV test with SCEV-based interval arithmetic (#207662)
https://invent.kde.org/qt/clang/llvm-project/-/commit/4f14eaa227b32a6549c540fafe6b8de2036c6b9d
Git commit 1768978e0cb5ceba764bbe164d974a8db9b006cb by GitHub (on behalf of David Sherwood) on 05/08/2026 at 12:13..
[Analysis] Cache generation of SCEV expander overflow checks (#213013)
When creating SCEV checks as part of loop vectorisation we often
generate overflow checks, which leads to lots of duplicated calls to the
umul_with_overflow intrinsic. These calls should be cleaned up during
codegen. However, it is unfortunate that the current LLVM method of
calculating the cost of IR in a block involves looping over each
instruction and adding the costs individually with no thought to the
trivial CSE or DCE optimisations that would take place. In the absence
of a more sophisticated method of cost analysis, for now I've chosen to
explicitly CSE these overflow checks during SCEV expansion.
https://invent.kde.org/qt/clang/llvm-project/-/commit/1768978e0cb5ceba764bbe164d974a8db9b006cb
Git commit 80e17427c96f4ef13a255bfeb487f950a5d8d90e by GitHub (on behalf of Simon Pilgrim) on 05/08/2026 at 12:14..
[X86] Rename getPMOVMSKB -> getMOVMSK (#214177)
The getPMOVMSKB helper has been used to generate MOVMSKPS/D cases as well for some time.
https://invent.kde.org/qt/clang/llvm-project/-/commit/80e17427c96f4ef13a255bfeb487f950a5d8d90e
Git commit 2fa45081bc8c1d13099684f27d73eb52889ec472 by GitHub (on behalf of Alexey Bataev) on 05/08/2026 at 12:20..
[SLP]Fix crash from runtime alias check reusing body scalars
Emit the check at the block's first insertion point instead of before
the terminator. SCEV expansion reuses any dominating instruction, so
at the terminator it could pick up body scalars that are later moved
into the vector block and deleted, causing a crash.
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/214211
https://invent.kde.org/qt/clang/llvm-project/-/commit/2fa45081bc8c1d13099684f27d73eb52889ec472
Git commit b185b9098984a2e99abd9e3d314b66d21c4431a4 by GitHub (on behalf of Petar Avramovic) on 05/08/2026 at 12:22..
AMDGPU/GlobalISel: Legalize G_SCMP and G_UCMP (#213896)
https://invent.kde.org/qt/clang/llvm-project/-/commit/b185b9098984a2e99abd9e3d314b66d21c4431a4
Git commit 9063da54488c147b5fd9c51128dcb8682632dd1c by GitHub (on behalf of Vineet Kumar) on 05/08/2026 at 12:26..
[flang][flang-rt] Add -ffpe-trap= to set the initial FP exception halting mode (#208828)
Implement the gfortran-style `-ffpe-trap=<list>` option, which sets the
initial floating-point exception halting mode for the main program unit.
The Fortran 2023 standard (17.6) permits the initial halting mode to be
processor defined, so honoring this at program start is conforming.
`<list>` is a comma-separated set of exception mnemonics: `invalid`,
`zero`, `overflow`, `underflow`, and `inexact`, corresponding to the
IEEE_FLAG_TYPE values IEEE_INVALID, IEEE_DIVIDE_BY_ZERO, IEEE_OVERFLOW,
IEEE_UNDERFLOW, and IEEE_INEXACT. As a non-standard, gfortran-compatible
extension, `denormal` halts on the x86 denormal-operand exception. An
empty list or the value `none` disables halting, and the last
`-ffpe-trap=` on the command line wins (allowing an earlier request to
be overridden).
Changes by component:
- clang/Driver: give `-ffpe-trap=` FlangOption/FC1Option visibility and
a one-line HelpText plus a detailed DocBrief (moved into f_Group);
forward the flag to -fc1. Emit a target-based warning when halting
control is unavailable (non-x86 and non-Linux targets), and a
denormal-specific warning on non-x86 targets. The check is intentionally
conservative and only ever under-warns; the runtime remains
authoritative.
- flang/Frontend: parse the list into a LangOptions bitmask
(FPExceptionTrapKind), error on unknown mnemonics, and propagate the
mask to the lowering options.
- flang/Lower: genMain() injects a call to _FortranAEnableFPETraps into
the main program unit only (after ProgramStart, before _QQmain), so the
mode persists across procedures as required by F2023 17.6.
- flang-rt: add EnableFPETraps(), which enables halting only for the
exceptions whose halting control is supported on the target
(IEEE_SUPPORT_HALTING, F2023 17.11.40); it is a no-op elsewhere.
Testing:
- Driver tests for forwarding, "none"/empty, last-wins, bad-argument
errors, and the unsupported-target / denormal warnings.
- FIR lowering tests for the emitted call and constant mask, including a
negative test that a non-main compilation unit emits no call.
- flang-rt execution tests that verify each exception (invalid, zero,
overflow, underflow, inexact, denormal) actually terminates the program
with SIGFPE, plus a selectivity test that an unrelated enabled trap does
not halt. The denormal execution test is gated to x86.
These changes were generated with the assistance of AI tooling and have
been reviewed, tested, and validated by the author.
Resolves #198657
https://invent.kde.org/qt/clang/llvm-project/-/commit/9063da54488c147b5fd9c51128dcb8682632dd1c
Git commit a9cc54402e75bd9ad848f707c8ccbfe588b60ee5 by GitHub (on behalf of Arseniy Obolenskiy) on 05/08/2026 at 12:30..
[github] Label llvm/tools/spirv-tools changes as backend:SPIR-V (#214193)
E.g. https://github.com/llvm/llvm-project/pull/214159 PR is missing
labels
https://invent.kde.org/qt/clang/llvm-project/-/commit/a9cc54402e75bd9ad848f707c8ccbfe588b60ee5
Git commit ee779de847774cc935ec089ebb6185c790aedcf7 by GitHub (on behalf of Folkert de Vries) on 05/08/2026 at 12:36..
[SPARC] use `divideCeil` to calculate register offset (#213739)
So that later arguments get the correct register alignment
https://godbolt.org/z/oaEf4Thvx
On current clang the aligned struct starts in `o1`, but with GCC it is
aligned and starts in `o2`. In practice I think only `float` could hit
this (not an int, not an aggregate, smaller than 64 bits).
https://invent.kde.org/qt/clang/llvm-project/-/commit/ee779de847774cc935ec089ebb6185c790aedcf7
Git commit 848d63cb3b9a67aa401f44e08930a16784d88418 by GitHub (on behalf of Igor Kirillov) on 05/08/2026 at 12:43..
[LV] Fix unintended SCEV cache population when querying UnrollVectorizedLoop (#208500)
LoopVectorize queried getUnrollingPreferences after VPlan execution,
when the vector loop had already been created. If the target hook
queries ScalarEvolution, this populates the SCEV caches with expressions
for the new loop and changes which existing values SCEVExpander reuses
later.
This is exposed by #205102, where the new AArch64 unrolling preferences
cause unrelated LoopVectorize tests to produce different IR.
UnrollVectorizedLoop is a target-wide preference. Query it on the
original loop before VPlan execution and before its SCEV information is
forgotten. This prevents the preference query from polluting subsequent
SCEV expansion.
https://invent.kde.org/qt/clang/llvm-project/-/commit/848d63cb3b9a67aa401f44e08930a16784d88418
Git commit 8bbdc73b846a3360cd02f619a3d500dbeb64ffae by GitHub (on behalf of Sergey Shcherbinin) on 05/08/2026 at 12:44..
[llvm-profgen] Harden perf script invocation (#212253)
Harden ``llvm-profgen``'s ``perf script`` invocation for ``--perfdata``:
report launch/exit failures, and clear redirect files between the two
invocations so stale stdout/stderr cannot leak. Cover both with lit
tests that inject a mock ``perf`` via ``PATH``.
Assisted by GPT-5
https://invent.kde.org/qt/clang/llvm-project/-/commit/8bbdc73b846a3360cd02f619a3d500dbeb64ffae
Git commit 904b9515757ab8b3d22095d455a044c4b33dc447 by GitHub (on behalf of Arseniy Obolenskiy) on 05/08/2026 at 12:50..
[SPIR-V] Fix OpGroupAsyncCopy null event substitution (#212754)
Only replace the event operand with OpConstantNull when it is actually a
null constant
This complies with spirv-val expectations
https://invent.kde.org/qt/clang/llvm-project/-/commit/904b9515757ab8b3d22095d455a044c4b33dc447
Git commit 3dec5dad749cf38d5985105fa023d4c2c87fb84e by GitHub (on behalf of Baranov Victor) on 05/08/2026 at 13:08..
[clang-tidy][NFC] Apply llvm-type-switch-case-types check (#214017)
https://invent.kde.org/qt/clang/llvm-project/-/commit/3dec5dad749cf38d5985105fa023d4c2c87fb84e
Git commit d7c82962c35b906dff332c4efbd9c30100b008fb by GitHub (on behalf of Matthew Devereau) on 05/08/2026 at 13:11..
[InstCombine][AArch64] Combine ORRs with logical umin ops (#213651)
Combine:
orr(umin(A, 1), umin(B, 1)) -> umin(orr(A, B), 1)
To remove a redundant UMin. This pattern has been observed with
reduction chains of multiple ORRs of UMin(x, 1), where only one final
UMin(x, 1) is necessary for truncation.
https://invent.kde.org/qt/clang/llvm-project/-/commit/d7c82962c35b906dff332c4efbd9c30100b008fb
Git commit ae98c7d9d386447da2b6fc30b7a1005781e853ca by GitHub (on behalf of Shilei Tian) on 05/08/2026 at 13:15..
[AMDGPU][GFX1250] Use null register for global_prefetch_b8 instead of s[0:1] (#214127)
https://invent.kde.org/qt/clang/llvm-project/-/commit/ae98c7d9d386447da2b6fc30b7a1005781e853ca
Git commit 53e7088562dd44518d6250dc768a4bd0a9e9a3c9 by GitHub (on behalf of Krzysztof Parzyszek) on 05/08/2026 at 13:34..
[flang][OpenMP] Use 'present-modifier' instead of 'expectation' in 5.1 (#214083)
The 5.1 spec lists PRESENT as an alternative in a 'motion-modifier'. The
other alternatives are mapper and iterator. These already exist as
separate modifiers, so 'motion-modifier' would best be expressed as a
modifier group. While modifier groups are not implemented yet, borrow
'present-modifier' from the 6.0 spec.
The 'expectation' modifier only existed in 5.2, it was replaced by
'present-modifier' in 6.0.
https://invent.kde.org/qt/clang/llvm-project/-/commit/53e7088562dd44518d6250dc768a4bd0a9e9a3c9
Git commit a9426776e78a89dec776c34efdb7725de591d878 by GitHub (on behalf of Jean-Didier PAILLEUX) on 05/08/2026 at 13:38..
[flang][MIF] Fix undef reference to a coarray_handle in mif.dealloc_coarray #193157 (#213890)
This PR fixes the behavior reported in issue #193157. The coarray_handle
was only defined if a call to mif.alloc_coarray was present.
If a call to mif.dealloc_coarray was encountered without a prior call to
mif.alloc_coarray, then the coarray_handle was missing, and therefore
llvm.address_of pointed to a non-existent address, which is not allowed.
We now define a coarray_handle that has not been allocated by PRIF for
each coarray variables.
https://invent.kde.org/qt/clang/llvm-project/-/commit/a9426776e78a89dec776c34efdb7725de591d878
Git commit 9629318c9c54c01fda351425c656a0007414ac28 by GitHub (on behalf of Emma Pilkington) on 05/08/2026 at 13:40..
[AMDGPU] Fix Dwarf CFI emission for exec to vcc spills (#213115)
https://invent.kde.org/qt/clang/llvm-project/-/commit/9629318c9c54c01fda351425c656a0007414ac28
Git commit fa8a574ef22ad6571507ea2a5aa5b358f4ba9556 by GitHub (on behalf of Mimis Chlympatsos) on 05/08/2026 at 13:55..
[clang][Sema] Handle alloc_align on all HasFunctionProto declarations (#210871)
Fixes #122058.
## Overview
Attribute `alloc_align`'s TableGen subject accepts any declaration
satisfying `HasFunctionProto`, but `AddAllocAlignAttr` unconditionally
casts the declaration to `FunctionDecl` (in
`Sema::AddAllocAlignAttr()`). Since there exist `Decl`'s that have an
underlying `FunctionProtoType` but are not `FunctionDecl` (e.g. function
pointer variables and parameters), the unconditional
`cast<FunctionDecl>` is too narrow and leads to a crash for `Decl`s that
are meant to be compatible with the `alloc_align` attribute.
For example, trying to compile `C` file
```
void *(*allocator)(unsigned long long) __attribute__((alloc_align(1)));
```
with
```
> clang example.c -fsyntax-only
```
(with assertions enabled in the build) crashes with
```
Assertion failed: (isa<To>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file Casting.h, line 572.
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and dumped files.
...
```
I remove the over-restrictive `cast<FunctionDecl>`, extend
parameter-range lookup through `TypeSourceInfo` for pointer-like
function declarations, and add clang lit tests for function pointers,
member pointers, references, blocks, qualified pointers, and Objective-C
methods.
## Solution
The TableGen definition of the `alloc_align` attribute
```cpp
def AllocAlign : InheritableAttr {
...
let Subjects = SubjectList<[HasFunctionProto]>;
...
}
```
from `clang/include/clang/Basic/Attr.td` guarantees that any `Decl`
reaching the function
```
void Sema::AddAllocAlignAttr(Decl *D, const AttributeCommonInfo &CI, Expr *ParamExpr) {...}
```
in `clang/lib/Sema/SemaDeclAttr.cpp` has an underlying `QualType` that
is a `FunctionProtoType` (and thus a valid candidate for the
`alloc_align` attribute). Note that the `FunctionProtoType` may not be
the `QualType` of the `Decl` instead, but rather wrapped inside pointer,
reference, and so on.
Therefore, we can completely drop the `cast<FunctionDecl>(D)` from
`Sema::AddAllocAlignAttr(Decl *D, const AttributeCommonInfo &CI, Expr
*ParamExpr)`.
However, this introduced a subtle problem. In
`Sema::AddAllocAlignAttr(Decl *D, const AttributeCommonInfo &CI, Expr
*ParamExpr)`, after `Decl D` has been confirmed to have a `FunctionType`
with return type `PointerType`, there is logic to check that the
relevant parameter `ParamExpr` is valid as an input to
`__attribute__((alloc_align(N)))`, and if it is not, we emit diagnostic:
```
Diag(ParamExpr->getBeginLoc(), diag::err_attribute_integers_only)
<< CI << getFunctionOrMethodParamRange(D, Idx.getASTIndex());
```
The function `getFunctionOrMethodParamRange(const Decl *D, unsigned
Idx)` from `clang/include/clang/Sema/Attr.h` calls
`getFunctionOrMethodParam(const Decl *D, unsigned Idx)` (from the same
file), which only handles declaration types that directly own a
parameter list, specifically `FunctionDecl`, `ObjCMethodDecl`, and
`BlockDecl`.
But `getFunctionOrMethodParam` may be reached by `Decl`'s that have an
underlying function (more precisely `hasFunctionProto(decl)` is true)
but are not one of the three currently handled (and we do want to handle
them, they are valid cases). Thus, I also modify
`getFunctionOrMethodParam()` to (if we are not dealing with a
`FunctionDecl/ObjCMethodDecl/BlockDecl`) use the TypeSourceInfo of the
`Decl` to get a `FunctionProtoTypeLoc` for the underlying function,
which in turn gives us access to the parameter declarations. More
specifically, the process is:
1. Obtain the declaration's `TypeSourceInfo`.
2. Start from its unqualified `TypeLoc`.
3. Unwrap a pointer, member pointer, reference, or block pointer.
4. Find the underlying `FunctionProtoTypeLoc`.
5. Retrieve the indexed `ParmVarDecl`.
The fallback logic is best-effort and can recover parameter declarations
when the function prototype exists in the declaration's own
`TypeSourceInfo`. It can handle:
- ordinary function-pointer declarators at file scope, local scope, in
fields, or as parameters, including top-level-qualified pointers;
- member-function pointers (e.g. `int (someclass::*memberfunc)(...) =
...;` in cpp)
- references to functions (e.g. `int (&ref)(int, int)` in cpp)
- block-pointer declarators (`int (^block)(int);` in objective)
- typedef and type-alias declarations that directly have the function
prototype (e.g. `typedef void *(*f)(int);` in cpp)
<!--for recovery `FieldDecls` (seen for example in including the glibc
header in the reproducer from the issue), and for valid declarations
such as func pointers and Objective C methods.-->
## Testing
Added clang lit tests for:
- a valid file-scope function-pointer declaration and the recovery
`FieldDecl` from #122058, to check that they dont crash
- parameter validation for function-pointer and member-function-pointer
declarations (checking both valid integral and invalid non-integral
cases)
- valid and invalid parameter types on Objective-C methods
- diagnostic source ranges for filescope function pointers,
member-function pointers, function references, and block pointers.
***
AI note: Used gpt-5.6-luna to help generate `CHECK:`'s in the new clang
lit tests (giving it the expected output for example what source code
should be underlined, to generate the `{[[@LINE-...]]...` syntax). Also
used it to better understand the hierarchy and relationship between
`*Loc` classes and the interface they expose.
---------
Co-authored-by: Mimis Chlympatsos <[email protected]>
Co-authored-by: Aaron Ballman <[email protected]>
Co-authored-by: Mimis Chlympatsos <[email protected]>
https://invent.kde.org/qt/clang/llvm-project/-/commit/fa8a574ef22ad6571507ea2a5aa5b358f4ba9556
Git commit d803a4a5603d4ba81b649e5fabc8bde5d9713cb8 by GitHub (on behalf of Shilei Tian) on 05/08/2026 at 14:09..
[NFC][AMDGPU] Update check lines messed up by merge orders (#214236)
https://invent.kde.org/qt/clang/llvm-project/-/commit/d803a4a5603d4ba81b649e5fabc8bde5d9713cb8
Git commit af757e5538a8fdb0df6c9dc774cf176f0117cb12 by GitHub (on behalf of Benedek Kaibas) on 05/08/2026 at 14:09..
[analyzer] Discard stack frames that are not on the current live stack (#213779)
When a source's stack frame is not live on the current stack the
`UseAfterLifetimeEnd` checker emitted a false positive. Such sources
outlive the returned value, so they are not dangling stack sources. This
led to multiple false positives when I ran the `UseAfterLifetimeEnd`
checker on the LLVM project.
---------
Co-authored-by: isuckatcs <[email protected]>
https://invent.kde.org/qt/clang/llvm-project/-/commit/af757e5538a8fdb0df6c9dc774cf176f0117cb12
Git commit 59de680df96e8ed4c283b792b9c1f77d05d071b2 by GitHub (on behalf of Adam Smith) on 05/08/2026 at 14:14..
[CIR] Verify record_align is a non-zero power of two (#214074)
`#cir.record_layout` carries `record_align`, which CIRGen fills from
`ASTRecordLayout::getAlignment()` and consumers read as an
`llvm::Align`. That constructor asserts the value is a non-zero power of
two, so hand-written CIR naming any other alignment aborted the tool
rather than reporting a parse error. A zero tripped the non-zero assert
and a 3 tripped the power-of-two one, both inside `llvm::Align` with no
indication of which attribute was at fault.
Verify the field where it is parsed. Values CIRGen emits are already
well-formed, so this only affects hand-written input.
Assisted-by: Cursor / claude-opus-5
https://invent.kde.org/qt/clang/llvm-project/-/commit/59de680df96e8ed4c283b792b9c1f77d05d071b2
Git commit b650fe5c9c58969501c8e0d537a6a723bfac71f5 by GitHub (on behalf of Gábor Horváth) on 05/08/2026 at 14:15..
[clang][LifetimeSafety] Drop block-local origins at block exit (#213530)
Block-local origins were only discarded in `join`, which the dataflow
driver skips when a successor's in-state is seen for the first time, and
therefore always skips for a block with a single predecessor. In
straight-line code the block-local map was inherited down the whole
chain and never cleared, so it accumulated every expression origin in
the region.
Drop them in a new `exitBlock` hook instead, which runs on every edge.
This also keeps in-states canonical, so state comparison no longer sees
a spurious difference between a first-visit in-state and a joined one.
The per-program-point states the checker queries are unaffected; only
the state propagated across block boundaries changes.
LoanPropagation time below, median of 5-7 interleaved runs of a baseline
and a patched binary. Synthetic cases are from
clang/test/Analysis/LifetimeSafety/benchmark.py:
| case | before | after | delta |
|-------------------------|--------|--------|--------|
| switch_fan_out (N=4000) | 7.62 | 5.35 | -29.8% |
| nested_loops (N=200) | 0.78 | 0.55 | -28.9% |
| merge (N=5000) | 8.58 | 8.21 | -4.3% |
| cycle (N=200) | 164.19 | 162.95 | -0.8% |
Real-world translation units:
| translation unit | before | after | delta |
|---------------------------|--------|--------|--------|
| ByteCode/Disasm.cpp | 22.34 | 18.21 | -18.5% |
| X86/X86ISelLowering.cpp | 49.31 | 42.19 | -14.5% |
| Sema/SemaExprCXX.cpp | 40.01 | 36.78 | -8.1% |
| TargetBuiltins/ARM.cpp | 45.68 | 43.24 | -5.3% |
Gains are concentrated in blocks with a single predecessor, where `join`
never ran. Other phases are unchanged within run-to-run noise, and peak
RSS is unchanged. LoanPropagation is 5-14% of the whole analysis, so its
total effect there is -0.8% to -1.4%.
Assisted-by: Opus 5.0
---------
Co-authored-by: Gabor Horvath <[email protected]>
https://invent.kde.org/qt/clang/llvm-project/-/commit/b650fe5c9c58969501c8e0d537a6a723bfac71f5
Git commit b6a6e310a2d5a7245845ae81e0a9f4b1c496e514 by GitHub (on behalf of Erich Keane) on 05/08/2026 at 14:18..
[CIR]/[OGCG] Fix handling of bool-backed-scoped-enums (#214084)
This patch primarily fixes the case of a scoped enum with a boolean type
in CIR, which we assume is an 'int' type, whereas this one case, that is
not true. Rather than change the Dialect for what amounts to a very rare
case, we've instead opted to just coerce the bool type into a 1 bit int
type, so that all our passes will consider it the same as the rest of
the switches, and not have to special-case the 'bool' types.
AS A DRIVE-BY: I discovered that classic-codegen manages to assert on
llvm::isUIntN in the case where the storage of a range for
GNU-range-switch is less than 7 bits, so bit-int could possibly hit this
too with gnu-range. This patch would fix any case (as the test for the
'shortcut' is for <64).
https://invent.kde.org/qt/clang/llvm-project/-/commit/b6a6e310a2d5a7245845ae81e0a9f4b1c496e514
Git commit ef7992a5a9cd510c11ae9688e64bccf857bb2599 by Aiden Grossman on 05/08/2026 at 15:13..
[𝘀𝗽𝗿] changes to main this commit is based on
Created using spr 1.3.7
[skip ci]
https://invent.kde.org/qt/clang/llvm-project/-/commit/ef7992a5a9cd510c11ae9688e64bccf857bb2599