LLVM/project ea0b65dmlir/lib/Dialect/Arith/IR ArithOps.cpp, mlir/test/Dialect/Arith canonicalize.mlir

[mlir][arith] Fix crash in AddUIExtendedOp::fold when operand is ub.poison (#183596)

When `constFoldBinaryOp<IntegerAttr>` is called with a `ub.poison`
operand, it propagates the poison attribute as its result. The fold
method for `arith.addui_extended` then attempted to cast this result to
`TypedAttr` via `llvm::cast<TypedAttr>(sumAttr)`, which failed with an
assertion because `PoisonAttr` does not implement the `TypedAttr`
interface.

Fix this by checking whether the folded sum is a poison attribute before
the cast. When poison is detected, it is propagated to both the sum and
overflow results.

Fixes #181534
DeltaFile
+22-0mlir/test/Dialect/Arith/canonicalize.mlir
+6-0mlir/lib/Dialect/Arith/IR/ArithOps.cpp
+28-02 files

LLVM/project c4e2891mlir/lib/Dialect/Vector/IR VectorOps.cpp, mlir/test/Dialect/Vector canonicalize.mlir

[MLIR][Vector] Fix crash in BitCastOp::fold for index element type (#183572)

`BitCastOp::fold` called `Type::getIntOrFloatBitWidth()` on the source
element type without first verifying it satisfies `isIntOrFloat()`. When
the source vector has `index` element type (e.g. `vector<16xindex>`),
the assertion `only integers and floats have a bitwidth` fires.

Add an `srcElemType.isIntOrFloat()` guard to the condition so that the
constant-folding path is skipped for non-integer/float element types.

Fixes #177835
DeltaFile
+13-0mlir/test/Dialect/Vector/canonicalize.mlir
+1-1mlir/lib/Dialect/Vector/IR/VectorOps.cpp
+14-12 files

LLVM/project e05b6cbmlir/include/mlir/Dialect/SCF/TransformOps SCFTransformOps.td, mlir/lib/Dialect/SCF/TransformOps SCFTransformOps.cpp

[SCF] allow indexing operations for loop coalesceing (#183180)

Currently if there are operations between the loops we get a dominance
issue as the delinearlized index is added after the operations. This PR
fixes that.

For testing we also add a transform pattern that makes a direct call to
coalesceLoops as the existing pattern calls
coalescePerfectlyNestedSCFForLoops which does not consider the loop nest
perfectly nested if there are operations between them which is safer for
that usage.

Co-authored-by: Claude Opus 4.6 <noreply at anthropic.com>
DeltaFile
+49-0mlir/test/Dialect/SCF/transform-op-coalesce.mlir
+46-0mlir/lib/Dialect/SCF/TransformOps/SCFTransformOps.cpp
+28-0mlir/include/mlir/Dialect/SCF/TransformOps/SCFTransformOps.td
+2-1mlir/lib/Dialect/SCF/Utils/Utils.cpp
+125-14 files

LLVM/project 92b64celibunwind/include libunwind.h, libunwind/src Registers.hpp

[libunwind][PAC] Resign explicitly in loadAndAuthenticateLinkRegister

Explicitly call `ptrauth_auth_and_resign` to prevent separate auth and
sign intrinsics being emitted by Clang frontend.

Even if replacing separate "auth" and "sign" operations with a safer "resign"
would be implemented in LLVM optimizer pipeline, Clang frontend treats zero
pointer as a special case w.r.t. PtrAuth. This results in such combination of
an explicit authentication and an implicit signing to be emitted as a hard-to-
simplify comparison against zero along these lines:

    tmp = auth(input)
    if (tmp == 0)
      *output = sign(tmp)
    else
      *output = 0
DeltaFile
+14-6libunwind/src/Registers.hpp
+3-1libunwind/include/libunwind.h
+17-72 files

LLVM/project 8702c6bclang/test/Driver crash-report-no-integrated-cc1.c, clang/tools/driver driver.cpp

[clang] Fix driver resignaling when cc1 runs out-of-process (#183560)

When cc1 runs out-of-process and crashes, sys::ExecuteAndWait returns -2
for signal-killed children. The resignaling block added in 15488a7f78ce
only handled CommandRes > 128, so the driver would exit normally with
code 1 instead of dying by signal.
DeltaFile
+8-0clang/test/Driver/crash-report-no-integrated-cc1.c
+7-0clang/tools/driver/driver.cpp
+15-02 files

LLVM/project bf8e006clang/docs ClangIRCleanupAndEHDesign.md

[CIR][docs] Fix table of contents for CIR eh and cleanups doc (#183594)

When this document was converted from rst to markdown, the contents
didn't get updated correctly.
DeltaFile
+5-2clang/docs/ClangIRCleanupAndEHDesign.md
+5-21 files

LLVM/project b8618ffclang/lib/AST InferAlloc.cpp, clang/test/CodeGenCXX alloc-token-pointer.cpp

[AllocToken] [Clang] Fix type inference for atomic types (#183571)

When evaluating whether an allocated type contains a pointer to generate
the `alloc_token` metadata, `typeContainsPointer` incorrectly stopped
recursion upon encountering an `AtomicType`. This resulted in types like
`_Atomic(int *)` (or `std::atomic<int *>` under libc++) being
incorrectly evaluated as not containing a pointer.

Add support for `AtomicType` in `typeContainsPointer` by recursively
checking the contained type.

Add tests for structs containing `_Atomic(int *)` and `_Atomic(int)`.
DeltaFile
+22-0clang/test/CodeGenCXX/alloc-token-pointer.cpp
+5-0clang/lib/AST/InferAlloc.cpp
+27-02 files

LLVM/project a17ab73clang/include/clang/CIR/Dialect/Builder CIRBaseBuilder.h, clang/lib/CIR/CodeGen CIRGenBuiltinAArch64.cpp

[CIR][AArch64] Add lowering for vaba_* and vabd_* builtins (1/N)

Add CIR lowering for the following AdvSIMD (NEON) intrinsic families:

* vabd_*  – Absolute difference
  https://arm-software.github.io/acle/neon_intrinsics/advsimd.html#absolute-difference

* vaba_*  – Absolute difference and accumulate
  https://arm-software.github.io/acle/neon_intrinsics/advsimd.html#absolute-difference-and-accumulate

Tests for these intrinsics were split out from:
  test/CodeGen/AArch64/neon-intrinsics.c

and moved to:
  test/CodeGen/AArch64/neon/intrinsics.c

The following helper hooks were adapted from the ClangIR project:
  * getNeonType, emitNeonCall, emitNeonCallToOp.


    [4 lines not shown]
DeltaFile
+213-0clang/test/CodeGen/AArch64/neon/intrinsics.c
+0-174clang/test/CodeGen/AArch64/neon-intrinsics.c
+136-0clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
+3-0clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h
+352-1744 files

LLVM/project f6917faclang/lib/Lex Lexer.cpp

[Clang][Lexer][Performance] Optimize Lexer whitespace skipping logic (#180819)

... by extracting the check for space character and marking it as
`LLVM_LIKELY`. This increases performance because the space is by far
the most common horizontal character, so in most cases, this change
allows to replace a lookup table check with a simple comparison,
reducing latency and helping the cache.

This does not reduce instruction count, as a lookup table and a
comparison are both a single instruction. However, it _does_ reduce
cycles in a consistent manner, around `0.2` - `0.3`%:
[benchmark](https://llvm-compile-time-tracker.com/compare.php?from=3192fe2c7b08912cc72c86471a593165b615dc28&to=faa899a6ce518c1176f2bf59f199eb42e59d840e&stat=cycles).
I tested this locally and am able to confirm this is not noise (at least
not entirely, it does feel weird that this impacts `O3` more than
`O0`...), as I achieved almost `2`% faster PP speed in my tests.
DeltaFile
+6-4clang/lib/Lex/Lexer.cpp
+6-41 files

LLVM/project 3161652llvm/docs/TableGen ProgRef.rst, llvm/lib/TableGen TGParser.cpp TGParser.h

[TableGen] Add let append/prepend syntax for field concatenation
DeltaFile
+219-0llvm/test/TableGen/let-append.td
+77-7llvm/lib/TableGen/TGParser.cpp
+45-2llvm/docs/TableGen/ProgRef.rst
+10-4llvm/lib/TableGen/TGParser.h
+13-0llvm/test/TableGen/let-prepend-error.td
+13-0llvm/test/TableGen/let-append-error.td
+377-131 files not shown
+390-137 files

LLVM/project 27905b1libc/shared/math f16sqrtf128.h, libc/src/__support/math f16sqrtf128.h CMakeLists.txt

[libc][math] Refactor f16sqrtf128 to Header Only. (#183542)

closes  #175328
part of https://github.com/llvm/llvm-project/issues/147386
DeltaFile
+33-0libc/src/__support/math/f16sqrtf128.h
+32-0libc/shared/math/f16sqrtf128.h
+13-1utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+12-0libc/src/__support/math/CMakeLists.txt
+7-0libc/test/shared/shared_math_test.cpp
+2-4libc/src/math/generic/f16sqrtf128.cpp
+99-53 files not shown
+102-79 files

LLVM/project 3490d28lldb/packages/Python/lldbsuite/test decorators.py, lldb/test/API/functionalities/postmortem/FreeBSD-Kernel-Core/tools libfbsdvmcore-hacks.patch lldb-minimize-processes.patch

[lldb] Remove last references to fbsdvm (#183418)

Support was removed in #181283
(a8cd1ac7058efdf7a9be823182da884243ca6c0b)
DeltaFile
+0-323lldb/test/API/functionalities/postmortem/FreeBSD-Kernel-Core/tools/libfbsdvmcore-hacks.patch
+0-85lldb/test/API/functionalities/postmortem/FreeBSD-Kernel-Core/tools/lldb-minimize-processes.patch
+0-45lldb/test/API/functionalities/postmortem/FreeBSD-Kernel-Core/tools/README.rst
+0-36lldb/test/API/functionalities/postmortem/FreeBSD-Kernel-Core/tools/copy-sparse.py
+0-11lldb/test/API/functionalities/postmortem/FreeBSD-Kernel-Core/tools/test.script
+0-4lldb/packages/Python/lldbsuite/test/decorators.py
+0-5042 files not shown
+0-5098 files

LLVM/project bd50861llvm/test/CodeGen/AMDGPU llvm.exp10.f64.ll llvm.exp.f64.ll, llvm/test/CodeGen/RISCV clmul.ll clmulr.ll

Merge branch 'main' into users/xlauko/_tablegen_add_let_append_prepend_syntax_for_field_concatenation
DeltaFile
+24,655-20,149llvm/test/CodeGen/RISCV/clmul.ll
+12,512-13,372llvm/test/CodeGen/RISCV/clmulr.ll
+12,350-13,322llvm/test/CodeGen/RISCV/clmulh.ll
+16,004-0llvm/test/MC/AMDGPU/gfx13_asm_vopd3.s
+11,178-0llvm/test/CodeGen/AMDGPU/llvm.exp10.f64.ll
+10,242-0llvm/test/CodeGen/AMDGPU/llvm.exp.f64.ll
+86,941-46,8432,688 files not shown
+246,854-128,5362,694 files

LLVM/project e3735celibc/include/llvm-libc-macros float16-macros.h, libc/test/shared CMakeLists.txt

[libc][math] Disable float16 on Clang 11 and older (#183574)

This also reverts
https://github.com/llvm/llvm-project/commit/c5d6feb3152bf39d820935df0d0490f90364d44c
DeltaFile
+0-4libc/test/shared/CMakeLists.txt
+2-1libc/include/llvm-libc-macros/float16-macros.h
+2-52 files

LLVM/project 186c54ellvm/lib/Target/SPIRV SPIRVLegalizeZeroSizeArrays.cpp, llvm/test/CodeGen/SPIRV legalize-zero-size-arrays-extern.ll

[SPIRV] Fix legalization of zero-size external global (#183130)

`getInitializer` asserts if there's no initializer, so check first.

I found this compiling some `liboffload` unit tests.

---------

Signed-off-by: Nick Sarnie <nick.sarnie at intel.com>
DeltaFile
+17-0llvm/test/CodeGen/SPIRV/legalize-zero-size-arrays-extern.ll
+2-1llvm/lib/Target/SPIRV/SPIRVLegalizeZeroSizeArrays.cpp
+19-12 files

LLVM/project 2f75a63clang/docs AddressSanitizer.rst, llvm/include/llvm/ADT DenseMap.h

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+9-0llvm/include/llvm/ADT/DenseMap.h
+5-2clang/docs/AddressSanitizer.rst
+2-4mlir/tools/mlir-tblgen/OpDocGen.cpp
+16-63 files

LLVM/project 51fa583llvm/include/llvm/ADT DenseMap.h, mlir/tools/mlir-tblgen OpDocGen.cpp

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+9-0llvm/include/llvm/ADT/DenseMap.h
+2-4mlir/tools/mlir-tblgen/OpDocGen.cpp
+11-42 files

LLVM/project 8a08ea9clang/lib/AST ExprConstant.cpp

Use helper function to compute ColMajorIdx in MatrixExprEvaluator::VisitInitListExpr
DeltaFile
+2-3clang/lib/AST/ExprConstant.cpp
+2-31 files

LLVM/project d9a45dcllvm/lib/Transforms/IPO FunctionAttrs.cpp, llvm/test/Transforms/FunctionAttrs nofpclass-callsite-prop.ll nonnull.ll

FunctionAttrs: Propagate nofpclass from callsite arguments (#183277)

DeltaFile
+86-0llvm/test/Transforms/FunctionAttrs/nofpclass-callsite-prop.ll
+26-13llvm/lib/Transforms/IPO/FunctionAttrs.cpp
+1-1llvm/test/Transforms/FunctionAttrs/nonnull.ll
+113-143 files

LLVM/project bdddc16mlir/lib/Target/LLVM/XeVM Target.cpp

[MLIR][XeVM] Enable some SPIRV extensions by default for XeVM target. (#182399)

Enable,
SPV_EXT_relaxed_printf_string_address_space
SPV_INTEL_cache_controls
SPV_INTEL_variable_length_array
DeltaFile
+81-19mlir/lib/Target/LLVM/XeVM/Target.cpp
+81-191 files

LLVM/project e9a9a47llvm/include/llvm/ADT StringRef.h, llvm/test/CodeGen/X86 funnel-shift-i512.ll zero_extend_vector_inreg.ll

rebase

Created using spr 1.3.7
DeltaFile
+5,445-0llvm/test/CodeGen/X86/funnel-shift-i512.ll
+1,094-1,106llvm/test/CodeGen/X86/zero_extend_vector_inreg.ll
+913-920llvm/include/llvm/ADT/StringRef.h
+874-890llvm/test/CodeGen/X86/zero_extend_vector_inreg_of_broadcast.ll
+0-1,480mlir/test/Dialect/X86Vector/vector-contract-to-packed-type-dotproduct.mlir
+1,480-0mlir/test/Dialect/X86/vector-contract-to-packed-type-dotproduct.mlir
+9,806-4,396567 files not shown
+32,570-20,105573 files

LLVM/project 222e741llvm/include/llvm/ADT StringRef.h, llvm/test/CodeGen/X86 funnel-shift-i512.ll zero_extend_vector_inreg.ll

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+5,445-0llvm/test/CodeGen/X86/funnel-shift-i512.ll
+1,094-1,106llvm/test/CodeGen/X86/zero_extend_vector_inreg.ll
+913-920llvm/include/llvm/ADT/StringRef.h
+874-890llvm/test/CodeGen/X86/zero_extend_vector_inreg_of_broadcast.ll
+0-1,480mlir/test/Dialect/X86Vector/vector-contract-to-packed-type-dotproduct.mlir
+1,480-0mlir/test/Dialect/X86/vector-contract-to-packed-type-dotproduct.mlir
+9,806-4,396567 files not shown
+32,570-20,105573 files

LLVM/project 7497a61llvm/include/llvm/ADT StringRef.h, llvm/test/CodeGen/X86 funnel-shift-i512.ll zero_extend_vector_inreg.ll

-parenthesis

Created using spr 1.3.7
DeltaFile
+5,445-0llvm/test/CodeGen/X86/funnel-shift-i512.ll
+1,094-1,106llvm/test/CodeGen/X86/zero_extend_vector_inreg.ll
+913-920llvm/include/llvm/ADT/StringRef.h
+874-890llvm/test/CodeGen/X86/zero_extend_vector_inreg_of_broadcast.ll
+1,480-0mlir/test/Dialect/X86/vector-contract-to-packed-type-dotproduct.mlir
+0-1,480mlir/test/Dialect/X86Vector/vector-contract-to-packed-type-dotproduct.mlir
+9,806-4,396567 files not shown
+32,570-20,105573 files

LLVM/project ab3f7cbclang/test/SemaCXX constexpr-x86-avx512f-builtins.cpp constexpr-x86-sse2-builtins.cpp

[NFC][clang][X86] Add tests for NaN,Denormal,Inf and rounding modes (#180013)

Follow up: #171966
DeltaFile
+128-0clang/test/SemaCXX/constexpr-x86-avx512f-builtins.cpp
+116-0clang/test/SemaCXX/constexpr-x86-sse2-builtins.cpp
+92-0clang/test/SemaCXX/constexpr-x86-avx-builtins.cpp
+336-03 files

LLVM/project cc1f66dclang/lib/CIR/Dialect/Transforms FlattenCFG.cpp, clang/test/CIR/Transforms flatten-cleanup-scope-eh.cir flatten-cleanup-scope-nyi.cir

[CIR] Implement flattening of nested EH cleanup scopes (#183404)

This implements flattening of nested EH cleanup scopes, rewriting the
inner scope's resume to branch to the outer scope's EH cleanup block.

I used AI tools to generate many of the changes in this PR, but I have
carefully reviewed the changes and updated as needed.
DeltaFile
+312-0clang/test/CIR/Transforms/flatten-cleanup-scope-eh.cir
+71-25clang/lib/CIR/Dialect/Transforms/FlattenCFG.cpp
+35-8clang/test/CIR/Transforms/flatten-cleanup-scope-nyi.cir
+418-333 files

LLVM/project ee30b97llvm/lib/Target/SPIRV SPIRVPostLegalizer.cpp

[NFC][SPIRV] Remove dead code `SPIRVPostLegalizer.cpp`
DeltaFile
+0-30llvm/lib/Target/SPIRV/SPIRVPostLegalizer.cpp
+0-301 files

LLVM/project 8e5b9caclang/lib/CIR/CodeGen CIRGenFunction.cpp, clang/test/CIR/CodeGen virtual-destructor-calls.cpp

[CIR] Upstream support for pure virtual destructors (#182857)

Upstreams support for emitting traps for abstract destructors.

Signed-off-by: vishruth-thimmaiah <vishruththimmaiah at gmail.com>
DeltaFile
+46-0clang/test/CIR/CodeGen/virtual-destructor-calls.cpp
+3-1clang/lib/CIR/CodeGen/CIRGenFunction.cpp
+49-12 files

LLVM/project da851dbllvm/include/llvm/Analysis TargetLibraryInfo.h, llvm/include/llvm/CodeGen SelectionDAGTargetInfo.h SelectionDAG.h

[PowerPC] using milicode call for memccpy instead of lib call (#182563)

AIX has "millicode" routines, which are functions loaded at boot time
into fixed addresses in kernel memory. This allows them to be customized
for the processor. The __memccpy routine is a millicode implementation;
we use millicode for the memccpy function instead of a library call to
improve performance

---------

Co-authored-by: Matt Arsenault <arsenm2 at gmail.com>
DeltaFile
+24-0llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+16-0llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+11-0llvm/include/llvm/CodeGen/SelectionDAGTargetInfo.h
+7-0llvm/lib/Target/PowerPC/PPCSelectionDAGInfo.cpp
+6-0llvm/include/llvm/CodeGen/SelectionDAG.h
+3-3llvm/include/llvm/Analysis/TargetLibraryInfo.h
+67-35 files not shown
+77-511 files

LLVM/project a41ad14clang/include/clang/AST APValue.h

Compute NumRows * NumCols once and reuse in setMatrixUninit()
DeltaFile
+3-2clang/include/clang/AST/APValue.h
+3-21 files

LLVM/project 3839878libc/shared/math tanpif16.h, libc/src/__support/math tanpif16.h CMakeLists.txt

[libc][math] Refactor tanpif16 to header-only (#181240)

Part of #147386

in preparation for:
https://discourse.llvm.org/t/rfc-make-clang-builtin-math-functions-constexpr-with-llvm-libc-to-support-c-23-constexpr-math-functions/86450

Closes #181207
DeltaFile
+124-0libc/src/__support/math/tanpif16.h
+2-100libc/src/math/generic/tanpif16.cpp
+28-0libc/shared/math/tanpif16.h
+18-8utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+17-0libc/src/__support/math/CMakeLists.txt
+1-9libc/src/math/generic/CMakeLists.txt
+190-1173 files not shown
+193-1179 files