[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)
[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
[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]
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.
[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)
[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.
[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)
[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>
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)
[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>
[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
[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]
[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.
[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]
[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.
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)
[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.