LLVM/project ff46298mlir/lib/Conversion/GPUToSPIRV GPUToSPIRV.cpp, mlir/test/Conversion/GPUToSPIRV reductions.mlir

[mlir][SPIR-V] Support bitwise and/or/xor in gpu reduction lowering (#202351)
DeltaFile
+142-0mlir/test/Conversion/GPUToSPIRV/reductions.mlir
+40-2mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
+182-22 files

LLVM/project 840060fllvm/lib/Target/RISCV RISCVInstrInfo.cpp, llvm/test/CodeGen/RISCV/rvv vmerge-peephole.mir

[RISCV] Don't move memory instructions across calls in isSafeToMove (#212236)

RISCVInstrInfo::isSafeToMove scans the instructions between From and To
to decide whether a memory instruction can be moved, but it only treated
mayStore() instructions as barriers. Calls on RISC-V are modeled with
isCall() and a register mask rather than mayStore(), so a load could be
moved across a call even though the callee may clobber the loaded
memory.

RISCVVectorPeephole::foldVMergeToMask uses this helper via ensureDominates()
to sink a load into a masked load when folding it into a vmerge, which
produced wrong code when the load was sunk past a call.

Instead of hand-rolling the barrier check, call MachineInstr::isSafeToMove
on each intervening instruction to populate SawStore. That is the same
helper used on From below, and it already treats calls (as well as PHIs
and ordered memory references) as stores.

This fixes #212226.

Assisted-by: TRAE CLI (DeepSeek V4 Pro)
DeltaFile
+24-0llvm/test/CodeGen/RISCV/rvv/vmerge-peephole.mir
+2-3llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
+26-32 files

LLVM/project 6bb30c0clang/include/clang/Basic ExpressionTraits.h TypeTraits.h, clang/lib/Basic ExpressionTraits.cpp TypeTraits.cpp

[clang][NFC] fold ExpressionTraits and TypeTraits helpers into BuiltinTraits (#210838)

ExpressionTraits.h defines utilities such as `getTraitName`,
`getTraitSpelling` and an enumeration for expression traits. All other
overloads of these utilities can be found in TypeTraits.h - this patch
combines them to BuiltinTraits.h/cpp.

This is a followup patch for
https://github.com/llvm/llvm-project/pull/201491#discussion_r3460883247
DeltaFile
+82-0clang/lib/Basic/BuiltinTraits.cpp
+0-70clang/lib/Basic/TypeTraits.cpp
+67-0clang/include/clang/Basic/BuiltinTraits.h
+0-59clang/include/clang/Basic/TypeTraits.h
+0-37clang/include/clang/Basic/ExpressionTraits.h
+0-35clang/lib/Basic/ExpressionTraits.cpp
+149-20118 files not shown
+178-22524 files

LLVM/project b443896llvm/lib/Transforms/Vectorize VPlanUtils.h

[VPlan] Use pointee-range in blocksOnly (NFC) (#212441)

The map_range can be replaced by make_pointee_range.
DeltaFile
+5-6llvm/lib/Transforms/Vectorize/VPlanUtils.h
+5-61 files

LLVM/project 84d5da8llvm/utils/release test-release.sh

[llvm][release] Build openmp as runtime in test-release.sh (#212111)

`test_release.sh` tries to build `openmp` as a project, which breaks the
build:

```
CMake Error at CMakeLists.txt:155 (message):

  Support for the LLVM_ENABLE_PROJECTS=openmp build mode has been removed.
  Please switch to the bootstrapping build

      cmake -S <llvm-project>/llvm -B build -DLLVM_ENABLE_PROJECTS=clang -DLLVM_ENABLE_RUNTIMES=openmp

  or to the runtimes default build

      cmake -S <llvm-project>/runtimes -B build -DLLVM_ENABLE_RUNTIMES=openmp
```

This patch switches it to a runtime to match.

    [4 lines not shown]
DeltaFile
+1-1llvm/utils/release/test-release.sh
+1-11 files

LLVM/project aec0ee3clang/test/Driver invalid-target-id.cl openmp-invalid-target-id.c

clang/AMDGPU: Add missing driver tests for invalid target names

Make sure -march and -mcpu both error for nonoffload and for
-Xopenmp-target arguments. Defends against regression I almost
introduced.
DeltaFile
+6-0clang/test/Driver/openmp-invalid-target-id.c
+4-0clang/test/Driver/invalid-target-id.cl
+10-02 files

LLVM/project dce4a36.github/workflows release-tasks.yml

workflows/release-tasks: Fix permissions for release-documentation (#212310)

(cherry picked from commit b9a7aad4a9d50b9ec60b59d197be43a973a0572c)
DeltaFile
+4-0.github/workflows/release-tasks.yml
+4-01 files

LLVM/project 27530c4clang/test/OffloadTools/clang-offload-bundler basic.c

test
DeltaFile
+11-0clang/test/OffloadTools/clang-offload-bundler/basic.c
+11-01 files

LLVM/project 8cf0057clang/lib/Basic/Targets AMDGPU.cpp, clang/lib/Driver OffloadBundler.cpp

Fixes and merge
DeltaFile
+8-4clang/lib/Basic/Targets/AMDGPU.cpp
+4-3clang/lib/Driver/OffloadBundler.cpp
+12-72 files

LLVM/project 74aae4ellvm/lib/Transforms/Vectorize VPlanUtils.cpp

[VPlan] Eta-reduce fn in pullOutPermutations (NFC) (#212439)

fun x => f x can be eta-reduced to just f.
DeltaFile
+1-2llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+1-21 files

LLVM/project 46c4de8clang/lib/Driver/ToolChains Linux.cpp, clang/test/Driver aarch64-ptrauth.c

[PAC][clang] Enable `-fptrauth-elf-got` as part of pauthtest
DeltaFile
+3-3clang/test/Driver/aarch64-ptrauth.c
+4-0clang/lib/Driver/ToolChains/Linux.cpp
+7-32 files

LLVM/project 38550ffcompiler-rt/lib/sanitizer_common/tests sanitizer_procmaps_test.cpp

[sanitizer_common][tests] Skip MemoryMapping::ParseUnixMemoryProfile … (#212114)

…etc. on NetBSD

The `Sanitizer-x86_64-Test` test doesn't link on NetBSD/amd64 10.1:

```
/usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x25
SANITIZER_TEST_OBJECTS.sanitizer_procmaps_test.cpp.x86_64.o: in function `__sanitizer::MemoryMapping_ParseUnixMemoryProfile_Test::TestBody()':
sanitizer_procmaps_test.cpp:(.text._ZN11__sanitizer41MemoryMapping_ParseUnixMemoryProfile_Test8TestBodyEv+0x52): undefined reference to `__sanitizer::ParseUnixMemoryProfile(void (*)(unsigned long, unsigned long, bool, unsigned long*), unsigned long*, char*, unsigned long)'
/usr/bin/ld: SANITIZER_TEST_OBJECTS.sanitizer_procmaps_test.cpp.x86_64.o: in function `__sanitizer::MemoryMapping_ParseUnixMemoryProfileTruncated_Test::TestBody()':
sanitizer_procmaps_test.cpp:(.text._ZN11__sanitizer50MemoryMapping_ParseUnixMemoryProfileTruncated_Test8TestBodyEv+0x17a): undefined reference to `__sanitizer::ParseUnixMemoryProfile(void (*)(unsigned long, unsigned long, bool, unsigned long*), unsigned long*, char*, unsigned long)'

```

Fixed by skipping the affected subtest.

Tested on `amd64-pc-netbsd10.1` and `x86_64-pc-linux-gnu`.

(cherry picked from commit 0cc7159125eacd3abdff94eb7e634c1a8f889d1e)
DeltaFile
+3-0compiler-rt/lib/sanitizer_common/tests/sanitizer_procmaps_test.cpp
+3-01 files

LLVM/project 214f296clang/test/Driver aarch64-ptrauth.c

[PAC][clang][test] Fix incorrect usage of `-NOT` suffix for FileCheck

Previously, `-NOT` checks were not doing what was intended: checking
that given strings are not present within the same line where other
patterns are confirmed present by other checks. `-NOT` semantics is
checking pattern absense in between other checks, not total absense.

This patch makes use of `--implicit-check-not` instead for this purpose.
DeltaFile
+11-12clang/test/Driver/aarch64-ptrauth.c
+11-121 files

LLVM/project 8eddfe6llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/AArch64 buildvector-used-by-insertvalue.ll

[SLP] Only consider BuildVector inserts into the same object. (#212269)

When following insertelement instruction for a BuildVector sequence, we
may discover a user that inserts into a different vector.

Bail out when that happens instead of crashing.

PR: https://github.com/llvm/llvm-project/pull/212269
(cherry picked from commit 07aa3b710f2622f662cab7a53ddf1288c725a9be)
DeltaFile
+59-0llvm/test/Transforms/SLPVectorizer/AArch64/buildvector-used-by-insertvalue.ll
+3-1llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+62-12 files

LLVM/project b626ec0mlir/include/mlir/Dialect/Tosa/IR TosaComplianceData.h.inc, mlir/test/Dialect/Tosa invalid_extension.mlir ops.mlir

[mlir][tosa] Add FP8 and MXFP support to RESIZE (#212276)

- Added FP8 and all six MXFP extension/type combinations
- Updated RESIZE availability and enforced NEAREST_NEIGHBOR for MXFP
- Added positive, negative, version, extension, mixed-type, and verifier
tests.

Signed-off-by: Peng Sun <peng.sun at arm.com>
DeltaFile
+34-0mlir/test/Dialect/Tosa/tosa-validation-version-1p1-valid.mlir
+29-1mlir/include/mlir/Dialect/Tosa/IR/TosaComplianceData.h.inc
+22-0mlir/test/Dialect/Tosa/tosa-validation-version-1p0-invalid.mlir
+22-0mlir/test/Dialect/Tosa/invalid.mlir
+21-0mlir/test/Dialect/Tosa/ops.mlir
+20-0mlir/test/Dialect/Tosa/invalid_extension.mlir
+148-14 files not shown
+171-310 files

LLVM/project 9ed0d62.github/workflows release-binaries.yml

workflows/release-binaries: Add missing action to checkout (#211720)

The upload-release-artifact action uses the require-team-membership
action so we need to make sure that latter is checkout out when calling
upload-release-artifact.

(cherry picked from commit 3c6d9cdb08c9245bb4d80e3262f74ea372046bcb)
DeltaFile
+1-0.github/workflows/release-binaries.yml
+1-01 files

LLVM/project 7e17195llvm/lib/Analysis IVDescriptors.cpp, llvm/lib/Transforms/Utils LoopUtils.cpp

[LoopUnroll] Allow vector types for minmax reductions (#207630)

Our downstream patched RecurrenceDescriptor in IVDescriptors.cpp to
recognize min/max reductions on vector-typed phis. After ffa02793,
vector min/max intrinsic reductions now flow into getReductionIdentity()
with vector type and then runtime-unroll-reductions-min-max.ll test
crashed.
This PR upstreams our RecurrenceDescriptor change to avoid further
downstream change to LoopUtils.cpp (in this PR) that fixes the crash.

LIT change in runtime-unroll-reductions-min-max.ll shows a long serial
reduction chain now breaks into two independent ones, which is the
purpose of unroll-add-parallel-reductions.

---------

Co-authored-by: skozhukh <sergey.s.kozhukhov at intel.com>
DeltaFile
+346-9llvm/test/Transforms/LoopUnroll/runtime-unroll-reductions-min-max.ll
+47-0llvm/unittests/Analysis/IVDescriptorsTest.cpp
+1-1llvm/lib/Transforms/Utils/LoopUtils.cpp
+1-1llvm/lib/Analysis/IVDescriptors.cpp
+395-114 files

LLVM/project f181815llvm/unittests/CAS OnDiskCASLoggerTest.cpp

[llvm][cas] Fix OnDiskCASLoggerTest.cpp compilation on NetBSD (#212113)

`CAS/OnDiskCASLoggerTest.cpp` doesn't compile on NetBSD/amd64:

```
In member function `virtual void OnDiskCASLoggerTest_MultiProcess_Test::TestBody()':
llvm/unittests/CAS/OnDiskCASLoggerTest.cpp:230:19: error: reference to `Wait' is ambiguous
  230 |     auto Result = Wait(PI, /*Timeout=*/15, &Error);
      |                   ^~~~
In file included from llvm/unittests/CAS/OnDiskCASLoggerTest.cpp:15:
llvm/include/llvm/Support/Program.h:212:22: note: candidates are: `llvm::sys::ProcessInfo llvm::sys::Wait(const llvm::sys::ProcessInfo&, std::optional<unsigned int>, std::string*, std::optional<llvm::sys::ProcessStatistics>*, bool)'
  212 | LLVM_ABI ProcessInfo Wait(
      |                      ^~~~
In file included from llvm/include/llvm/Support/RWMutex.h:17,
                 from llvm/include/llvm/Support/ThreadPool.h:21,
                 from llvm/unittests/CAS/OnDiskCASLoggerTest.cpp:16:
llvm/include/llvm/Support/Threading.h:60:40: note:                 `llvm::InitStatus llvm::Wait'
   60 |   enum InitStatus { Uninitialized = 0, Wait = 1, Done = 2 };
      |                                        ^~~~

    [7 lines not shown]
DeltaFile
+1-1llvm/unittests/CAS/OnDiskCASLoggerTest.cpp
+1-11 files

LLVM/project 01f5362llvm/test/CodeGen/Hexagon swp-epilog-phi12.mir

[Hexagon] Fix missing requires assert for swp-epilog-phi12.mir (#212062)

(cherry picked from commit 0a7d5c755e6280ca94f09b3fe2301133c0a9f9a2)
DeltaFile
+1-0llvm/test/CodeGen/Hexagon/swp-epilog-phi12.mir
+1-01 files

LLVM/project a1194bellvm/lib/Target/SPIRV/MCTargetDesc SPIRVInstPrinter.cpp, llvm/test/CodeGen/SPIRV literals.ll

[SPIR-V] Fix hex float exponent for f64 Inf/NaN literals (#212295)

The asm printer hardcoded the f32 exponent (+128) when printing Inf/NaN
as hex floats, so f64 Inf/NaN literals were misencoded and silently
reassembled as finite values by consumers

Derive the exponent from the operand actual semantic instead
DeltaFile
+11-9llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVInstPrinter.cpp
+9-0llvm/test/CodeGen/SPIRV/literals.ll
+20-92 files

LLVM/project 636d8a2lldb/source/Plugins/Process/Linux NativeRegisterContextLinux_arm64.h NativeRegisterContextLinux_arm64.cpp

[lldb][AArch64][Linux] Track all register cache validity in one place (#197113)

In this change I've expanded the existing RegisterSetType enum
to be used as part of a singular cache tracking object which replaces
all the separate booleans. These booleans were hard to track and 
set/reset in the right places.

This new validity object can be reset by default constructing,
and uses a member initialiser so everything starts out as invalid.

RegisterSetType is now a bitmask enum for easier storage.
It's 32-bit now which is enough for now. Just in case we expand it. 
(and I previously updated all sizeof calls to use RegisterSetType
instead of the raw type)

The SME and SME 2 entries have been renamed to ZA and ZT
as this is what ptrace calls them. Note that SME's pseudo registers
are still managed in their own unique way, I hope to address that
later.

    [32 lines not shown]
DeltaFile
+89-115lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
+50-26lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h
+139-1412 files

LLVM/project 2d7aaf6libc/test/src/semaphore/linux CMakeLists.txt semaphore_test.cpp, libc/test/src/unistd truncate_test.cpp chown_test.cpp

[libc] Fix path collisions between unit and hermetic tests (#212425)

Use the APPEND_LIBC_TEST macro to ensure each test gets a unique path to
operate on. Enable the affected tests in hermetic mode.
DeltaFile
+10-6libc/test/src/unistd/syscall_test.cpp
+3-3libc/test/src/unistd/CMakeLists.txt
+3-3libc/test/src/semaphore/linux/semaphore_test.cpp
+1-1libc/test/src/unistd/truncate_test.cpp
+1-1libc/test/src/unistd/chown_test.cpp
+1-1libc/test/src/semaphore/linux/CMakeLists.txt
+19-156 files

LLVM/project 6520ac7lldb/test/API/linux/aarch64/aarch32_compat Makefile main.s

[lldb][test][AArch64] Add test for AArch32 compatibility execution (#211793)

This should catch obvious problems like the one in #211692 in
future.

To run AArch32 programs on AArch64 you need a few things:
* Hardware that has AArch32 mode at EL0.
* A kernel built with CONFIG_COMPAT on.
* (usually) A bunch of 32-bit libraries installed.

We are dodging the 3rd one by compiling a standalone assembly
program that doesn't use any other libraries.

With clang being a cross-compiler and lld a cross-linker,
we should be able to do this without any 32-bit compatibility
libraries being installed.

To check for the first 2, we run that program normally.
If it fails to run, we don't have them. If it does run,

    [22 lines not shown]
DeltaFile
+117-0lldb/test/API/linux/aarch64/aarch32_compat/TestAArch64LinuxAArch32Compat.py
+89-0lldb/test/API/linux/aarch64/aarch32_compat/main.s
+21-0lldb/test/API/linux/aarch64/aarch32_compat/Makefile
+227-03 files

LLVM/project b349befllvm/lib/CodeGen/GlobalISel LegalizerHelper.cpp, llvm/test/CodeGen/AArch64/GlobalISel legalize-cttz.mir

[AArch64][GlobalISel] Use integer type for cttz icmp type. (#212327)
DeltaFile
+6-6llvm/test/CodeGen/AArch64/GlobalISel/legalize-cttz.mir
+2-2llvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
+1-1llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
+9-93 files

LLVM/project 437b42fllvm/lib/TableGen TGParser.cpp, llvm/test/TableGen eof-after-endif.td

[TableGen] don't print redundant diagnostic when parser sees Error token at end of file. (#212410)

Fixes #151476. 

Currently TableGen parser emits `error: Unexpected token at top level`
when it sees `tgtok::Error` token after failing to parse the object
list, even though that token's corresponding diagnostics were already
emitted during lexing. This change makes `ParseFile` return true when it
sees `tgtok::Error` at end of file, thereby avoiding the redundant
diagnostic.
DeltaFile
+3-0llvm/lib/TableGen/TGParser.cpp
+1-1llvm/test/TableGen/eof-after-endif.td
+4-12 files

LLVM/project 410b573clang/test/OffloadTools/clang-offload-bundler basic.c

test
DeltaFile
+11-0clang/test/OffloadTools/clang-offload-bundler/basic.c
+11-01 files

LLVM/project c00e365clang/lib/Basic/Targets AMDGPU.cpp, clang/lib/Driver OffloadBundler.cpp

fixes
DeltaFile
+0-10clang/lib/Basic/Targets/AMDGPU.cpp
+4-3clang/lib/Driver/OffloadBundler.cpp
+4-132 files

LLVM/project acc9e8cclang/include/clang/Basic TargetID.h, clang/lib/Basic TargetID.cpp

Fix offload bundler usage of getConflictTargetIDCombination
DeltaFile
+14-9clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp
+11-9clang/include/clang/Basic/TargetID.h
+12-2clang/lib/Driver/OffloadBundler.cpp
+9-4clang/lib/Driver/Driver.cpp
+2-3clang/lib/Basic/TargetID.cpp
+48-275 files

LLVM/project 1a08717clang/include/clang/Basic TargetID.h, clang/lib/Basic TargetID.cpp

clang: Use TargetID parsing from AMDGPUTargetParser

We had grown 2 parallel parsing implementations for
triple+gpu name+feature flag target ID strings. Mostly
eliminate the redundant clang version.

Co-authored-by: Claude (Opus 4.8)
DeltaFile
+30-165clang/lib/Basic/TargetID.cpp
+49-51clang/lib/Driver/ToolChains/AMDGPU.cpp
+27-41clang/lib/Driver/OffloadBundler.cpp
+7-33clang/include/clang/Basic/TargetID.h
+18-14clang/lib/Basic/Targets/AMDGPU.h
+17-14clang/lib/Basic/Targets/AMDGPU.cpp
+148-3185 files not shown
+173-34211 files

LLVM/project 10d1b41llvm/lib/ExecutionEngine/Orc Core.cpp

[ORC] Fix buildSimpleReexportsAliasMap signature. (#212420)

The header declared a `const SymbolNameSet&` argument, but the
implementation took a `SymbolNameSet` by value. Update the
implementation to also take a `const SymbolNameSet&`.

No testcase. The corrected implementation will be used in an upcoming
commit.
DeltaFile
+2-2llvm/lib/ExecutionEngine/Orc/Core.cpp
+2-21 files