LLVM/project 1352995 — compiler-rt/cmake config-ix.cmake, compiler-rt/lib/asan CMakeLists.txt

[asan][Darwin] Build the DriverKit C++ slice without exceptions

dc53f17c ("[asan] Adopt sanitizer_common operator-new framework") made
all Darwin dargets compile asan_new_delete.cpp with exception support.
Some Darwin targets (i.e. DriverKit) do not support exceptions, so we
need to compile for those OSes without exception support.

DriverKit is not fully supported upstream yet, so the buildbots didn't
catch this.

Assisted-By: Claude

rdar://190438043
DeltaFile
+24-1compiler-rt/lib/asan/CMakeLists.txt
+5-0compiler-rt/cmake/config-ix.cmake
+29-12 files

LLVM/project 7680be6 — llvm/lib/Target/LoongArch LoongArchExpandPseudoInsts.cpp, llvm/test/CodeGen/LoongArch prera-expand-tlsdesc.mir

LoongArch: Mark the $r1 clobber of PseudoDESC_CALL dead (#232735)

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+29-0llvm/test/CodeGen/LoongArch/prera-expand-tlsdesc.mir
+2-1llvm/lib/Target/LoongArch/LoongArchExpandPseudoInsts.cpp
+31-12 files

LLVM/project 04b524f — mlir/lib/Target/SPIRV/Deserialization DeserializeOps.cpp, mlir/lib/Target/SPIRV/Serialization SerializeOps.cpp

[mlir][SPIR-V] Serialize decorations on FunctionCall results (#233917)

Decorations such as RelaxedPrecision on an OpFunctionCall result were
dropped in both directions (serialize/deserialize)

---------

Co-authored-by: Igor Wodiany <dev at wodiany.com>
DeltaFile
+22-1mlir/test/Target/SPIRV/function-call.mlir
+4-0mlir/lib/Target/SPIRV/Deserialization/DeserializeOps.cpp
+3-0mlir/lib/Target/SPIRV/Serialization/SerializeOps.cpp
+29-13 files

LLVM/project fe93783 — llvm/lib/Target/AMDGPU AMDGPUCodeGenPrepare.cpp, llvm/test/CodeGen/AMDGPU amdgpu-codegenprepare-fmul-legacy.ll

Update for comments
DeltaFile
+28-21llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
+1-6llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-fmul-legacy.ll
+29-272 files

LLVM/project e3b261a — llvm/lib/Target/AMDGPU AMDGPUCodeGenPrepare.cpp, llvm/test/CodeGen/AMDGPU amdgpu-codegenprepare-fmul-legacy.ll

[AMDGPU] Fold fmul with zero checks to fmul.legacy

Recognize f32 multiplication with zero checks in AMDGPUCodeGenPrepare,
including fabs/fneg wrappers.

Example:
```
  (x == 0 || y == 0) ? +0.0 : x * y
==>
  llvm.amdgcn.fmul.legacy(x, y)
```
DeltaFile
+21-107llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-fmul-legacy.ll
+77-0llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
+98-1072 files

LLVM/project ecb0070 — llvm/test/CodeGen/AMDGPU amdgpu-codegenprepare-fmul-legacy.ll

[AMDGPU] Add fmul.legacy select fold tests. NFC

Add AMDGPUCodeGenPrepare tests for folding a select guarded by zero
checks into llvm.amdgcn.fmul.legacy, including negative tests and min
cases for future work.
DeltaFile
+1,069-0llvm/test/CodeGen/AMDGPU/amdgpu-codegenprepare-fmul-legacy.ll
+1,069-01 files

LLVM/project 8cbd05e — clang/test/CodeGen/RISCV rvp-intrinsics.c, clang/test/Sema riscv-psati-width-out-of-range.c

[RISCV][P-ext] Add scalar sati/usati intrinsics (#233769)

Add the scalar Saturation intrinsics:
https://github.com/riscv/riscv-p-spec/blob/master/P-ext-intrinsics.adoc#saturation

- `__riscv_sati_i32`, `__riscv_usati_u32`
- `__riscv_sati_i64`, `__riscv_usati_u64` (RV64 only)

`llvm.riscv.sati`/`llvm.riscv.usati` are overloaded on the integer
type. RV32 and the i64 forms select `sati`/`usati` directly. RV64 has
no 32-bit scalar forms, so the i32 intrinsics use `psati.w`/`pusati.w`
on the low word.
DeltaFile
+56-0llvm/test/CodeGen/RISCV/rvp-scalar.ll
+56-0clang/test/CodeGen/RISCV/rvp-intrinsics.c
+41-0clang/test/Sema/riscv-psati-width-out-of-range.c
+36-0llvm/test/CodeGen/RISCV/rvp-scalar-rv64.ll
+20-2llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+20-0cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c
+229-25 files not shown
+275-211 files

LLVM/project 837f998 — clang/lib/Driver Driver.cpp, clang/test/Driver cl-outputs.c

[clang-cl] Don't count linker inputs against /Fo and /Fa (#232611)

The /Fo and /Fa checks reject a file name when there is more than one
input. But the input list also holds object files, libraries, and linker
options such as -Xlinker, which go straight to the linker and never get
an output named by /Fo or /Fa. So

  clang-cl /c foo.c /Fofoo.obj -Xlinker -bar

failed with "cannot specify '/Fofoo.obj' when compiling multiple source
files". MSVC's cl.exe also accepts .obj and .lib inputs next to
/Fo<file>.

Count only the inputs that get compiled.

Fixes #216085.
DeltaFile
+18-20clang/lib/Driver/Driver.cpp
+8-0clang/test/Driver/cl-outputs.c
+26-202 files

LLVM/project 4babb62 — llvm/lib/Transforms/IPO InstrumentorConfigFile.cpp, llvm/test/Instrumentation/Instrumentor check_descriptions.ll

[Instrumentor] Suppress warnings for description fields in instrumentor config (#233983)

Instrumentation opportunity description fields (`PROPERTY.description`)
raise warnings despite their presence in autogenerated instrumentor
configurations. This patch fixes that.
DeltaFile
+64-0llvm/test/Instrumentation/Instrumentor/check_descriptions.ll
+1-1llvm/lib/Transforms/IPO/InstrumentorConfigFile.cpp
+65-12 files

LLVM/project 38d7ac0 — llvm/lib/Frontend/OpenMP OMPContext.cpp

Try the last superset first in the tie-break

Flang reruns the selection for each runtime alternative, and comparing
every tied pair made that slow when many tied variants are subsets of a
later one. Tied variants often share a superset, so check the last one
found before scanning all of them.
DeltaFile
+12-5llvm/lib/Frontend/OpenMP/OMPContext.cpp
+12-51 files

LLVM/project eabd581 — clang/docs/CIR ABILowering.md, clang/lib/CIR/Dialect/Transforms CIRABIClassifierX86_64.cpp CIRABIClassifier.cpp

[CIR][NFC] Refactor calling convention lowering classification (#233639)

This change refactors the CIR calling convention lowering pass to move
classification into a `CIRABIClassifier` class and creates a subclass of
that to perform target-specific handling.

In order to make review easier, I have left as much code as possible in
its previous location. I'll follow up with another PR that moves
definitions into the file where is logically belongs.

Assisted-by: Cursor / claude-opus-5.5
DeltaFile
+93-152clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
+194-0clang/lib/CIR/Dialect/Transforms/CIRABIClassifier.h
+144-0clang/lib/CIR/Dialect/Transforms/CIRABIClassifier.cpp
+87-0clang/lib/CIR/Dialect/Transforms/CIRABIClassifierX86_64.cpp
+5-0clang/docs/CIR/ABILowering.md
+1-1clang/test/CIR/Transforms/abi-lowering/x86_64-variadic-nyi.cir
+524-1532 files not shown
+527-1548 files

LLVM/project 67e2b28 — clang/lib/CodeGen CGExpr.cpp, clang/test/CodeGen attr-sized-by-for-pointers.c attr-counted-by-ptrauth.c

[Clang][counted_by] Don't re-evaluate the base of a counted_by pointer access for -fsanitize=array-bounds (#232228)

When indexing a 'counted_by' pointer field with -fsanitize=array-bounds,
EmitCountedByBoundsChecking was handed an invalid address and re-emitted
the field's l-value to locate the count. That re-evaluated the struct base,
duplicating its side-effects:

  struct p { int count; int *buf __counted_by(count); };
  struct p *q;
  int f(int i) { return q++->buf[i]; }   // 'q' incremented twice
  int g(int i) { return get()->buf[i]; } // 'get' called twice

i.e. enabling the sanitizer changed the program's behavior.

Emit the subscript base exactly as before, but have ScalarExprEmitter
record the l-value it loads the 'counted_by' field from, and pass that
address to the bounds check. The base is emitted the same way with
and without the sanitizer, so the load keeps its debug location,
ptrauth authentication, 'align_value' assumption, and

    [4 lines not shown]
DeltaFile
+145-26clang/test/CodeGen/attr-counted-by-base-exprs.c
+48-13clang/lib/CodeGen/CGExpr.cpp
+57-0clang/test/CodeGen/attr-counted-by-debug-info.c
+27-0clang/test/CodeGen/attr-counted-by-align-value.c
+12-12clang/test/CodeGen/attr-sized-by-for-pointers.c
+24-0clang/test/CodeGen/attr-counted-by-ptrauth.c
+313-515 files not shown
+358-7711 files

LLVM/project b6f690e — clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp

[CIR] Fix GCC ambiguity after #232835 (#233734)

After #232835, some GCC versions fail to compile CIR due to an ambiguity
in a call to `mlir::LLVM::InsertValueOp::create`. Fix this ambiguity by
explicitly specifying the last argument.

---------

Signed-off-by: Steffen Holst Larsen <sholstla at amd.com>
Co-authored-by: Akimasa Watanuki <mencotton0410 at gmail.com>
DeltaFile
+1-1clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+1-11 files

LLVM/project 2a9afa5 — llvm/test/CodeGen/AVR alloca-tiny.ll alloca.ll

[AVR][NFC] Merge alloca-tiny.ll into alloca.ll (#233921)

Follow-up to https://github.com/llvm/llvm-project/pull/230226.
DeltaFile
+526-29llvm/test/CodeGen/AVR/alloca.ll
+0-104llvm/test/CodeGen/AVR/alloca-tiny.ll
+526-1332 files

LLVM/project 02ab149 — mlir/lib/Dialect/SCF/Transforms LoopSpecialization.cpp, mlir/test/Dialect/SCF transform-ops.mlir transform-ops-invalid.mlir

[mlir][scf] support front peeling for unsigned loop  (#233238)

add front peeling support for unsigned loop and add tests.

we branch out if we have a unsigned loop, if constants we check and bail
out if the loop has at most one iteration else we compute the split
bound as `arith.minui(arith.addi(lb, step), ub)`, and they are compared
unsigned.

from #231100

claude helped me with the tests
DeltaFile
+110-19mlir/test/Dialect/SCF/for-loop-peeling-front.mlir
+54-43mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
+68-0mlir/test/Dialect/SCF/transform-ops-invalid.mlir
+2-4mlir/test/Dialect/SCF/transform-ops.mlir
+234-664 files

LLVM/project c2a3b9f — llvm/lib/IR ProfDataUtils.cpp, llvm/lib/Passes PassesOptions.td PassBuilderPipelines.cpp

[ProfCheck] Disable zero-weight elision when enabling in pipelines (#233354)

If we do not disable zero branch weight elision when
enable-profcheck-in-pipeline is set, we end up with false positives
where the verifier flags missing weights that have been purposefully
elided.
DeltaFile
+12-2llvm/lib/IR/ProfDataUtils.cpp
+4-2llvm/lib/Passes/PassBuilderPipelines.cpp
+0-2llvm/lib/Passes/PassesOptions.td
+16-63 files

LLVM/project dc0913b — clang/lib/Parse ParseDecl.cpp, clang/lib/Sema SemaType.cpp

[BoundsSafety] Address review feedback on late-parsed counted_by types

Fixes for late-parsed counted_by-family type attributes:

- A block-pointer member hands its late attributes to the block-pointer chunk
  instead of asserting, so Sema rejects them like a non-pointer type.
- Late-parse type attributes only in member declarators. Function-pointer
  parameters, type names in `sizeof`, and other abstract declarators nested in a
  member are parsed eagerly. They used to be resolved in struct scope, and a
  paren that turned out to be a parameter list asserted.
- An unnamed struct hands its attributes to the enclosing record only when it's
  declared directly in a record, not when it's in a statement expression.
- In declaration-specifier position, only type attributes are late-parsed.
  Declaration attributes such as guarded_by are parsed eagerly again, so they
  apply to every declarator.
- Reject an attribute on a function return type in the late path too.
- Complete a node whose argument fails to parse with a RecoveryExpr and mark the
  fields invalid, rather than leave a CountAttributedType without a count.
- Report a rejected declaration-specifier attribute once rather than once per

    [7 lines not shown]
DeltaFile
+59-62clang/lib/Sema/SemaType.cpp
+49-30clang/lib/Parse/ParseDecl.cpp
+42-0clang/test/Sema/attr-counted-by-late-parsed-non-member.c
+41-0clang/test/PCH/attr-counted-by-late-parsed-parse-error.c
+36-0clang/test/Sema/attr-counted-by-late-parsed-block-pointer.c
+32-0clang/test/Sema/attr-counted-by-late-parsed-rejected-once.c
+259-927 files not shown
+369-10413 files

LLVM/project 43cf479 — clang/test/Modules bounds-safety-attributed-type-late-parsed.c, clang/test/PCH bounds-safety-attributed-type-late-parsed.c

[BoundsSafety][test] Add late-parsed counted_by type-attribute coverage

New tests exercising the late-parse fill-in mechanism:
  - Sema/attr-counted-by-weird-type-positions{,-late-parsed}.c: counted_by
    in assorted type positions, nested pointers, and rejection cases.
  - Sema/attr-bounds-safety-function-ptr-param.c: attributes on
    function-pointer-typed members.
  - Modules/ and PCH/ bounds-safety-attributed-type-late-parsed: the
    resolved type round-trips through serialization.

  - Sema/attr-counted-by-late-parsed-regressions.c: guards against the
    double-free on a nested-record decl-spec attribute and the null-count
    escape on a free-function parameter.
DeltaFile
+456-0clang/test/Sema/attr-counted-by-weird-type-positions-late-parsed.c
+454-0clang/test/Sema/attr-counted-by-weird-type-positions.c
+173-0clang/test/Sema/attr-bounds-safety-function-ptr-param.c
+111-0clang/test/Modules/bounds-safety-attributed-type-late-parsed.c
+104-0clang/test/Sema/attr-counted-by-late-parsed-regressions.c
+69-0clang/test/PCH/bounds-safety-attributed-type-late-parsed.c
+1,367-04 files not shown
+1,517-010 files

LLVM/project 80a3146 — clang/include/clang/Sema Sema.h, clang/lib/Parse ParseDecl.cpp

[BoundsSafety] Don't orphan a shared counted_by node when one declarator nests it

A late-parsed counted_by-family attribute in declaration-specifier position is
shared by every declarator in the declaration, so they share one incomplete
CountAttributedType. When one declarator nests the node, as `*b` does in
`IP __counted_by(n) a, *b;`, it is rejected and the node is marked rejected.
The completion pass then skipped the node for every declarator, so `a` kept a
CountAttributedType without a count and crashed on use in
FieldDecl::findCountedByField.

Make the rejection apply to the declarator only. The parser checks and clears
the mark after each declarator, and doesn't pair a rejected declarator's field
with the attribute. The completion pass skips an attribute with no fields left,
still without parsing its argument.

Assisted-by: Opus 5.5
DeltaFile
+32-0clang/test/Sema/attr-counted-by-late-parsed-regressions.c
+17-6clang/lib/Parse/ParseDecl.cpp
+8-6clang/include/clang/Sema/Sema.h
+57-123 files

LLVM/project 7a751a9 — clang/lib/Parse ParseDecl.cpp, clang/lib/Sema SemaType.cpp

[BoundsSafety] Create incomplete counted_by types and wire up the refill

Activate late parsing for the counted_by family (counted_by / sized_by and
their _or_null variants) in type-attribute position, under
-fexperimental-late-parse-attributes, on top of the type-attribute handling,
the validation helper and the refill machinery added in the previous commits.

When such an attribute is seen during type construction and its argument
can't be resolved yet, build the CountAttributedType immediately with
getIncompleteCountAttributedType and record it against the enclosing record;
its count expression is filled in at the closing brace via the refill logic.
Because enclosing types refer to the node by pointer, completing it in place
leaves the type chain untouched.
DeltaFile
+189-20clang/lib/Parse/ParseDecl.cpp
+29-50clang/test/Sema/attr-counted-by-late-parsed-struct-ptrs.c
+14-50clang/test/Sema/attr-counted-by-or-null-late-parsed-struct-ptrs.c
+60-0clang/lib/Sema/SemaType.cpp
+11-42clang/test/Sema/attr-sized-by-or-null-late-parsed-struct-ptrs.c
+10-42clang/test/Sema/attr-sized-by-late-parsed-struct-ptrs.c
+313-20411 files not shown
+462-31617 files

LLVM/project 76b59a2 — clang/lib/Sema SemaType.cpp SemaDeclAttr.cpp

Remove deprecated declaration-position counted_by attribute handler
DeltaFile
+0-38clang/lib/Sema/SemaDeclAttr.cpp
+3-8clang/lib/Sema/SemaType.cpp
+3-462 files

LLVM/project d29f5f8 — clang/lib/Sema SemaBoundsSafety.cpp

Fix test failures in -fexperimental-bounds-safety
DeltaFile
+2-2clang/lib/Sema/SemaBoundsSafety.cpp
+2-21 files

LLVM/project 8c92155 — clang/include/clang/Basic DiagnosticSemaKinds.td, clang/lib/Sema SemaBoundsSafety.cpp

[BoundsSafety] Reject a second bounds attribute on the same pointer

A pointer with two counted_by-family attributes, as in
`int *__counted_by(n) __sized_by(m) p;`, got one CountAttributedType stacked on
another. Reject the second attribute with
err_counted_by_on_bounds_attributed_type, which names both attributes.

Assisted-by: Opus 5.5
DeltaFile
+58-0clang/test/Sema/attr-counted-by-multiple-on-pointer.c
+13-0clang/lib/Sema/SemaBoundsSafety.cpp
+4-0clang/include/clang/Basic/DiagnosticSemaKinds.td
+75-03 files

LLVM/project 83cbe76 — lld/MachO SyntheticSections.cpp, lld/test/MachO chained-fixups-page-boundary.s

[lld-macho] Error out on chained fixups straddling a page boundary (#233911)

These don't get relocated by dyld, leading to mislinks.

Fixes #233906.
DeltaFile
+32-0lld/test/MachO/chained-fixups-page-boundary.s
+14-3lld/MachO/SyntheticSections.cpp
+46-32 files

LLVM/project 2e7194f — llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer VecUtils.h, llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Passes LoadStoreVec.h

[SandboxVec][LoadStoreVec] Support constant vectors of mixed types (#224890)

`createConstantVector()` previously packed the constant store operands
as-is, which only worked when every store had the same element type.
This patch adds support for mixed type constant vectorization via the
following changes:
- `VecUtils::getCombinedVectorTypeFor()`: Compute the GCD of the
bitwidths of the chain elements. Return the type `<N x iM>` where M is
the GCD. This guarantees that all chain elements will be splittable into
equi-sized slices.
- Introduce `Constant *LoadStoreVec::getEquivalentConstantWithType` to
emit a chain of casts.
- Reinterpret each constant's bits as the combined vector type. Bail out
when a constant cannot be reinterpreted, such as a non-integral pointer
or a relocatable address that needs splitting.

Assisted by Cursor.
DeltaFile
+414-4llvm/test/Transforms/SandboxVectorizer/Passes/LoadStoreVec/load_store_vec_mixed_types.ll
+109-11llvm/lib/Transforms/Vectorize/SandboxVectorizer/Passes/LoadStoreVec.cpp
+58-13llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h
+18-0llvm/lib/SandboxIR/Constant.cpp
+13-2llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/Passes/LoadStoreVec.h
+12-0llvm/unittests/SandboxIR/SandboxIRTest.cpp
+624-304 files not shown
+638-3310 files

LLVM/project 9750199 — clang/lib/CIR/Dialect/IR CMakeLists.txt

[CIR][NFC] Add missing dependency for CIR dialect (#234042)

https://github.com/llvm/llvm-project/pull/229494 introduced a build
dependency on TargetParser in the MLIRCIR component but didn't add it as
a link component. This causes link failures when building with shared
libraries. This change adds the link component.
DeltaFile
+3-0clang/lib/CIR/Dialect/IR/CMakeLists.txt
+3-01 files

LLVM/project 88740df — compiler-rt/cmake/Modules CompilerRTDarwinUtils.cmake

[compiler-rt][Darwin] Disable the armv7* sanitizer slices for watchOS

armv7* are no longer supported for watchOS, stop building them.

Co-Authored-By: Claude

rdar://182837745
DeltaFile
+2-2compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
+2-21 files

LLVM/project 96a31e7 — clang/lib/CIR/FrontendAction CIRGenAction.cpp

[CIR] Make sure we properly set the VFS in ClangIR (#234040)

CIR pre-commit CI started failing due to #233475, which is because
ClangIR failed to set up the virtual file system. There are a handful of
locations that look about right for this, however setting it right here,
immediately after the diagnostic-handler is set, best mirrors what
CodeGenAction.cpp does.

This should unblock CI for ClangIR on the
inline-asm-backend-diagnostic.c test.
DeltaFile
+5-0clang/lib/CIR/FrontendAction/CIRGenAction.cpp
+5-01 files

LLVM/project 6ba6ec4 — compiler-rt/cmake config-ix.cmake

[compiler-rt][Darwin] Support building sanitizers for visionOS

COMPILER_RT_ENABLE_XROS previously only enabled builtins. Teach
config-ix.cmake about the xros/xrossim platforms so the
sanitizer runtimes are configured for them as well.

Co-Authored-By: Claude
rdar://190575578
DeltaFile
+24-1compiler-rt/cmake/config-ix.cmake
+24-11 files

LLVM/project ae9a005 — clang/lib/Sema SemaDeclAttr.cpp SemaType.cpp, clang/test/AST attr-sized-by-struct-ptrs.c attr-counted-by-struct-ptrs.c

[BoundsSafety] Handle the counted_by family as a type attribute

counted_by / sized_by (and their _or_null variants) were handled as a
declaration-position attribute through handleCountedByAttrField.

Build the type during type construction instead and properly handle as a
type-position attribute. Building the node in type position also allows
the new way of late-parsing for type attributes: creates a type node
in place and fills it in once late parsing is done, which will be
enabled in the follow-up commits.

Assisted-by: Opus 5.5
DeltaFile
+33-116clang/lib/Sema/SemaBoundsSafety.cpp
+108-2clang/lib/Sema/SemaType.cpp
+53-0clang/test/Sema/attr-counted-by-return-type.c
+21-27clang/lib/Sema/SemaDeclAttr.cpp
+0-26clang/test/AST/attr-counted-by-struct-ptrs.c
+0-24clang/test/AST/attr-sized-by-struct-ptrs.c
+215-19511 files not shown
+307-27517 files