LLVM/project d83b168 — openmp/docs Building.md

Add new section to Building.md

Removed the now-ignored option from the bootstrap-build config example.

Created a new section dedicated to omptest and how to make it
installable.
DeltaFile
+28-2openmp/docs/Building.md
+28-21 files

LLVM/project 5ce0ba3 — openmp/docs Building.md, openmp/tools/omptest CMakeLists.txt

[OpenMP][omptest] Do not install an ompTest that embeds LLVM's GoogleTest

The GTest-based ompTest embeds LLVM's vendored GoogleTest objects, but LLVM
installs no GoogleTest headers, and the installed OmptTesterGoogleTest.h
includes "gtest/gtest.h". Users of the installed package therefore compile
against whichever GoogleTest their system provides, which need not declare the
testing::internal API the library exports. That API carries no compatibility
promise -- MakeAndRegisterTestInfo() takes its test suite name as const char *
in the copy LLVM vendors and as std::string in later releases -- so the
mismatch surfaces as an undefined symbol when the user links, far from its
cause. The package config cannot express the requirement, because it is not a
version but the exact API generation vendored when the library was built.

Decline to install that configuration and say why. The standalone and
system-GoogleTest builds carry no vendored GoogleTest and remain installable.

Warn rather than error, for now. A build that asks for an installed ompTest
and gets a GoogleTest-based one is asking for something undeliverable, which
would justify a hard failure, but erroring immediately breaks every such build

    [8 lines not shown]
DeltaFile
+13-0openmp/tools/omptest/CMakeLists.txt
+5-2openmp/docs/Building.md
+18-22 files

LLVM/project 8b7bb58 — openmp/docs Building.md, openmp/tools/omptest CMakeLists.txt

