LLVM/project b0ef7b8 — mlir/include/mlir/Dialect/LLVMIR LLVMIntrinsicOps.td, mlir/test/Dialect/LLVMIR cse-matrix-intrinsics.mlir

[mlir][LLVM] Mark matrix.multiply and matrix.transpose as Pure (#247388)

The LLVM intrinsics llvm.matrix.multiply and llvm.matrix.transpose are
declared with IntrNoMem and IntrSpeculatable in Intrinsics.td, but the
corresponding LLVM dialect ops were defined without any side-effect
traits. As a result, MLIR treated them as having unknown memory effects,
and passes like CSE could not eliminate duplicate instances.

Add the Pure trait to LLVM_MatrixMultiplyOp and LLVM_MatrixTransposeOp
to match the LLVM intrinsic properties, consistent with other
side-effect-free intrinsics in LLVMIntrinsicOps.td.

Fixes #247055
DeltaFile
+28-0mlir/test/Dialect/LLVMIR/cse-matrix-intrinsics.mlir
+4-2mlir/include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td
+32-22 files

LLVM/project 1f5ceba — mlir/lib/Dialect/Tensor/IR TensorOps.cpp, mlir/test/Dialect/Tensor canonicalize.mlir

[mlir][tensor] Avoid repeating memory reads when folding extract from generate (#246276)

`ExtractFromTensorGenerate` replaces an extract by recomputing the
requested element at the extract’s location. The old
`wouldOpBeTriviallyDead` check allowed reads because unused reads can be
erased.

**Original IR**

```mlir
func.func @snapshot(%buf: memref<i32>, %new: i32) -> i32 {
  %old = tensor.generate {
    %v = memref.load %buf[] : memref<i32>
    tensor.yield %v : i32
  } : tensor<i32>
  memref.store %new, %buf[] : memref<i32>
  %v = tensor.extract %old[] : tensor<i32>
  return %v : i32
}

    [28 lines not shown]
DeltaFile
+23-0mlir/test/Dialect/Tensor/canonicalize.mlir
+3-2mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+26-22 files

LLVM/project 9cc4720 — llvm/lib/Target/Hexagon HexagonDepIICHVX.td HexagonDepIICScalar.td, llvm/test/CodeGen/AArch64/Atomics aarch64-atomicrmw-lscp.ll

Merge branch 'main' into users/chinmaydd/builtin-convert-from-arbitrary-fp
DeltaFile
+19,205-18,966llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+15,666-15,524llvm/lib/Target/Hexagon/HexagonDepIICScalar.td
+7,746-8,018llvm/lib/Target/Hexagon/HexagonDepIICHVX.td
+4,870-4,906llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+9,174-0llvm/test/CodeGen/AArch64/Atomics/aarch64-atomicrmw-lscp.ll
+4,456-4,506llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+61,117-51,92013,882 files not shown
+787,949-513,40113,888 files

LLVM/project c94d16c — compiler-rt/lib/scudo/standalone mem_map_linux.cpp report_linux.h, compiler-rt/lib/scudo/standalone/tests wrappers_c_test.cpp

[scudo] Avoid deadlock when reporting map errors on glibc (#246746)

The map, unmap and protect error reports call strerror(). On glibc,
strerror() translates the message through gettext, which calls malloc().
If the error is reported while scudo holds its own locks, that malloc()
re-enters the allocator and deadlocks.

This happens when the initial reservation of the primary fails, e.g.
under a low RLIMIT_AS: the thread already holds the TSD registry mutex,
so the process hangs instead of printing the error and aborting.

On glibc >= 2.32, use strerrordesc_np() instead. It is documented as
async-signal-safe and returns the untranslated message. Other C
libraries keep using strerror(); musl and bionic don't allocate in it.
The mincore() failure message gets the same treatment.

Add a regression test that reports a map error while the allocator is
disabled with malloc_disable().
DeltaFile
+30-3compiler-rt/lib/scudo/standalone/report_linux.cpp
+18-0compiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp
+5-0compiler-rt/lib/scudo/standalone/report_linux.h
+1-1compiler-rt/lib/scudo/standalone/mem_map_linux.cpp
+54-44 files

LLVM/project 083db35 — libc/test/UnitTest GTest.h

[libc][test] Add stream printers, Types, and file paths to GTest.h (#247346)

Bring libc/test/UnitTest/GTest.h up to parity with LibcTest.h for
building llvm-libc unit tests against GoogleTest:

- Include TestFilePath.h so libc_make_test_file_path dispatches to
  libc_make_test_file_path_func (matching LibcTest.h, where tests using
  it link CmakeFilePath.cpp or BazelFilePath.cpp rather than falling
  back to Test.h's bare-filename macro), and include TestLogger.h for
  LIBC_NAMESPACE::testing::tlog.
- Re-export ::testing::Types into LIBC_NAMESPACE::testing for typed
  test suites.
- Provide ::std::ostream operator<< overloads for cpp::string_view,
  cpp::string, and BigInt, plus ADL PrintTo overloads for
  cpp::string_view and cpp::string so GoogleTest prints them as strings
  rather than character containers.
- Undefine the XSI isascii and toascii macros that system <ctype.h> may
  leak transitively through <gtest/gtest.h> and <ostream> and collide
  with qualified LIBC_NAMESPACE::isascii and LIBC_NAMESPACE::toascii

    [6 lines not shown]
DeltaFile
+52-5libc/test/UnitTest/GTest.h
+52-51 files

LLVM/project 8eeb970 — llvm/lib/CodeGen/GlobalISel GISelValueTracking.cpp, llvm/unittests/CodeGen/GlobalISel KnownBitsTest.cpp

[GlobalISel] Use source known bits in G_ASSERT_ALIGN (#246927)

Compute the source's known bits before setting the low zero bits from
the alignment.

Assisted-by: Claude Opus 5.5
DeltaFile
+26-0llvm/unittests/CodeGen/GlobalISel/KnownBitsTest.cpp
+3-2llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
+29-22 files

LLVM/project 37debf0 — clang-tools-extra/test/clang-doc compile_flags.txt CMakeLists.txt

[clang-doc][test] Avoid compdb lookups in clang-doc tests (#247381)

In #247006, it was pointed out that our tests are searching the build
dir and picking up the local compdb. This breaks w/ PCH enabled builds,
as the compiler has been modified.

Instead of passing `--` to every test, follow the clangd example and use
an empty compile_flags.txt file generated by the build, and a checked in
file for our test dir. This means we won't silently regress, when
someone forgets to suffix `--` on a RUN line, and tests that pass
specific combdb params will work per normal.
DeltaFile
+4-0clang-tools-extra/test/clang-doc/CMakeLists.txt
+0-0clang-tools-extra/test/clang-doc/compile_flags.txt
+4-02 files

LLVM/project b68acb5 — llvm/test/CodeGen/AMDGPU mad-mix-lo.ll, llvm/test/CodeGen/RISCV/GlobalISel/instruction-select/rvv urem.mir udiv.mir

Merge branch 'main' into users/dhruvachak/refactor-rp-av
DeltaFile
+2,567-2,884llvm/test/CodeGen/X86/vector-compress.ll
+1,122-79llvm/test/CodeGen/AMDGPU/mad-mix-lo.ll
+953-0llvm/test/Transforms/LoopVectorize/any-of-non-cmp-cond.ll
+801-0llvm/test/Instrumentation/MemorySanitizer/address-space.ll
+752-0llvm/test/CodeGen/RISCV/GlobalISel/instruction-select/rvv/urem.mir
+752-0llvm/test/CodeGen/RISCV/GlobalISel/instruction-select/rvv/udiv.mir
+6,947-2,9631,828 files not shown
+74,712-18,3951,834 files

LLVM/project 1c42816 — llvm/lib/Target/Mips NanoMipsInstrInfo.td, llvm/lib/Target/Mips/MCTargetDesc MipsInstPrinter.cpp

[ASM 1][nanoMIPS] Add basic operand print methods
DeltaFile
+255-0llvm/test/MC/Mips/nanomips/valid.s
+45-3llvm/lib/Target/Mips/MCTargetDesc/MipsInstPrinter.cpp
+18-0llvm/lib/Target/Mips/NanoMipsInstrInfo.td
+7-7llvm/test/CodeGen/Mips/nanomips/32bit-system.mir
+6-6llvm/test/CodeGen/Mips/nanomips/16bit.mir
+5-5llvm/test/CodeGen/Mips/nanomips/32bit-alu.mir
+336-212 files not shown
+342-238 files

LLVM/project 864916d — llvm/lib/Target/Mips NanoMipsInstrInfo.td, llvm/lib/Target/Mips/Disassembler MipsDisassembler.cpp

[ASM 1][nanoMIPS] Add basic disassembler support
DeltaFile
+150-5llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp
+133-0llvm/test/MC/Mips/nanomips/valid.s
+24-0llvm/test/MC/Mips/crc/valid-nanomips.s
+11-0llvm/test/MC/Mips/ginv/valid-nanomips.s
+6-0llvm/lib/Target/Mips/NanoMipsInstrInfo.td
+2-1llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
+326-66 files

LLVM/project d61fc84 — llvm/lib/Target/Mips NanoMipsInstrInfo.td, llvm/lib/Target/Mips/AsmParser MipsAsmParser.cpp

[ASM 1][nanoMIPS] Add basic assembler support
DeltaFile
+419-57llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+299-0llvm/test/MC/Mips/nanomips/valid.s
+175-18llvm/lib/Target/Mips/NanoMipsInstrInfo.td
+142-0llvm/test/MC/Mips/nanomips/cp0sel-names.s
+29-8llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp
+33-0llvm/test/MC/Mips/crc/invalid-nanomips.s
+1,097-837 files not shown
+1,148-9113 files

LLVM/project 7a01507 — llvm/lib/Target/M68k M68kInstrInfo.cpp

[M68k] ExpandMOVI - remove ambiguous cast (#245011)

MSVC fails to determine how to cast from the MachineInstrBuilder to a
MachineBasicBlock::iterator.

Since this is only used for a debugging message I've removed the code to
fix the build, but we can tweak the code (get buildClearRegister to
return the last created MachineInstr?) if necessary.
DeltaFile
+0-2llvm/lib/Target/M68k/M68kInstrInfo.cpp
+0-21 files

LLVM/project 706659a — llvm/lib/Target/RISCV/GISel RISCVInstructionSelector.cpp, llvm/test/CodeGen/RISCV/GlobalISel half-zfa.ll float-zfa.ll

[RISCV][GlobalISel] Use Zfa fli for floating-point constants (#246564)

G_FCONSTANT always built the value in a GPR and moved it with fmv, so
even 1.0 took two instructions and f64 on RV32 went through the stack.
Select fli when Zfa can encode the constant, using fli + fneg for the
negative values that are not in the table, matching SelectionDAG.
DeltaFile
+58-0llvm/test/CodeGen/RISCV/GlobalISel/double-zfa.ll
+48-0llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp
+37-0llvm/test/CodeGen/RISCV/GlobalISel/half-zfa.ll
+37-0llvm/test/CodeGen/RISCV/GlobalISel/float-zfa.ll
+180-04 files

LLVM/project 74f1f9a — llvm/lib/Target/AMDGPU GCNSchedStrategy.h GCNSchedStrategy.cpp

[AMDGPU][NFC] Make getRegisterPressures a static helper

getRegisterPressures no longer uses any members of GCNSchedStrategy, so
make it a static helper in GCNSchedStrategy.cpp.

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+6-3llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
+0-6llvm/lib/Target/AMDGPU/GCNSchedStrategy.h
+6-92 files

LLVM/project 8ad5226 — clang/lib/Basic/Targets AMDGPU.h AMDGPU.cpp

[Clang][AMDGPU] Remove redundant isAMDGCN checks. NFC

After the r600 target removal, AMDGPUTargetInfo is only created for
the amdgcn triple, so every `isAMDGCN()` check in it is always true.
Drop those checks and the helpers that only wrapped them.

```
if (hasFMAF())
  Builder.defineMacro("__HAS_FMAF__");
  -->
Builder.defineMacro("__HAS_FMAF__");
```

RFC: https://discourse.llvm.org/t/rfc-amdgpu-deprecating-and-removing-llvm-s-r600-terascale-backend/92840
DeltaFile
+15-22clang/lib/Basic/Targets/AMDGPU.cpp
+5-25clang/lib/Basic/Targets/AMDGPU.h
+20-472 files

LLVM/project d8ebdcf — clang/docs UsersManual.md, clang/include/clang/Basic BuiltinsAMDGPUDocs.td BuiltinsAMDGPU.td

[Clang][AMDGPU] Remove R600 target support (#246817)

Remove the r600 triple from the clang frontend, driver and CodeGen,
together with the `__R600__` macro and the `__builtin_r600_*` builtins.
AMDGPUTargetInfo now only handles amdgcn, so the R600 branches are gone.

```
$ clang --target=r600 -S test.cl
error: unknown target triple 'r600'
```

RFC: https://discourse.llvm.org/t/rfc-amdgpu-deprecating-and-removing-llvm-s-r600-terascale-backend/92840
DeltaFile
+41-68clang/lib/Basic/Targets/AMDGPU.h
+6-17clang/lib/Basic/Targets/AMDGPU.cpp
+0-17clang/include/clang/Basic/BuiltinsAMDGPU.td
+0-6clang/lib/CodeGen/TargetBuiltins/AMDGPU.cpp
+0-6clang/docs/UsersManual.md
+3-3clang/include/clang/Basic/BuiltinsAMDGPUDocs.td
+50-11710 files not shown
+54-13016 files

LLVM/project 2de1f4e — llvm/lib/Target/AMDGPU GCNSchedStrategy.cpp GCNSchedStrategy.h

[AMDGPU][NFC] Make CandUnifiedVGPRPressure a local in initCandidate

CandUnifiedVGPRPressure is now only set and read in initCandidate, so
make it a local there and remove the member.

Co-authored-by: Cursor <cursoragent at cursor.com>
DeltaFile
+0-4llvm/lib/Target/AMDGPU/GCNSchedStrategy.h
+2-0llvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
+2-42 files

LLVM/project 1c4601d — llvm/lib/Target/Mips MipsInstrFormats.td MicroMipsInstrFormats.td, llvm/lib/Target/Mips/AsmParser MipsAsmParser.cpp

[ASM 1][nanoMIPS] Name the asm parser variant and tag Mips instruction classes
DeltaFile
+8-1llvm/lib/Target/Mips/Mips.td
+6-2llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
+5-0llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h
+3-1llvm/lib/Target/Mips/MipsInstrInfo.td
+2-0llvm/lib/Target/Mips/MicroMipsInstrFormats.td
+1-0llvm/lib/Target/Mips/MipsInstrFormats.td
+25-43 files not shown
+28-49 files

LLVM/project f92085c — llvm/test/CodeGen/Mips/nanomips 48bit.mir 32bit-branch.mir

[ASM 1][nanoMIPS] Print ABI register names for P32
DeltaFile
+56-56llvm/test/CodeGen/Mips/nanomips/32bit-alu.mir
+54-54llvm/test/CodeGen/Mips/nanomips/32bit-load-store.mir
+35-35llvm/test/CodeGen/Mips/nanomips/16bit.mir
+20-20llvm/test/CodeGen/Mips/nanomips/32bit-system.mir
+19-19llvm/test/CodeGen/Mips/nanomips/32bit-branch.mir
+7-7llvm/test/CodeGen/Mips/nanomips/48bit.mir
+191-1913 files not shown
+204-1959 files

LLVM/project 2c22f9d — llvm/lib/Target/Mips MipsRegisterInfo.td NanoMipsInstrInfo.td, llvm/lib/Target/Mips/MCTargetDesc MipsMCCodeEmitter.h MipsMCCodeEmitter.cpp

[ASM 1][nanoMIPS] Add register and immediate encodings
DeltaFile
+121-0llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp
+32-7llvm/lib/Target/Mips/NanoMipsInstrInfo.td
+33-0llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h
+2-2llvm/test/CodeGen/Mips/nanomips/48bit.mir
+2-2llvm/test/CodeGen/Mips/nanomips/32bit-alu.mir
+2-0llvm/lib/Target/Mips/MipsRegisterInfo.td
+192-116 files

LLVM/project 0b773d2 — utils/bazel/llvm-project-overlay/libc/src/string/memory_utils BUILD.bazel

[Bazel] Fix libc build after dfd4bf2 (#247379)

This introduced a new header that the bazel build didn't know about. Add
it to the BUILD files to get the build working again.
DeltaFile
+3-0utils/bazel/llvm-project-overlay/libc/src/string/memory_utils/BUILD.bazel
+3-01 files

LLVM/project 8ad177b — llvm/lib/Target/AMDGPU AMDGPULowerModuleLDSPass.cpp, llvm/test/CodeGen/AMDGPU remove-no-kernel-id-attribute.ll

[AMDGPU] Use a disjoint scope domain for merged LDS structs

When lowering LDS values, all the values are mutually disjoint, so we
can use the newly-added disjoint scopes feature to simplify the IR.

AI disclosure: Claude wrote this and I reviewed it and wrote the
 commit message
DeltaFile
+16-49llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
+8-12llvm/test/CodeGen/AMDGPU/remove-no-kernel-id-attribute.ll
+24-612 files

LLVM/project 3082b95 — llvm/test/CodeGen/AMDGPU lower-kernel-and-module-lds.ll lower-module-lds-via-hybrid.ll

Test fixups
DeltaFile
+28-19llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-merge.ll
+36-10llvm/test/CodeGen/AMDGPU/lower-module-lds-precise-allocate-to-module-struct.ll
+17-17llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-memcpy.ll
+15-18llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa.ll
+11-13llvm/test/CodeGen/AMDGPU/lower-module-lds-via-hybrid.ll
+9-9llvm/test/CodeGen/AMDGPU/lower-kernel-and-module-lds.ll
+116-865 files not shown
+148-12011 files

LLVM/project 8c9cd09 — mlir/lib/Dialect/LLVMIR/Transforms InlinerInterfaceImpl.cpp

Update comment
DeltaFile
+2-2mlir/lib/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.cpp
+2-21 files

LLVM/project f3c7a4d — mlir/lib/Dialect/LLVMIR/Transforms InlinerInterfaceImpl.cpp, mlir/test/Dialect/LLVMIR inlining-alias-scopes.mlir

[mlir][LLVM] Use a disjoint scope domain when inlining noalias

This matches recent changes to the LLVM inliner.

AI disclosure: Claude wrote the code, I wrote the commit message and
have done initial review.
DeltaFile
+28-25mlir/lib/Dialect/LLVMIR/Transforms/InlinerInterfaceImpl.cpp
+10-18mlir/test/Dialect/LLVMIR/inlining-alias-scopes.mlir
+38-432 files

LLVM/project 13553c6 — mlir/include/mlir/Dialect/LLVMIR LLVMAttrDefs.td, mlir/lib/Target/LLVMIR ModuleTranslation.cpp ModuleImport.cpp

[mlir][LLVM] Add disjointScopes to AliasScopeDomainAttr (#218772)

This also updates the MLIR-side inliner to clone disjoint domains
while cloning alias scopes, matching changes to LLVM.

AI disclosure: Claude wrote the code, I wrote the commit message and
looked at the code.

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply at anthropic.com>
DeltaFile
+35-0mlir/test/Dialect/LLVMIR/inlining-alias-scopes.mlir
+25-0mlir/test/Target/LLVMIR/Import/metadata-alias-scopes.ll
+23-0mlir/test/Target/LLVMIR/attribute-alias-scopes.mlir
+17-2mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
+2-2mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+3-1mlir/lib/Target/LLVMIR/ModuleImport.cpp
+105-51 files not shown
+107-67 files

LLVM/project 1d421ae — mlir/include/mlir/Dialect/OpenACC OpenACCOpsInterfaces.h

[mlir][bazel] Add missing include statements. (#247372)

PR 246113 made several changes to OpenACCOpsInterfaces, but omitted
adding several include statements to OpenACCOpsInterfaces.h. This broke
the Bazel build.

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

Adding these include statements fixes the bazel build.
DeltaFile
+3-0mlir/include/mlir/Dialect/OpenACC/OpenACCOpsInterfaces.h
+3-01 files

LLVM/project 153d65c — compiler-rt/lib/asan asan_rtl.cpp

[asan] Use FastCheckForUnpoisonedRegion in __asan_loadN/__asan_storeN (#247039)

Add an inline `FastCheckForUnpoisonedRegion` fast path with early
returns to `__asan_loadN`, `__asan_storeN`, their `_exp`/`_noabort`
variants, and `__asan_report_assume_dereferenceable{,_noabort}` before
falling back to `__asan_region_is_poisoned`. This matches
`ACCESS_MEMORY_RANGE` and avoids the out-of-line
`__asan_region_is_poisoned` call for common small unpoisoned accesses.

Affects builds with "-fsanitize-address-outline-instrumentation".
Improves performance of clang built with Asan by up to 10%.
I see similar improvement on test-suite.

Assisted-by: Gemini
DeltaFile
+54-32compiler-rt/lib/asan/asan_rtl.cpp
+54-321 files

LLVM/project 5ae6ef3 — llvm/lib/Transforms/Scalar ConstraintElimination.cpp

debug counter + dump
DeltaFile
+11-1llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+11-11 files

LLVM/project 160e984 — llvm/lib/Transforms/Scalar ConstraintElimination.cpp

clarifying parens
DeltaFile
+1-1llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+1-11 files