LLVM/project d5fa0ab — llvm/include/llvm/IR IRBuilder.h

[IRBuilder] Assert correct offset width for CreatePtrAdd (#238806)

Assert that the offset width matches the pointer index width. This is
supposed to become an IR well-formedness requirement when we switch to
ptradd, so we should start asserting it in the builder now.

Helpers like CreatePtrAddWith(Unsigned|Signed)Offset and
CreatePtrAddWith[SZ]ExtOrTrunc can be used to more conveniently create
ptradds with appropriately sized offsets.

Problematic uses of CreatePtrAdd were already adjusted in #238347.
DeltaFile
+4-2llvm/include/llvm/IR/IRBuilder.h
+4-21 files

LLVM/project 63ac9f0 — mlir/test/mlir-tblgen trait-cpp-includes-attrdef-defs.td trait-cpp-includes-op-defs.td, mlir/tools/mlir-tblgen AttrOrTypeDefGen.cpp OpDefinitionsGen.cpp

[mlir][ODS] Include headers required by generated definitions (#238735)

Generated op, attribute and type definitions use C++ constructs that are
not declared by the headers included by the generated declarations. They
therefore relied on the surrounding source file to include these headers
before including the definitions.

This PR makes the definitions emit `#include` directives for these
headers at the start of the `GET_OP_CLASSES`, `GET_OP_DEFS_<N>` and
`GET_{ATTR,TYPE}DEF_CLASSES` sections.

Similar to #236155 but for the definitions file now. A hardcoded list
suffices in this case
DeltaFile
+51-15mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp
+45-0mlir/test/mlir-tblgen/trait-cpp-includes-op-defs.td
+36-0mlir/test/mlir-tblgen/trait-cpp-includes-attrdef-defs.td
+16-0mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
+148-154 files

LLVM/project 0c80662 — llvm/lib/Target/AMDGPU AMDGPUMachineModuleInfo.h AMDGPUPerfHintAnalysis.cpp, llvm/lib/Target/AMDGPU/MCA AMDGPUCustomBehaviour.cpp

[AMDGPU][NFC] Explicitly narrow conversions in subtarget and analysis passes (#215194)

This fixes 17 instances of MSVC warning C4244 and 3 of C4267 ("possible loss of data") across several files in llvm/lib/Target/AMDGPU.

Assisted-by: Claude <noreply at anthropic.com>
DeltaFile
+9-8llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp
+8-7llvm/lib/Target/AMDGPU/MCA/AMDGPUCustomBehaviour.cpp
+8-7llvm/lib/Target/AMDGPU/GCNSubtarget.cpp
+4-4llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.h
+3-3llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
+2-2llvm/lib/Target/AMDGPU/AMDGPUMachineModuleInfo.h
+34-312 files not shown
+37-338 files

LLVM/project 2edd62c — llvm/include/llvm/Transforms/Utils ControlFlowUtils.h, llvm/lib/Transforms/Utils ControlFlowUtils.cpp

[ControlFlowHub] Only move PHI entries for redirected edges (#237917)

reconnectPhis moved the PHI entry for every incoming block of the hub
that is a predecessor of Out, even if that block's edge to Out does not
go through the hub. FixIrreducible creates such hubs: it redirects the
internal edges to the cycle header, but not the internal edges to the
other cycle entries. If a block in the cycle branches both to the header
and to another entry, the PHI entry for the direct edge was moved
anyway, giving either invalid IR ("PHINode should have one entry for
each predecessor") or a PHI that sees a stale value along the direct
edge. A self-loop on an entry that is not the header is one example.

Only move the entries for edges that are redirected through the hub.

This is the second problem described in #232399.

Co-Authored-By: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+86-0llvm/test/Transforms/FixIrreducible/phi-non-redirected-edges.ll
+8-5llvm/lib/Transforms/Utils/ControlFlowUtils.cpp
+3-2llvm/include/llvm/Transforms/Utils/ControlFlowUtils.h
+97-73 files

LLVM/project 6b1a2b2 — . do_commit_mantissa_manip.py

clean helper scripts
DeltaFile
+0-31do_commit_mantissa_manip.py
+0-311 files

LLVM/project ead86d3 — libc/src/math/generic modff80.cpp

nits
DeltaFile
+2-0libc/src/math/generic/modff80.cpp
+2-01 files

LLVM/project ac3b14b — libc/src/__support/math CMakeLists.txt modff80.h, libc/test/src/math/smoke CMakeLists.txt modff80_test.cpp

nits
DeltaFile
+2-2libc/src/__support/math/CMakeLists.txt
+3-1libc/src/__support/math/modff80.h
+3-0libc/test/src/math/smoke/modff80_test.cpp
+1-0libc/test/src/math/smoke/CMakeLists.txt
+9-34 files

LLVM/project d0ca8ea — . do_commit_mantissa_manip.py, libc/shared/math modff80.h

adds modff80 function
DeltaFile
+31-0do_commit_mantissa_manip.py
+27-0libc/src/__support/math/modff80.h
+24-0libc/src/math/generic/modff80.cpp
+24-0libc/shared/math/modff80.h
+21-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+21-0libc/src/math/modff80.h
+148-025 files not shown
+229-131 files

LLVM/project 3224fb4 — libc/src/__support/math scalbnf80.h scalblnf80.h, libc/src/math/generic CMakeLists.txt

adds ldexpf80, scalbnf80, scalblnf80
DeltaFile
+65-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+36-0libc/test/src/math/smoke/CMakeLists.txt
+33-0libc/src/math/generic/CMakeLists.txt
+32-0libc/src/__support/math/CMakeLists.txt
+31-0libc/src/__support/math/scalbnf80.h
+31-0libc/src/__support/math/scalblnf80.h
+228-035 files not shown
+603-341 files

LLVM/project 95122e8 — . do_commit_exp_scaling.py, libc/src/__support/math scalbnf80.h scalblnf80.h

nits
DeltaFile
+0-31do_commit_exp_scaling.py
+22-0utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
+6-6libc/src/__support/math/CMakeLists.txt
+3-3libc/src/__support/math/ldexpf80.h
+3-1libc/src/__support/math/scalbnf80.h
+3-1libc/src/__support/math/scalblnf80.h
+37-424 files not shown
+49-4210 files

LLVM/project 9c4a957 — libc/src/math scalbnf80.h, libc/src/math/generic scalbnf80.cpp scalblnf80.cpp

clang-format
DeltaFile
+1-2libc/src/math/generic/scalbnf80.cpp
+1-2libc/src/math/generic/scalblnf80.cpp
+2-1libc/test/src/math/smoke/scalbnf80_test.cpp
+2-1libc/test/src/math/smoke/scalblnf80_test.cpp
+2-1libc/test/shared/shared_math_test.cpp
+2-1libc/src/math/scalbnf80.h
+10-81 files not shown
+11-107 files

LLVM/project f18f36b — libc/src/math/generic scalbnf80.cpp scalblnf80.cpp

nits
DeltaFile
+2-0libc/src/math/generic/scalbnf80.cpp
+2-0libc/src/math/generic/scalblnf80.cpp
+2-0libc/src/math/generic/ldexpf80.cpp
+6-03 files

LLVM/project fb901e3 — . do_commit_exp_decomp.py, libc/src/__support/math logbf80.h llogbf80.h

nits
DeltaFile
+40-0libc/test/src/math/smoke/CMakeLists.txt
+0-31do_commit_exp_decomp.py
+8-8libc/src/__support/math/CMakeLists.txt
+3-4libc/src/__support/math/logbf80.h
+3-4libc/src/__support/math/llogbf80.h
+3-4libc/src/__support/math/ilogbf80.h
+57-519 files not shown
+80-5915 files

LLVM/project f88bbb8 — . do_commit_exp_decomp.py, libc/src/__support/math llogbf80.h logbf80.h

adds frexpf80, ilogbf80, llogbf80, logbf80
DeltaFile
+84-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+44-0libc/src/math/generic/CMakeLists.txt
+40-0libc/src/__support/math/CMakeLists.txt
+31-0do_commit_exp_decomp.py
+29-0libc/src/__support/math/llogbf80.h
+29-0libc/src/__support/math/logbf80.h
+257-040 files not shown
+743-446 files

LLVM/project 208f5af — libc/src/__support/math CMakeLists.txt frexpf80.h, utils/bazel/llvm-project-overlay/libc BUILD.bazel

cast from f128
DeltaFile
+6-1libc/src/__support/math/frexpf80.h
+2-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+2-0libc/src/__support/math/CMakeLists.txt
+10-13 files

LLVM/project e486905 — libc/src/__support/math logbf80.h, libc/src/math/generic logbf80.cpp frexpf80.cpp

clang-format
DeltaFile
+1-3libc/src/__support/math/logbf80.h
+1-2libc/src/math/generic/logbf80.cpp
+1-2libc/src/math/generic/frexpf80.cpp
+3-73 files

LLVM/project ec91181 — libc/shared math.h, libc/src/math/generic canonicalizef80.cpp

clang-format
DeltaFile
+4-4libc/shared/math.h
+1-1libc/src/math/generic/canonicalizef80.cpp
+5-52 files

LLVM/project 92e631e — libc/src/__support/math iscanonicalf80.h CMakeLists.txt, libc/src/math/generic CMakeLists.txt

adds iscanonicalf80, isnanf80, issignalingf80, canonicalizef80
DeltaFile
+76-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+55-0libc/test/src/math/smoke/CMakeLists.txt
+44-0libc/src/math/generic/CMakeLists.txt
+40-0libc/src/__support/math/CMakeLists.txt
+34-0libc/src/__support/math/iscanonicalf80.h
+33-0utils/bazel/llvm-project-overlay/libc/test/src/math/smoke/BUILD.bazel
+282-039 files not shown
+884-345 files

LLVM/project c1c7f86 — libc/shared/math totalordermagf80.h, libc/src/__support/math totalordermagf80.h totalorderf80.h

[libc][math] Adds total ordering functions for float80 (#238685)

part of https://github.com/llvm/llvm-project/issues/219707
DeltaFile
+38-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+33-0libc/src/__support/math/totalordermagf80.h
+33-0libc/src/__support/math/totalorderf80.h
+29-0libc/src/math/generic/totalordermagf80.cpp
+28-0libc/src/math/generic/totalorderf80.cpp
+28-0libc/shared/math/totalordermagf80.h
+189-029 files not shown
+453-235 files

LLVM/project 689c2f8 — llvm/test/CodeGen/MLRegAlloc dev-mode-log-amdgpu.ll

[MLRegAlloc] Update Test Expectations (#238813)

To fix the buildbots broken by 241f9a36215469b100537930949e5acbeaecedbd.
DeltaFile
+3-0llvm/test/CodeGen/MLRegAlloc/dev-mode-log-amdgpu.ll
+3-01 files

LLVM/project 1a7af06 — clang/test/CodeGenOpenCL builtins-amdgcn-global-load-store.cl, llvm/lib/Target/Mips MicroMipsSizeReduction.cpp

Merge branch 'main' into users/zero9178/ods-def-includes
DeltaFile
+3,186-0llvm/test/CodeGen/AMDGPU/amdgcn-av-scopes.ll
+944-96llvm/test/CodeGen/AMDGPU/llvm.amdgcn.av.load.b128.ll
+902-30clang/test/CodeGenOpenCL/builtins-amdgcn-global-load-store.cl
+417-427llvm/lib/Target/Mips/MicroMipsSizeReduction.cpp
+784-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.av.store.b128.ll
+210-482llvm/test/tools/llvm-readobj/ELF/file-header-machine-types.test
+6,443-1,035407 files not shown
+15,331-5,964413 files

LLVM/project b5fc99b — 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 2eeec8a — utils/bazel/llvm-project-overlay/libc BUILD.bazel

[Bazel] Fixes fa5a303 (#238811)

This fixes fa5a303d355e597238da125155df4d9b0dc497a7 (#236371).

Buildkite error link:
https://buildkite.com/llvm-project/upstream-bazel/builds?commit=fa5a303d355e597238da125155df4d9b0dc497a7

Co-authored-by: Google Bazel Bot <google-bazel-bot at google.com>
DeltaFile
+1-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+1-01 files

LLVM/project 2d6c6a1 — lldb/test/Shell/SymbolFile/DWARF missing-oso.cpp

[lldb][test] Fix flaky missing-oso.cpp that mixed stderr and stdout (#238110)

`missing-oso.cpp` expects `error:` line is before
`(lldb) image dump separate-debug-info --errors-only`, but the error
message is
from the event handler thread. The main thread does not wait for that
event and runs the next `-o` command, so the `error:` line can land
before, between or after the `image dump` echo and output. `2>&1` joins
both writers in one pipe and nothing orders them.

The fix does:
- drop `2>&1` from the `%t.two` run and send stderr to `%t.two.err`,
  use two `FileCheck` to check each,
- `--implicit-check-not=error:` on the stderr check replaces both
  `TWO-NOT: error:` lines, so the error must still appear exactly once,
- `-l 28` is now `-l 30`, the new line of `main`
DeltaFile
+9-7lldb/test/Shell/SymbolFile/DWARF/missing-oso.cpp
+9-71 files

LLVM/project fc7a4fc — flang/lib/Lower/OpenMP OpenMP.cpp, flang/test/Lower/OpenMP recipe-memory-effects.f90

[mlir][OpenMP] Add memory effects of omp.single (#237929)

Added a new attribute for the copyprivate clause
`copyprivate_assume_bounded_recipe_effects`. Applied when the
copyprivate variables satisfy certain constraints.
Updated helper functions for applying bounded recipe attributes.

Add direct memory effect tests, CSE & canonicalisation tests.
Add tests for correct application of the
`copyprivate_assume_bounded_recipe_effects` attribute.
AI-Assisted-by: Codex (OpenAI)
DeltaFile
+264-0flang/test/Lower/OpenMP/recipe-memory-effects.f90
+84-0mlir/test/Dialect/OpenMP/memory-effects.mlir
+51-28flang/lib/Lower/OpenMP/OpenMP.cpp
+37-7mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+28-0mlir/test/Dialect/OpenMP/canonicalize.mlir
+21-0mlir/test/Dialect/OpenMP/cse.mlir
+485-353 files not shown
+513-519 files

LLVM/project 860204d — libc/src/__support/OSUtil/linux/syscall_wrappers copy_file_range.h, libc/src/unistd copy_file_range.h

[libc] Implement copy_file_range in unistd (#236914)

This patch implements `copy_file_range` in LLVM libc under `unistd` for
Linux systems (kernel 4.5+).

- Implements internal syscall wrapper `copy_file_range` using
`ErrorOr<ssize_t>`.
- Adds public entrypoint in `unistd` with Doxygen documentation header.
- Adds unit tests verifying in-kernel data copying, offset tracking, and
error handling (`EBADF`, `EINVAL`).
- Updates entrypoints across Linux targets (`x86_64`, `aarch64`, `arm`,
`riscv`).

Fixes #236897.
DeltaFile
+131-0libc/test/src/unistd/copy_file_range_test.cpp
+39-0libc/src/unistd/linux/copy_file_range.cpp
+39-0libc/src/__support/OSUtil/linux/syscall_wrappers/copy_file_range.h
+29-0libc/src/unistd/copy_file_range.h
+20-0libc/test/src/unistd/CMakeLists.txt
+17-0libc/src/unistd/linux/CMakeLists.txt
+275-07 files not shown
+317-513 files

LLVM/project 622a7ca — llvm/test/CodeGen/AArch64 sve-intrinsics-xor-and.ll sve-intrinsics-and-xor.ll

[AArch64] NFC: Add pre-commit tests for SVE AND-XOR/XOR-AND combining

Add tests for patterns like AND(a, XOR(a, b)) and XOR(a, AND(a, b))
that could be replaced by `BIC(a, b)`.

Cover various cases involving plain LLVM AND/XOR instructions and
sve.and/eor[.u/z] intrinsics.

Add negative test cases where the instruction sequence can't be replaced
by BIC.
DeltaFile
+213-0llvm/test/CodeGen/AArch64/sve-intrinsics-xor-and.ll
+213-0llvm/test/CodeGen/AArch64/sve-intrinsics-and-xor.ll
+426-02 files

LLVM/project fa5a303 — libc/src/__support/math cospif16.h, libc/test/src/math/smoke cospif16_test.cpp

[libc][math] Fix `cospif16` error handling (#236371)

Follow up of https://github.com/llvm/llvm-project/pull/235780, tested
`cospif16` with CORE-MATH's exhaustive checker in all four rounding
modes. With `CORE_MATH_SUPPORT_ERRNO` and `CORE_MATH_CHECK_INEXACT`
enabled.
DeltaFile
+12-4libc/src/__support/math/cospif16.h
+7-1libc/test/src/math/smoke/cospif16_test.cpp
+19-52 files

LLVM/project bd1264d — llvm/lib/Target/WebAssembly WebAssemblyFastISel.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

This intrinsic describes the location of the async context.
DeltaFile
+86-5llvm/lib/Target/WebAssembly/WebAssemblyExplicitLocals.cpp
+76-0llvm/test/CodeGen/WebAssembly/swift-async-context-addr.ll
+63-0llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
+62-0llvm/test/CodeGen/WebAssembly/swift-async-context-addr-dbg.ll
+16-0llvm/test/CodeGen/WebAssembly/swift-async-context-addr-error.ll
+10-2llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp
+313-72 files not shown
+325-98 files

LLVM/project ff91ab4 — flang/include/flang/Evaluate real.h

[flang][NFC] Narrow the -Waix-compat suppression in real.h to word_ (#238651)

`real.h` suppresses `-Waix-compat` for the whole `Real` class template
with `#if defined(_AIX)` and `#pragma GCC diagnostic ignored
"-Waix-compat"`. GCC does not know that warning, so a GCC build on AIX
would get a `-Wpragmas` warning ("unknown option after '#pragma GCC
diagnostic' kind") in every file that includes `real.h`, and an error
with `-Werror`.

This switches to the form #238605 and #238635 use for
`RealValue::opaque_` in `real-value.h`: a clang-only suppression around
`word_`, the one member the diagnostic is attached to, with a comment
explaining why the warning does not apply. No functional change.

Assisted-by: AI
DeltaFile
+13-10flang/include/flang/Evaluate/real.h
+13-101 files