[OpenMP][omptest] Add LIBOMPTEST_USE_SYSTEM_GTEST (#242312)

omptest can be built to use GoogleTest. For consumers that are only
inside the LLVM / runtimes build tree there is no problem right now
AFAIK
However, if an outside consumer wants to use omptest from an
installation, the problem is that LLVM vendors its own gTest headers and
those cannot be installed or are almost always unusable.

This change adds the possibility to not use he vendored ones but instead
search on the system for an installed gTest and rely on that instead.

This is a follow-up to the stack in
https://github.com/llvm/llvm-project/pull/237201

Assisted-by: Claude Opus 5 <noreply at anthropic.com>
DeltaFile
+27-17openmp/tools/omptest/CMakeLists.txt
+6-0openmp/tools/omptest/cmake/omptest-config.cmake.in
+5-0openmp/docs/Building.md
+38-173 files

LLVM/project 6fd8981 — llvm/lib/Target/WebAssembly WebAssemblyExplicitLocals.cpp WebAssemblyISelLowering.cpp, llvm/test/CodeGen/WebAssembly swift-async-context-addr-error.ll swift-async-context-addr-dbg.ll

[wasm] Swift async ABI p3: Lower llvm.swift.async.context.addr to local 0 (#236133)

(see https://github.com/swiftlang/swift/pull/93554) 
This intrinsic describes the location of the async context.
DeltaFile
+79-0llvm/test/CodeGen/WebAssembly/swift-async-context-addr.ll
+53-0llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
+39-0llvm/test/CodeGen/WebAssembly/swift-async-context-addr-dbg.ll
+16-0llvm/test/CodeGen/WebAssembly/swift-async-context-addr-error.ll
+8-5llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
+10-0llvm/test/Instrumentation/AddressSanitizer/basic.ll
+205-52 files not shown
+219-58 files

LLVM/project d3588b5 — compiler-rt/lib/fuzzer FuzzerCorpus.h FuzzerFork.cpp, compiler-rt/test/fuzzer features_dir.test

[libFuzzer] Fix stale reduced seeds and a fork-mode crash

Seeds are loaded with MayDeleteFile=false. When libFuzzer reduces a
seed, Corpus::Replace keeps the original file and the reduced unit is
written to the output corpus. The flag stays false, so when the same
input is reduced again, the previous reduced unit is not deleted either,
and every intermediate reduction of a seed stays in the output corpus.

In a fork-mode job, the feature file of such a unit has been renamed to
the hash of the newer unit. The parent reads an empty feature set for
the unit and calls memcpy with null pointers. glibc declares them
nonnull, and with _FORTIFY_SOURCE the optimizer removes the zero-size
path of the vector. The parent then writes out of bounds and crashes.

Mark a replaced unit as deletable, since libFuzzer wrote the
replacement itself. Skip the copy when there are no features, and copy
only whole features, so that a missing or truncated feature file from
any other cause does not crash the parent either.


    [4 lines not shown]
DeltaFile
+10-0compiler-rt/test/fuzzer/features_dir.test
+3-1compiler-rt/lib/fuzzer/FuzzerFork.cpp
+1-0compiler-rt/lib/fuzzer/FuzzerCorpus.h
+14-13 files

LLVM/project 8314d56 — llvm/lib/Target/Mips MicroMips32r6InstrInfo.td MicroMipsInstrFPU.td, llvm/test/CodeGen/Mips fp-strict-arith-micromips.ll

[Mips] Select constrained FP arithmetic on microMIPS (#246060)

STRICT_FADD, STRICT_FSUB, STRICT_FMUL, STRICT_FDIV and STRICT_FSQRT are
Legal for all hard-float subtargets, but only the standard encoding
patterns were changed to match them. On microMIPS any constrained
arithmetic operation failed instruction selection.

Use the any_* fragments in the microMIPS and microMIPS R6 patterns as
well.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+198-0llvm/test/CodeGen/Mips/fp-strict-arith-micromips.ll
+10-10llvm/lib/Target/Mips/MicroMipsInstrFPU.td
+4-4llvm/lib/Target/Mips/MicroMips32r6InstrInfo.td
+212-143 files

LLVM/project e43d6cd — llvm/lib/Target/Mips MipsSEISelLowering.cpp MipsISelLowering.cpp, llvm/test/CodeGen/Mips fp-strict-f16.ll

[Mips] Use libcalls for constrained f16 conversions (#246063)

STRICT_FP16_TO_FP and STRICT_FP_TO_FP16 are not covered by the default
Expand action for constrained operations, so they were Legal and any
constrained conversion to or from half failed instruction selection.

Mark them LibCall like their non-strict counterparts, extending to f64
through f32. Also drop the STRICT_ cases from the MSA custom lowering of
these nodes: they were unreachable, and would have used the chain as the
value operand.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+171-0llvm/test/CodeGen/Mips/fp-strict-f16.ll
+6-0llvm/lib/Target/Mips/MipsISelLowering.cpp
+0-2llvm/lib/Target/Mips/MipsSEISelLowering.cpp
+177-23 files

LLVM/project 21f329f — clang CMakeLists.txt, clang/cmake/modules AddClang.cmake

[clang] Clean up the Clang export annotations (#239750)

This shuffles `clang/Support/Compiler.h` to more closely match
`llvm/Support/Compiler.h`. In particular, this adds a `clang-config.h`
header defining `CLANG_ENABLE_CLANG_EXPORT_ANNOTATIONS` to simplify the
`CLANG_ABI` and friends definitions.

This also narrows down the compile definitions to the MSVC/clang-cl
clang-cpp dylib build. Since this configuration is still a work in
progress tracked in #238871, this makes `CLANG_ABI` and friends expand
to nothing outside of an MSVC `CLANG_LINK_CLANG_DYLIB` build. As a side
effect, this removes many PCH-related warnings concerning these compile
definitions.

This also removes the `CLANG_BUILD_STATIC` override. Once the work is
done to annotate libclang-cpp, it should no longer be necessary. Right
now, the annotated build does not work so it is useless anyway.

LLM-aided with Claude Code.
DeltaFile
+28-31clang/include/clang/Support/Compiler.h
+21-0clang/include/clang/Config/clang-config.h.cmake
+19-0utils/bazel/llvm-project-overlay/clang/include/clang/Config/clang-config.h
+6-8clang/cmake/modules/AddClang.cmake
+14-0clang/CMakeLists.txt
+1-10clang/tools/libclang/CMakeLists.txt
+89-494 files not shown
+99-5110 files

LLVM/project 27e5317 — clang/lib/Analysis/LifetimeSafety LoanPropagation.cpp, clang/test/Sema/LifetimeSafety dangling-global.cpp

[LifetimeSafety] Skip unreachable predecessors when building origin flow chains (#246581)
DeltaFile
+9-1clang/test/Sema/LifetimeSafety/dangling-global.cpp
+2-0clang/lib/Analysis/LifetimeSafety/LoanPropagation.cpp
+11-12 files

LLVM/project 553dc93 — llvm/include/llvm/Analysis MemoryBuiltins.h, llvm/lib/Analysis MemoryBuiltins.cpp

[MemoryBuiltins] Infer allockind for strdup (#246479)

Infer `allockind("alloc")` for strdup/strndup, and treat __strdup the
same as strdup.

This allows us to remove the TLI dependency from more MemoryBuiltins
helpers. The remaining ones are related to allocation size (where strdup
is special).
DeltaFile
+11-71llvm/lib/Analysis/MemoryBuiltins.cpp
+19-30llvm/lib/Transforms/IPO/GlobalOpt.cpp
+7-8llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+3-10llvm/lib/Transforms/Utils/BuildLibCalls.cpp
+4-8llvm/include/llvm/Analysis/MemoryBuiltins.h
+5-6llvm/lib/Transforms/Instrumentation/AllocToken.cpp
+49-13310 files not shown
+70-16016 files

LLVM/project 07f3a7c — clang/test/Sema/AArch64 arm_sve_feature_dependent_sve_AND_LP_sve2p3_OR_sme2p3_RP_AND_fpv2___sme_AND_LP_sve2p3_OR_sme2p3_RP_AND_fpv2.c, llvm/test/CodeGen/AArch64 fpv2-sve2p3-intrinsics-fmininm.ll fpv2-sve2p3-intrinsics-fminmginm.ll

[AArch64] Implement ACLE intrinsics for FPv2 SVE min/max instructions

ACLE PR: https://github.com/ARM-software/acle/pull/480

Implements the following intrinsics:

- svmaxmg / svminmg
- svmaxinm / svmininm
- svmaxmginm / svminmginm

Includes f16, f32, and f64 types, _m, _z, and _x predication and _n variants

AI assistance: Codex used for generating test cases
DeltaFile
+691-0clang/test/Sema/AArch64/arm_sve_feature_dependent_sve_AND_LP_sve2p3_OR_sme2p3_RP_AND_fpv2___sme_AND_LP_sve2p3_OR_sme2p3_RP_AND_fpv2.c
+382-0llvm/test/CodeGen/AArch64/fpv2-sve2p3-intrinsics-fmininm.ll
+382-0llvm/test/CodeGen/AArch64/fpv2-sve2p3-intrinsics-fminmginm.ll
+382-0llvm/test/CodeGen/AArch64/fpv2-sve2p3-intrinsics-fminmg.ll
+382-0llvm/test/CodeGen/AArch64/fpv2-sve2p3-intrinsics-fmaxmginm.ll
+382-0llvm/test/CodeGen/AArch64/fpv2-sve2p3-intrinsics-fmaxmg.ll
+2,601-012 files not shown
+5,601-718 files

LLVM/project b7353d6 — mlir/test/mlir-reduce/script failure-test.sh

[mlir][reducer] Delete the temp files of failure-test.sh (#246243)

`mlir/test/mlir-reduce/script/failure-test.sh` says its temp files are
"automatically deleted after the script's execution", but nothing
deletes them. Every run leaves `/tmp/stdout.XXXXXX` and
`/tmp/stderr.XXXXXX` behind. The reducer calls this script once per
reduction so the leak adds up quickly.

This PR adds a `trap ... EXIT` right after `mktemp` calls so both files
are removed however the script exits (exit 0 or exit 1). The script's
logic is unchanged.
DeltaFile
+2-2mlir/test/mlir-reduce/script/failure-test.sh
+2-21 files

LLVM/project dcd1857 — mlir/include/mlir/Dialect/Vector/Transforms VectorTransforms.h Passes.td, mlir/lib/Dialect/Vector/Transforms VectorMaskElimination.cpp

[mlir][vector] Prove all-false masks with value bounds (#243127)

This PR extends the all-true handling in `eliminate-vector-masks` to
masks that can be proven all-false.

This was found while compiling a
[FlagGems](https://github.com/flagos-ai/FlagGems) batched matmul for
SME. A 4x4 output tile was lowered to four column subtiles, with 12 of
16 FMOPA instructions in each peeled K block fully masked off. The mask
bounds included expressions such as `4 - 4*vscale`, which the pass did
not resolve, so more instructions were emitted than necessary.

For example, given `empty-mask.mlir`:
```mlir
func.func @empty_mask() -> vector<[4]xi1> {
  %c4 = arith.constant 4 : index
  %vscale = vector.vscale
  %width = arith.muli %vscale, %c4 : index
  %bound = arith.subi %c4, %width : index

    [29 lines not shown]
DeltaFile
+88-0mlir/test/Dialect/Vector/eliminate-masks.mlir
+42-4mlir/lib/Dialect/Vector/Transforms/VectorMaskElimination.cpp
+10-8mlir/include/mlir/Dialect/Vector/Transforms/Passes.td
+2-2mlir/include/mlir/Dialect/Vector/Transforms/VectorTransforms.h
+142-144 files

LLVM/project c31eda6 — clang/test/Sema/AArch64 arm_sve_feature_dependent_sve_AND_LP_sve2p3_OR_sme2p3_RP_AND_fpv2___sme_AND_LP_sve2p3_OR_sme2p3_RP_AND_fpv2.c, llvm/test/CodeGen/AArch64 fpv2-sve2p3-intrinsics-fmaxmg.ll fpv2-sve2p3-intrinsics-fminmginm.ll

[AArch64] Implement ACLE intrinsics for FPv2 SVE min/max instructions

ACLE PR: https://github.com/ARM-software/acle/pull/480

Implements the following intrinsics:

- svmaxmg / svminmg
- svmaxinm / svmininm
- svmaxmginm / svminmginm

Includes f16, f32, and f64 types, _m, _z, and _x predication and _n variants

AI assistance: Codex used for generating test cases
DeltaFile
+691-0clang/test/Sema/AArch64/arm_sve_feature_dependent_sve_AND_LP_sve2p3_OR_sme2p3_RP_AND_fpv2___sme_AND_LP_sve2p3_OR_sme2p3_RP_AND_fpv2.c
+382-0llvm/test/CodeGen/AArch64/fpv2-sve2p3-intrinsics-fmaxmg.ll
+382-0llvm/test/CodeGen/AArch64/fpv2-sve2p3-intrinsics-fminmginm.ll
+382-0llvm/test/CodeGen/AArch64/fpv2-sve2p3-intrinsics-fmaxmginm.ll
+382-0llvm/test/CodeGen/AArch64/fpv2-sve2p3-intrinsics-fmininm.ll
+382-0llvm/test/CodeGen/AArch64/fpv2-sve2p3-intrinsics-fminmg.ll
+2,601-012 files not shown
+5,601-718 files

LLVM/project 097a3e7 — clang/test/CodeGenCXX template-instantiation.cpp

[clang] Add codegen regression test for friend function template (#231022)

The reproducer from #89400 crashed in IR generation because the friend
template definition was instantiated in the wrong template context,
leaving `foo<U>{}` dependent. #125266 fixed this but the case was not
covered by a test.

The test is in CodeGenCXX because clang 19 accepts the reproducer with
`-fsyntax-only` and only crashes when emitting IR.

Fixes #89400
DeltaFile
+13-0clang/test/CodeGenCXX/template-instantiation.cpp
+13-01 files

LLVM/project 9fd613e — clang/lib/CIR/CodeGen CIRGenBuiltinAMDGPU.cpp, clang/test/CIR/CodeGenHIP builtins-amdgcn.hip

[CIR][AMDGPU] Add support for __builtin_amdgcn_log_clampf (#244000)

Adds CIRGen support for `__builtin_amdgcn_log_clampf`, also adds CIR and
LLVM IR test coverage in
`clang/test/CIR/CodeGenHIP/builtins-amdgcn.hip`.

Part of #241525

Signed-off-by: Harshit Jha <harshitiszz23 at gmail.com>
Co-authored-by: Ayokunle Amodu <ayokunle321 at gmail.com>
DeltaFile
+8-0clang/test/CIR/CodeGenHIP/builtins-amdgcn.hip
+2-4clang/lib/CIR/CodeGen/CIRGenBuiltinAMDGPU.cpp
+10-42 files

LLVM/project 09b52bd — openmp/docs Building.md

Add new section to Building.md

Removed the now-ignored option from the bootstrap-build config example.

Created a new section dedicated to omptest and how to make it
installable.
DeltaFile
+28-2openmp/docs/Building.md
+28-21 files

LLVM/project 4e260e5 — openmp/docs Building.md, openmp/tools/omptest CMakeLists.txt

[OpenMP][omptest] Do not install an ompTest that embeds LLVM's GoogleTest

The GTest-based ompTest embeds LLVM's vendored GoogleTest objects, but LLVM
installs no GoogleTest headers, and the installed OmptTesterGoogleTest.h
includes "gtest/gtest.h". Users of the installed package therefore compile
against whichever GoogleTest their system provides, which need not declare the
testing::internal API the library exports. That API carries no compatibility
promise -- MakeAndRegisterTestInfo() takes its test suite name as const char *
in the copy LLVM vendors and as std::string in later releases -- so the
mismatch surfaces as an undefined symbol when the user links, far from its
cause. The package config cannot express the requirement, because it is not a
version but the exact API generation vendored when the library was built.

Decline to install that configuration and say why. The standalone and
system-GoogleTest builds carry no vendored GoogleTest and remain installable.

Warn rather than error, for now. A build that asks for an installed ompTest
and gets a GoogleTest-based one is asking for something undeliverable, which
would justify a hard failure, but erroring immediately breaks every such build

    [8 lines not shown]
DeltaFile
+13-0openmp/tools/omptest/CMakeLists.txt
+5-2openmp/docs/Building.md
+18-22 files

LLVM/project 70dbf77 — openmp/docs Building.md, openmp/tools/omptest CMakeLists.txt

[OpenMP][omptest] Add LIBOMPTEST_USE_SYSTEM_GTEST

The GTest-based ompTest embeds LLVM's vendored GoogleTest, whose headers LLVM
does not install. A consumer of the installed package therefore compiles
against whichever GoogleTest it has, which need not declare the same
testing::internal API the library exports, and the package config has no way to
state the requirement.

Add an option to build against the system GoogleTest instead. Library and
consumer then resolve the same gtest/gtest.h, so the dependency becomes an
ordinary one: GTest::gtest is linked PUBLIC and omptest-config.cmake calls
find_dependency() with the version the library was built against.

Note the resulting asymmetry. The vendored build embeds GoogleTest
unconditionally and exports its symbols, so consumers get GoogleTest for free;
a system-GoogleTest build embeds nothing and consumers link it themselves.

Only valid where the system GoogleTest matches this build's C++ standard
library and RTTI setting, since LLVM compiles the vendored copy with

    [8 lines not shown]
DeltaFile
+27-17openmp/tools/omptest/CMakeLists.txt
+6-0openmp/tools/omptest/cmake/omptest-config.cmake.in
+5-0openmp/docs/Building.md
+38-173 files

LLVM/project 789bf25 — clang/include/clang/CIR/Dialect/IR CIRAttrs.td, clang/lib/CIR/CodeGen CIRGenCXX.cpp

[CIR] Mark LoweringPrepare init functions strictfp

Classic codegen's StartFunction makes a function that has no
FunctionDecl `strictfp` when the TU-wide default FP environment is
constrained: FP exceptions are not ignored or the rounding mode is
dynamic. Of those functions ClangIR creates `_GLOBAL__sub_I_*`,
`_GLOBAL__I_*`, the C++20 module initializer, `__cxx_global_var_init*`,
`__cxx_global_array_dtor*` and `__tls_init`. It marked only
`__cxx_global_var_init*`, through a `strictfp` attribute on `cir.global`,
so the other functions and the calls in them were not `strictfp`.
Classic also marks the `__dtor_*` stubs, `_GLOBAL__D_a` and
`__GLOBAL_cleanup_*`, which ClangIR does not emit.

LoweringPrepare creates these functions after CIRGen, so it reads the
TU-wide default from `#cir.lowering_options`. `no_trapping_math` already
records whether FP exceptions are ignored, and the new `rounding_math`
field mirrors `LangOptions::RoundingMath`. It is omitted when false, so
the module attribute prints as before without `-frounding-math`.
`buildRuntimeFunction` adds `strictfp` together with the other TU-wide

    [8 lines not shown]
DeltaFile
+98-0clang/test/CIR/CodeGen/global-init-fn-strictfp.cpp
+38-0clang/test/CIR/Transforms/lowering-prepare-strictfp.cir
+35-0clang/test/CIR/CodeGen/cxx20-module-initializer-strictfp.cppm
+14-10clang/lib/CIR/Dialect/Transforms/LoweringPrepare.cpp
+11-2clang/include/clang/CIR/Dialect/IR/CIRAttrs.td
+2-6clang/lib/CIR/CodeGen/CIRGenCXX.cpp
+198-183 files not shown
+200-289 files

LLVM/project 1ed2081 — clang/lib/CIR/CodeGen CIRGenBuiltinAMDGPU.cpp, clang/test/CIR/CodeGenHIP builtins-amdgcn.hip

[CIR][AMDGPU] Implement __builtin_amdgcn_ds_append and __builtin_amdgcn_ds_consume (#244656)

Adds CIRGen support for `__builtin_amdgcn_ds_append` and
`__builtin_amdgcn_ds_consume`. Adds CIR and LLVM IR test coverage in
`clang/test/CIR/CodeGenHIP/builtins-amdgcn.hip`.

Part of #241525
DeltaFile
+22-0clang/test/CIR/CodeGenHIP/builtins-amdgcn.hip
+10-4clang/lib/CIR/CodeGen/CIRGenBuiltinAMDGPU.cpp
+32-42 files

LLVM/project a96563c — llvm/lib/Target/Mips MipsSEISelLowering.cpp, llvm/test/CodeGen/Mips r5900-fpu-softfloat.ll

[Mips] Use libcalls for constrained FP arithmetic on R5900 (#246083)

The R5900 FPU does not implement NaN and infinity, so FADD, FSUB, FMUL,
FDIV and FSQRT only use it when fast-math flags rule those out and are
libcalls otherwise. Their constrained counterparts were Legal for all
hard-float subtargets though, so constrained arithmetic on the R5900
went to the FPU unconditionally.

Make them libcalls on the R5900. The FPU also always rounds toward zero,
so it cannot follow the rounding mode that constrained operations use,
even with fast-math flags.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+38-0llvm/test/CodeGen/Mips/r5900-fpu-softfloat.ll
+8-0llvm/lib/Target/Mips/MipsSEISelLowering.cpp
+46-02 files

LLVM/project bf094e3 — llvm/lib/Target/WebAssembly WebAssemblyExplicitLocals.cpp WebAssemblyISelLowering.cpp, llvm/test/CodeGen/WebAssembly swift-async-context-addr-error.ll swift-async-context-addr-dbg.ll

[wasm] Swift async ABI p3: Lower llvm.swift.async.context.addr to local 0

In functions with a swiftasync argument, the async context is in local 0.
Loads and stores through llvm.swift.async.context.addr become local.get 0
and local.set 0. In functions without a swiftasync argument, the intrinsic
returns the address of a stack slot, as on X86 without an extended frame.

The swiftasync argument also arrives in local 0, so a store through the
intrinsic would also change the argument. Await resume funclets store their
own context through the intrinsic and can then read the argument, which is
the callee's context. To keep the argument intact, WebAssemblyExplicitLocals
copies it to another local in functions that use the intrinsic.
DeltaFile
+79-0llvm/test/CodeGen/WebAssembly/swift-async-context-addr.ll
+53-0llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
+39-0llvm/test/CodeGen/WebAssembly/swift-async-context-addr-dbg.ll
+16-0llvm/test/CodeGen/WebAssembly/swift-async-context-addr-error.ll
+8-5llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
+10-0llvm/test/Instrumentation/AddressSanitizer/basic.ll
+205-52 files not shown
+219-58 files

LLVM/project 7afce64 — clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp, clang/test/CIR/CodeGen strictfp-call-site.cpp strictfp-call-site.c

[CIR] Mark calls in strictfp functions strictfp

LangRef requires every call in a function that uses constrained FP
intrinsics to be `strictfp`, at the call site or on the callee, and
LLVM checks the call, not its caller, before it folds or simplifies a
libcall. Classic codegen gets the attribute from IRBuilder's
constrained mode. ClangIR marked only the function, so at -O1 LLVM
folded `erf(1.0)` to a constant under `FENV_ACCESS ON`.

The lowering now maps the CIR `strictfp` function attribute to the
`strictfp` attribute of `llvm.func` instead of a `passthrough` entry.
After the conversion to the LLVM dialect, it sets `strictfp` on every
`llvm.call`, `llvm.invoke`, `llvm.inline_asm` and `llvm.call_intrinsic`
in a `strictfp` function. That covers direct and indirect calls,
invokes, inline assembly, constrained intrinsics, and the calls that
LoweringPrepare and EH lowering create. CIR does not change, `strictfp`
stays a function attribute. The marks are part of the LLVM dialect, so
they survive any route to LLVM IR.


    [11 lines not shown]
DeltaFile
+118-0clang/test/CIR/CodeGen/strictfp-call-site.c
+115-0clang/test/CIR/Lowering/strictfp-call-site.cir
+86-0clang/test/CIR/CodeGen/strictfp-call-site.cpp
+32-0clang/test/CIR/Lowering/strictfp-call-site-asm.cir
+23-1clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+3-4clang/test/CIR/Lowering/strictfp.cir
+377-51 files not shown
+379-67 files

LLVM/project d75906c — mlir/lib/CAPI/ExecutionEngine CMakeLists.txt, mlir/lib/ExecutionEngine CMakeLists.txt

[mlir][ExecutionEngine] Move the OpenMP translation dependency to the C API (#246443)

`MLIRExecutionEngine` linked `MLIROpenMPToLLVMIRTranslation` although
the execution engine never uses OpenMP. Every C++ JIT user therefore
pulled in the OpenMP dialect.
The only user of the translation is the C API, which registers it since
db7cc0348c9a.

Link it from `MLIRCAPIExecutionEngine` instead.

Co-authored-by: Claude <noreply at anthropic.com>
DeltaFile
+0-1mlir/lib/ExecutionEngine/CMakeLists.txt
+1-0mlir/lib/CAPI/ExecutionEngine/CMakeLists.txt
+1-12 files

LLVM/project 6428706 — mlir/include/mlir/Dialect/LLVMIR LLVMOps.td, mlir/lib/Dialect/LLVMIR/IR LLVMCallOps.cpp

[mlir][LLVM] Add strictfp to llvm.func and the call ops (#246250)

In a function that uses constrained floating-point intrinsics, LLVM
requires every call to be `strictfp`, at the call site or on the callee,
and its folders check the call before they fold or simplify a libcall.
The LLVM dialect could mark only the function, through `passthrough`, so
a frontend lowering to it had no way to mark its calls.

This adds a `strictfp` unit attribute to `llvm.func`, `llvm.call`,
`llvm.invoke`, `llvm.inline_asm` and `llvm.call_intrinsic`, the way the
dialect already models `convergent`, `no_unwind` and `will_return`.
Export turns it into the LLVM `strictfp` attribute and import reads it
back, so a `strictfp` function no longer lands in `passthrough`; the
tests cover round-trip, export and import for each op. Calls of the
constrained intrinsic ops already get the attribute from IRBuilder.
Other named intrinsic ops have no call-site attributes.

The inliner now refuses a callee marked `strictfp` and no longer looks
for `strictfp` in `passthrough`.

Assisted-by: Claude Code (Opus 5.5).
DeltaFile
+51-0mlir/test/Target/LLVMIR/llvmir.mlir
+21-4mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+25-0mlir/test/Target/LLVMIR/Import/instructions.ll
+24-0mlir/test/Dialect/LLVMIR/roundtrip.mlir
+10-7mlir/lib/Dialect/LLVMIR/IR/LLVMCallOps.cpp
+12-0mlir/test/Target/LLVMIR/Import/intrinsic-unregistered.ll
+143-118 files not shown
+178-1414 files

LLVM/project c400d53 — libc/src/ifaddrs/linux getifaddrs.cpp CMakeLists.txt, libc/test/src/__support/net/linux netlink_test_support.h

[libc] Implement getifaddrs for link-level (AF_PACKET) entries (#246355)

This is the first part of the real getifaddrs implementation. It dumps
the network interfaces (RTM_GETLINK) using the netlink code shared with
if_nameindex, and creates an AF_PACKET entry for each of them. The
entries contain the interface name and flags, and the hardware and
broadcast addresses (as struct sockaddr_ll). IPv4 and IPv6 addresses and
ifa_data will come in follow-up patches.

Like in if_nameindex, the entries are collected in a BlockStore while we
parse the messages, and then copied into a single allocation, which also
holds the names and addresses they point to. This makes freeifaddrs a
single delete[] (glibc does the same thing). Unlike if_nameindex, we
report allocation failures as ENOMEM, as that's what other getifaddrs
implementations do.

struct sockaddr_ll only has room for 8 bytes of hardware address, which
is not enough for e.g. InfiniBand (20 bytes). Like glibc and musl, I'm
using a version of the struct with a larger (MAX_ADDR_LEN = 32 byte)

    [5 lines not shown]
DeltaFile
+425-7libc/test/src/ifaddrs/linux/getifaddrs_test.cpp
+232-0libc/src/ifaddrs/linux/getifaddrs_impl.h
+32-1libc/src/ifaddrs/linux/CMakeLists.txt
+14-5libc/src/ifaddrs/linux/getifaddrs.cpp
+15-0libc/test/src/ifaddrs/linux/CMakeLists.txt
+10-0libc/test/src/__support/net/linux/netlink_test_support.h
+728-132 files not shown
+736-168 files

LLVM/project 3422d9c — llvm/test/Instrumentation/HWAddressSanitizer prologue.ll alloca.ll, llvm/test/Instrumentation/HWAddressSanitizer/RISCV alloca-with-calls.ll alloca.ll

[HWAsan] Enable IRBuilder GEP canonicalization (#246420)
DeltaFile
+104-104llvm/test/Instrumentation/HWAddressSanitizer/use-after-scope.ll
+6-6llvm/test/Instrumentation/HWAddressSanitizer/prologue.ll
+6-6llvm/test/Instrumentation/HWAddressSanitizer/alloca.ll
+4-4llvm/test/Instrumentation/HWAddressSanitizer/X86/alloca.ll
+4-4llvm/test/Instrumentation/HWAddressSanitizer/RISCV/alloca.ll
+2-2llvm/test/Instrumentation/HWAddressSanitizer/RISCV/alloca-with-calls.ll
+126-1267 files not shown
+133-13513 files

LLVM/project 18c0ba0 — llvm/docs/TableGen BackEnds.md, llvm/lib/TableGen Record.cpp TGParser.cpp

[llvm][TableGen] Resolve intra-record field references to `?`

An inconsistency existed in TableGen prior to this PR:
* Referencing a template argument whose value was `?` resolved to and propagated `?`
* Referencing a record whose field is `?` resolved and propagated `?`
However, referencing a field of the record being built remained unresolved, even in the final resolution pass.
This meant that code like:
```tablegen
class Self {
  string str = ?;
  assert !if(!initialized(str), !ne(str, ""), 1), "str must not be empty";
}
def : Self;
```
would fail to compile as `!initialized(str)` was left unfolded, and `!if` never received a bit value: https://godbolt.org/z/oGh1PzP88
Similar issues arose with other code such as with `!dump` etc.

This PR fixes that issue by resolving a record field to `?` if the record is complete and this is the final resolve pass. As a follow-on effect, some places that previously relied on being kept unresolved now resolve to `?` which required implementing semantics for `?.field` accesses (instead of the current crash using `llvm_unreachable`). This PR therefore also defines `?.field` as resolving to `?`, similar to `?{0}` or `!cast`.
DeltaFile
+71-0llvm/test/TableGen/unset-field-reference.td
+34-0llvm/test/TableGen/initialized.td
+18-7llvm/lib/TableGen/TGParser.cpp
+9-3llvm/lib/TableGen/Record.cpp
+5-4llvm/test/TableGen/JSON.td
+6-2llvm/docs/TableGen/BackEnds.md
+143-162 files not shown
+147-188 files

LLVM/project 59430c5 — llvm/docs/TableGen ProgRef.md

address review comments
DeltaFile
+2-2llvm/docs/TableGen/ProgRef.md
+2-21 files