LLVM/project c654b5dlibc/shared/math sqrtf128.h, libc/src/__support/math sqrtf128.h

make sqrtf128 use emulated float128
DeltaFile
+14-11libc/test/src/math/smoke/sqrtf128_test.cpp
+6-9libc/src/__support/math/sqrtf128.h
+5-4libc/test/src/math/sqrtf128_test.cpp
+3-6libc/shared/math/sqrtf128.h
+4-1libc/src/math/sqrtf128.h
+4-1libc/src/math/generic/sqrtf128.cpp
+36-325 files not shown
+41-3411 files

LLVM/project f1b7f97clang-tools-extra/clang-tidy/misc ConfusableIdentifierCheck.cpp, clang-tools-extra/clang-tidy/misc/ConfusableTable BuildConfusableTable.cpp

[clang-tidy] Compact the confusable identifier table (#202626)

Encode confusable replacement strings once in a shared UTF-8 byte array.
Each sorted mapping becomes an eight-byte code point, 16-bit offset, and
16-bit length entry instead of reserving nineteen UTF-32 code points for
every replacement.

ConfusableIdentifierCheck appends the UTF-8 slice directly after the
binary search, removing the per-identifier UTF-32 to UTF-8 conversion.
Add compile-time assertions for the eight-byte entry layout and the 64
KiB replacement-data limit, plus generator-side overflow checks.

The logical table shrinks from 508,400 to 63,327 bytes, saving 445,073
bytes. A stripped standalone clang-tidy shrinks from 91,116,608 to
90,654,176 bytes, saving 462,432 bytes (0.508%).

A lookup microbenchmark improves from 79.9 to 40.4 ns median. A
100,000-identifier clang-tidy benchmark improves from 0.343 to 0.314
seconds mean.

    [3 lines not shown]
DeltaFile
+50-23clang-tools-extra/clang-tidy/misc/ConfusableTable/BuildConfusableTable.cpp
+16-19clang-tools-extra/clang-tidy/misc/ConfusableIdentifierCheck.cpp
+12-0clang-tools-extra/test/clang-tidy/checkers/misc/confusable-identifiers.cpp
+78-423 files

LLVM/project 6dd93e3mlir/lib/Dialect/Tosa/Transforms TosaNarrowTypes.cpp, mlir/test/Dialect/Tosa tosa-narrow-i64-to-i32.mlir

[mlir][tosa] Fix TosaNarrowTypes conversion order to prevent rollback crash (#207372)

Fix #206952 by doing `convertRegionTypes` before moving and unlinking
the blocks when handling `tosa.cond_if` ops. This will cause a crash
when doing rollback.
DeltaFile
+21-0mlir/test/Dialect/Tosa/tosa-narrow-i64-to-i32.mlir
+2-2mlir/lib/Dialect/Tosa/Transforms/TosaNarrowTypes.cpp
+23-22 files

LLVM/project 5ddd083clang/lib/AST/ByteCode Interp.h Interp.cpp

[clang][AST] Outline constant-interpreter shift diagnostics (#202633)

CheckShift is instantiated for each primitive left-hand and right-hand
type
and for both shift directions. Its four diagnostic paths are cold, but
each
instantiation currently emits the diagnostic construction and undefined
behavior handling.

Move those paths to the non-template, noinline diagnoseShiftFailure
function.
Valid shifts retain the existing checks and do not call the outlined
function.
Invalid shifts preserve the same diagnostic arguments and call
noteUndefinedBehavior exactly once.

On arm64 macOS with a Release build of standalone Clang, this changes:

  linked binary:  222,173,192 -> 221,924,960 bytes (-248,232)

    [5 lines not shown]
DeltaFile
+21-14clang/lib/AST/ByteCode/Interp.h
+27-0clang/lib/AST/ByteCode/Interp.cpp
+48-142 files

LLVM/project 4c6e578llvm/include/llvm/MC MCAsmStreamer.h, llvm/lib/Target/SystemZ/MCTargetDesc SystemZHLASMAsmStreamer.h SystemZHLASMAsmStreamer.cpp

[SystemZ][z/OS] Show instruction encoding in HLASM output (#181904)

This change adds the support to show instruction encoding as a comment
when emitting HLASM text. With this, the last 2 LIT tests migrate to
HLASM syntax.
DeltaFile
+83-55llvm/test/MC/SystemZ/insn-good-zos-pcrel.s
+9-18llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.h
+7-5llvm/test/CodeGen/SystemZ/call-zos-02.ll
+3-0llvm/include/llvm/MC/MCAsmStreamer.h
+3-0llvm/lib/Target/SystemZ/MCTargetDesc/SystemZHLASMAsmStreamer.cpp
+105-785 files

LLVM/project 5f66b69clang/docs ReleaseNotes.md, clang/lib/Sema SemaTemplate.cpp SemaDecl.cpp

[clang] accept member specializations declared in class scope (#207256)

Explicit specializations are not restricted to namespace scope since
CWG727 was accepted as a DR.

Also fixes a crash upon error recovery in this case which was a recent
unreleased regression.

Fixes #206866
DeltaFile
+41-0clang/test/SemaTemplate/member-specialization.cpp
+5-4clang/lib/Sema/SemaTemplate.cpp
+9-0clang/test/CXX/drs/cwg7xx.cpp
+6-0clang/lib/Sema/SemaDecl.cpp
+3-0clang/docs/ReleaseNotes.md
+64-45 files

LLVM/project dcf969ecompiler-rt/lib/scudo/standalone secondary.h

[scudo] Remove internal linkage from LargeBlock header helpers (NFC) (#207708)

`addHeaderTag` and `getHeader` are static function templates in
`secondary.h,` so any TU that includes the header without using them
trips `-Wunused-template`. Dropping static fixes the warning.

Part of #202945.
DeltaFile
+3-3compiler-rt/lib/scudo/standalone/secondary.h
+3-31 files

LLVM/project 62708d1llvm/include/llvm/CodeGen CostTable.h

[CodeGen] Compact cost table entries (#202836)

ISD and CostType can both be shrunk to uint16_t, which reduces the
binary by 16KB.

Work towards #202616

AI tool disclosure: Co-authored with OpenAI Codex.
DeltaFile
+5-4llvm/include/llvm/CodeGen/CostTable.h
+5-41 files

LLVM/project 3fbe826mlir/lib/Target/LLVMIR/Dialect/OpenMP OpenMPToLLVMIRTranslation.cpp, mlir/test/Target/LLVMIR openmp-llvm.mlir

[MLIR][OpenMP] Prevent openmp-device attribute being added to the host (#207719)

This attribute is only intended for an OpenMP target device but a recent
patch started causing it to appear on the host. This causes the
OpenMPOpt pass to treat the LLVM IR module as an OpenMP offloading
target, potentially introducing invalid modifications.

Fixes #207423.
DeltaFile
+4-4mlir/test/Target/LLVMIR/openmp-llvm.mlir
+3-2mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+7-62 files

LLVM/project 7cb7f07compiler-rt/lib/sanitizer_common/tests sanitizer_mutex_test.cpp sanitizer_test_utils.h

[compiler-rt][sanitizer_common] Fix -Wunused-template in test helpers… (#207706)

`Ident` is a static function template in a test header, so any test TU
that never calls it trips `-Wunused-template`. Drop static.

`check_locked` in `sanitizer_mutex_test.cpp` has no callers.

Part of #202945.
DeltaFile
+0-6compiler-rt/lib/sanitizer_common/tests/sanitizer_mutex_test.cpp
+2-3compiler-rt/lib/sanitizer_common/tests/sanitizer_test_utils.h
+2-92 files

LLVM/project a3624cbclang/test/Interpreter emulated-tls.cpp, llvm/lib/ExecutionEngine/Orc Layer.cpp

[ORC] Track __emutls_t definitions in IRMaterializationUnit (#207161)

When emulated TLS is enabled, `IRMaterializationUnit`'s constructor
emits an `__emutls_t.<var>` symbol for each non-zero-initialized
`thread_local` global and records it in `SymbolFlags`, but never adds it
to `SymbolToDefinition`.

If the same weak (`linkonce_odr`) definition is materialized by more
than one module — e.g. an `inline` function that odr-uses such a
`thread_local`, pulled into two `PartialTranslationUnit`s by clang-repl
— `JITDylib::defineImpl` discards the duplicate via
`IRMaterializationUnit::discard()`. `discard()` looks the symbol up in
`SymbolToDefinition` and, finding nothing, dereferences `end()`: an
assertion failure in `+Asserts` builds and heap corruption otherwise.

Register `__emutls_t.<var>` in `SymbolToDefinition` alongside its flags,
mirroring the `__emutls_v.<var>` handling just above.

### Test

    [11 lines not shown]
DeltaFile
+25-0clang/test/Interpreter/emulated-tls.cpp
+1-0llvm/lib/ExecutionEngine/Orc/Layer.cpp
+26-02 files

LLVM/project c827c90mlir/lib/Dialect/Arith/IR ValueBoundsOpInterfaceImpl.cpp, mlir/test/Dialect/Arith value-bounds-op-interface-impl.mlir

Improving MinUI and MaxUI implementation in valuebounds (#207701)

Previously, the valuebounds implementation for MinUI and MaxUI was too
conservative.
We can already make correct assumptions even when we know only one
operand is provably not negative.
DeltaFile
+29-13mlir/lib/Dialect/Arith/IR/ValueBoundsOpInterfaceImpl.cpp
+19-7mlir/test/Dialect/Arith/value-bounds-op-interface-impl.mlir
+48-202 files

LLVM/project 6eb0dacflang/lib/Optimizer/Transforms/CUDA CUFDeviceGlobal.cpp, flang/test/Fir/CUDA cuda-device-global.f90

[flang][cuda] Only strip internal linkage for device globals (#207521)

Stripping all linkage was too much. Only strip internal linkage so the
symbol is visible to CUDA API.
DeltaFile
+6-4flang/lib/Optimizer/Transforms/CUDA/CUFDeviceGlobal.cpp
+5-1flang/test/Fir/CUDA/cuda-device-global.f90
+11-52 files

LLVM/project bed625bllvm/lib/Transforms/InstCombine InstCombineVectorOps.cpp, llvm/test/Transforms/InstCombine insert-element-shuffle-vector-debugloc.ll

[InstCombine] Propagate debuglocs when replacing insert->extract elts (#206026)

InstCombine may replace an extractelement->insertelement chain, where
the insert vector is wider than the extract vector, with a pair of
shufflevectors - one to widen the extract vector, and one to perform the
extract+insert simultaneously. Currently the second shufflevector
correctly adopts the insertelement's debug location, since it replaces
the chain of instructions that culminates with the insert. The first
shufflevector however takes its debug location from its insert position,
if the extract vector was a PHI or non-instruction, and otherwise
receives no location.

Since the first shufflevector is really adapting the extract vector for
use by one or more other instructions, we can consider it an extension
of the extractvector. If the extract vector is an instruction, its debug
location should be used (even if it is a PHI - this likely defaults to a
CompilerGenerated debug location); otherwise, the extract vector is a
constant, and so the shufflevector represents a constant materialization
- so should receive a CompilerGenerated location.
DeltaFile
+54-0llvm/test/Transforms/InstCombine/insert-element-shuffle-vector-debugloc.ll
+9-0llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
+63-02 files

LLVM/project 9d59248llvm/lib/Target/AMDGPU AMDGPULowerKernelArguments.cpp, llvm/test/CodeGen/AMDGPU lower-kernargs.ll

[AMDGPU] Do not copy the range attribute onto a widened kernarg load (#207655)

Sub-dword args (e.g. i8) are loaded as a full i32 and truncated. Copying
the i8 range onto the i32 load is invalid IR, and its bounds are wrong
since the upper bytes hold other args

Only copy the range when the load type matches the argument type
DeltaFile
+21-0llvm/test/CodeGen/AMDGPU/lower-kernargs.ll
+1-1llvm/lib/Target/AMDGPU/AMDGPULowerKernelArguments.cpp
+22-12 files

LLVM/project 6840e60clang/lib/AST ExprConstant.cpp ExprConstShared.h, clang/lib/AST/ByteCode InterpBuiltin.cpp

[Clang][ExprConstant] Normalize aux target builtin IDs before dispatch (#201805)

When compiling for a device target that has an auxiliary host target
(for example OpenMP or CUDA offload), builtins of the auxiliary target
are registered with IDs shifted past the primary target's builtins. The
constant evaluator passed the raw ID straight into the target-specific
evaluation switches in the Pointer/Int/Vector/Float expression
evaluators, so a shifted auxiliary ID could fall through to an unrelated
builtin's case (or miss its case entirely) and fail to fold.

Add a getConstantEvaluatedBuiltinID() helper that translates auxiliary
builtin IDs back to their canonical target IDs via
BuiltinInfo::getAuxBuiltinID(), and use it before dispatching in each of
those evaluators.
DeltaFile
+74-23clang/lib/AST/ExprConstant.cpp
+24-0clang/test/Sema/aux-target-builtin-constexpr.cpp
+21-0clang/lib/AST/ExprConstShared.h
+13-1clang/lib/AST/ByteCode/InterpBuiltin.cpp
+132-244 files

LLVM/project 7f8dcfallvm/lib/Analysis LazyValueInfo.cpp, llvm/test/Transforms/CorrelatedValuePropagation vectors.ll

[LVI] Do not walk past cross-lane ops while determining value range (#207711)

While walking the one-use chain to find a constraining select
in `getValueAtUse`, do not look through cross-lane operations,
as they may move wrapping lanes into positions where the select
condition is true, and inferring nowrap flags would be unsound.

Fixes: https://github.com/llvm/llvm-project/issues/207619.
DeltaFile
+41-0llvm/test/Transforms/CorrelatedValuePropagation/vectors.ll
+5-0llvm/lib/Analysis/LazyValueInfo.cpp
+46-02 files

LLVM/project 25becf2llvm/include/llvm/MC MCAsmStreamer.h, llvm/lib/MC MCAsmStreamer.cpp

[MC] Move addEncodingComment() into new base class MCAsmBaseStreamer (#188585)

This is in preparation to use this functionality in the
SystemZHLASMAsmStreamer. No functional change.
DeltaFile
+122-132llvm/lib/MC/MCAsmStreamer.cpp
+32-1llvm/include/llvm/MC/MCAsmStreamer.h
+154-1332 files

LLVM/project ed2b1d7mlir/include/mlir/Dialect/Tosa/IR TosaComplianceData.h.inc TosaTypesBase.td, mlir/lib/Dialect/Tosa/IR TosaOps.cpp

[mlir][tosa] Add new block-scaled tensor type and support for MXFP CAST (#203583)

This commit adds a new compound-block scaled tensor type and uses this
type to implement support for MXFP in the CAST operation, as per the
following specification changes:
https://github.com/arm/tosa-specification/pull/50,
https://github.com/arm/tosa-specification/pull/53.

The new block-scaled type is closely modelled after the `quant` dialect
type and supports the following parameters:
- block shape - The size and axis of each block. Support for specifying
constant scale values has not been added in this commit, but will be
added in a later one.
- scale type - The type of the scale value associated with each block.
- value type - The type of the data values in each block.

Example syntax for the new block-scaled type:
```
tensor<160x!tosa.block_scaled<BLOCK_SHAPE_32:f8E8M0FNU:f8E5M2>>

    [11 lines not shown]
DeltaFile
+119-1mlir/include/mlir/Dialect/Tosa/IR/TosaComplianceData.h.inc
+77-40mlir/include/mlir/Dialect/Tosa/IR/TosaTypesBase.td
+73-25mlir/lib/Dialect/Tosa/Transforms/TosaProfileCompliance.cpp
+15-54mlir/include/mlir/Dialect/Tosa/IR/TosaOps.td
+67-0mlir/test/Dialect/Tosa/canonicalize.mlir
+65-0mlir/lib/Dialect/Tosa/IR/TosaOps.cpp
+416-12014 files not shown
+737-14520 files

LLVM/project 04a26a0llvm/lib/Target/X86 X86ISelLowering.cpp X86TargetTransformInfo.cpp, llvm/test/CodeGen/X86 vector-reduce-mul.ll avx512-intrinsics-fast-isel.ll

[X86] Add ISD::VECREDUCE_MUL lowering instead of matching in DAG (#207593)

Add X86 support for ISD::VECREDUCE_MUL and remove it from
combineArithReduction - most of the change is refactoring the custom
promotion of vXi8 -> vXi16.

Another part of #194621
DeltaFile
+694-806llvm/test/CodeGen/X86/vector-reduce-mul.ll
+54-45llvm/lib/Target/X86/X86ISelLowering.cpp
+7-21llvm/test/CodeGen/X86/avx512-intrinsics-fast-isel.ll
+2-8llvm/test/Transforms/PhaseOrdering/X86/vector-reductions-expanded.ll
+1-0llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+758-8805 files

LLVM/project 3127d39libc/utils/MPFRWrapper MPCommon.h

guard for LD
DeltaFile
+1-1libc/utils/MPFRWrapper/MPCommon.h
+1-11 files

LLVM/project 07b999alibc/test/shared shared_math_constexpr_test.cpp, libc/test/src/math/smoke ceilf128_test.cpp

chore: format
DeltaFile
+5-5libc/utils/MPFRWrapper/MPFRUtils.cpp
+4-4libc/utils/MPFRWrapper/MPCommon.h
+2-3libc/test/shared/shared_math_constexpr_test.cpp
+1-1libc/test/src/math/smoke/ceilf128_test.cpp
+1-1libc/utils/MPFRWrapper/MPCommon.cpp
+13-145 files

LLVM/project b728e6dlibc/shared/math ceilf128.h, libc/src/__support/math ceilf128.h

formatting
DeltaFile
+2-2libc/test/shared/shared_math_test.cpp
+1-1libc/src/__support/math/ceilf128.h
+1-1libc/shared/math/ceilf128.h
+1-1libc/src/math/ceilf128.h
+1-1libc/src/math/generic/ceilf128.cpp
+1-1libc/test/src/math/ceilf128_test.cpp
+7-76 files

LLVM/project e70837flibc/utils/MPFRWrapper MPCommon.h

add template for Float128 separately
DeltaFile
+12-1libc/utils/MPFRWrapper/MPCommon.h
+12-11 files

LLVM/project 5ebf1cblibc/utils/MPFRWrapper MPCommon.h

non-native mpfr_get_float128
DeltaFile
+5-0libc/utils/MPFRWrapper/MPCommon.h
+5-01 files

LLVM/project 1801633libc/utils/MPFRWrapper CMakeLists.txt MPCommon.cpp

test mpfr_get_float128
DeltaFile
+61-61libc/utils/MPFRWrapper/CMakeLists.txt
+1-1libc/utils/MPFRWrapper/MPCommon.cpp
+62-622 files

LLVM/project c405ef8libc/utils/MPFRWrapper MPCommon.h

nit
DeltaFile
+1-1libc/utils/MPFRWrapper/MPCommon.h
+1-11 files

LLVM/project 7ce3d87libc/utils/MPFRWrapper MPFRUtils.cpp

nit
DeltaFile
+13-0libc/utils/MPFRWrapper/MPFRUtils.cpp
+13-01 files

LLVM/project 0755815libc/utils/MPFRWrapper MPCommon.h

nit
DeltaFile
+1-1libc/utils/MPFRWrapper/MPCommon.h
+1-11 files

LLVM/project b2b28d8libc/utils/MPFRWrapper MPCommon.h

nits
DeltaFile
+1-1libc/utils/MPFRWrapper/MPCommon.h
+1-11 files