LLVM/project d454522llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/Analysis/CostModel/AArch64 sve-intrinsics.ll

[AArch64] Tighten conditions for expanding GET_ACTIVE_LANE_MASK (#208962)

Lower to whilelo in more cases.

For fixed-width even if the operands are <32 bits, expanding is going to
be more expensive compared to promoting the operands from a smaller
type.

For SVE I also added lowering for nxv1i1 type as: `nxv2i1 -> extract
nxv1i1.`
DeltaFile
+117-101llvm/test/CodeGen/AArch64/active_lane_mask.ll
+11-72llvm/test/CodeGen/AArch64/sve-mask-partition.ll
+13-9llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+8-8llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll
+149-1904 files

LLVM/project 7618426libcxx/include/__functional function.h

Revert "[libc++][NFC] Inline std::function members into the class body" (#209555)

Reverts llvm/llvm-project#209461

This is breaking LLDB testing bots and it also failed pre-merge CI.
DeltaFile
+104-37libcxx/include/__functional/function.h
+104-371 files

LLVM/project 4264f91llvm/lib/Support/Windows DynamicLibrary.inc

[NFC] Rename misleading `msvcrt` comment in `Windows/DynamicLibrary.inc` (#208884)

The comment in function `DynamicLibrary::HandleSet::DLSym` referred to
the mysterious `msvc.dll` windows standard dynamic library which simply
doesn't exist and `msvcrt.dll` was likely meant, so fix the comments.
DeltaFile
+2-2llvm/lib/Support/Windows/DynamicLibrary.inc
+2-21 files

LLVM/project 9c7d1d2libcxx/test/std/ranges/range.utility/view.interface view.interface.pass.cpp

[libc++][ranges][NFC] Format `view.interface.pass.cpp` (#209391)

A prerequisite to #205012
DeltaFile
+54-48libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp
+54-481 files

LLVM/project 9eb1e54llvm/utils/lit/tests shtest-format.py shtest-run-at-line.py, llvm/utils/lit/tests/Inputs/shtest-timeout lit.cfg

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+33-66llvm/utils/lit/tests/shtest-format.py
+5-53llvm/utils/lit/tests/shtest-run-at-line.py
+7-30llvm/utils/lit/tests/shtest-timeout.py
+0-36llvm/utils/lit/tests/shtest-external-shell-kill.py
+0-25llvm/utils/lit/tests/shtest-readfile-external.py
+1-11llvm/utils/lit/tests/Inputs/shtest-timeout/lit.cfg
+46-22135 files not shown
+102-35541 files

LLVM/project 3cfb675llvm/utils/lit/tests shtest-run-at-line.py shtest-timeout.py, llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell line-continuation.txt

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+5-53llvm/utils/lit/tests/shtest-run-at-line.py
+7-30llvm/utils/lit/tests/shtest-timeout.py
+0-36llvm/utils/lit/tests/shtest-external-shell-kill.py
+0-25llvm/utils/lit/tests/shtest-readfile-external.py
+1-11llvm/utils/lit/tests/Inputs/shtest-timeout/lit.cfg
+0-12llvm/utils/lit/tests/Inputs/shtest-run-at-line/external-shell/line-continuation.txt
+13-16721 files not shown
+44-25427 files

LLVM/project 27dce19flang/lib/Optimizer/Analysis AliasAnalysis.cpp, flang/test/Analysis/AliasAnalysis alias-analysis-omp-private-boxed-wsloop.mlir alias-analysis-omp-private-unboxed-wsloop.mlir

[flang][OpenMP] Resolve private array source from block-arg owner in alias analysis (#208227)

Part of #208086. `fir::AliasAnalysis::getSource` fails to recognize an
OpenMP private array as an `Allocate` source when its `hlfir.declare` is
nested inside an omp.loop_nest, and conservatively returns `MayAlias`.
This changes `getSource` to resolve the clause-carrying OpenMP op from
the private block argument's owner region, so the private is correctly
classified and does not spuriously alias other objects. Assisted-by: Copilot
DeltaFile
+61-0flang/test/Analysis/AliasAnalysis/alias-analysis-omp-private-boxed-wsloop.mlir
+50-0flang/test/Analysis/AliasAnalysis/alias-analysis-omp-private-unboxed-wsloop.mlir
+10-2flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
+121-23 files

LLVM/project 194f7a3llvm/test/CodeGen/AMDGPU minmax.ll neighboring-mfma-padding.mir

AMDGPU: Migrate CodeGen tests to amdgpu subarch triple (26) (#209487)

Mechanically migrate the command-line target spelling on llc/opt RUN
lines in llvm/test/CodeGen/AMDGPU from -mtriple=amdgcn ... -mcpu=<gfx> to the
folded subarch triple form (e.g. -mtriple=amdgpu9.00-amd-amdhsa), dropping the
redundant -mcpu.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
DeltaFile
+16-16llvm/test/CodeGen/AMDGPU/minmax.ll
+11-11llvm/test/CodeGen/AMDGPU/neighboring-mfma-padding.mir
+8-8llvm/test/CodeGen/AMDGPU/mul.ll
+6-6llvm/test/CodeGen/AMDGPU/mubuf-legalize-operands.ll
+6-6llvm/test/CodeGen/AMDGPU/mubuf-legalize-operands.mir
+6-6llvm/test/CodeGen/AMDGPU/mubuf-legalize-operands-non-ptr-intrinsics.ll
+53-5395 files not shown
+266-267101 files

LLVM/project 4a2cfd7llvm/test/Transforms/LoopVectorize opaque-ptr.ll, llvm/test/Transforms/LoopVectorize/AArch64 partial-reduce-constant-ops.ll

[VPlan] Expand SCEV ptrtoint/ptrtoaddr casts in VPSCEVExpander. (#209172)

Extend the cast handling in VPSCEVExpander::tryToExpand to also expand
scPtrToInt and scPtrToAddr SCEV expressions to PtrToInt/PtrToAddr
VPInstructions.

This allows pointer-distance expressions (e.g. the runtime-check
difference between two pointers, which contains ptrtoint of each
pointer) to be expanded directly to VPInstructions instead of falling
back to a VPExpandSCEVRecipe.

PR: https://github.com/llvm/llvm-project/pull/209172
DeltaFile
+36-36llvm/test/Transforms/LoopVectorize/X86/predicate-switch.ll
+29-30llvm/test/Transforms/LoopVectorize/VPlan/vplan-predicate-switch.ll
+22-22llvm/test/Transforms/LoopVectorize/VPlan/vplan-printing-alias-mask.ll
+21-21llvm/test/Transforms/LoopVectorize/AArch64/partial-reduce-constant-ops.ll
+18-18llvm/test/Transforms/LoopVectorize/opaque-ptr.ll
+15-15llvm/test/Transforms/LoopVectorize/VPlan/AArch64/vplan-printing-alias-mask.ll
+141-14236 files not shown
+339-32942 files

LLVM/project e255003llvm/test/CodeGen/AMDGPU minimumnum.ll memory-legalizer-fence.ll

AMDGPU: Migrate CodeGen tests to amdgpu subarch triple (25) (#209486)

Mechanically migrate the command-line target spelling on llc/opt RUN
lines in llvm/test/CodeGen/AMDGPU from -mtriple=amdgcn ... -mcpu=<gfx> to the
folded subarch triple form (e.g. -mtriple=amdgpu9.00-amd-amdhsa), dropping the
redundant -mcpu.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
DeltaFile
+26-26llvm/test/CodeGen/AMDGPU/minimumnum.ll
+14-14llvm/test/CodeGen/AMDGPU/memory-legalizer-fence.ll
+14-14llvm/test/CodeGen/AMDGPU/memory-legalizer-private-singlethread.ll
+14-14llvm/test/CodeGen/AMDGPU/memory-legalizer-private-system.ll
+14-14llvm/test/CodeGen/AMDGPU/memory-legalizer-private-cluster.ll
+14-14llvm/test/CodeGen/AMDGPU/memory-legalizer-private-wavefront.ll
+96-9693 files not shown
+647-64999 files

LLVM/project 4697832llvm/test/CodeGen/AMDGPU maximumnum.ll mad-mix.ll

AMDGPU: Migrate CodeGen tests to amdgpu subarch triple (24) (#209485)

Mechanically migrate the command-line target spelling on llc/opt RUN
lines in llvm/test/CodeGen/AMDGPU from -mtriple=amdgcn ... -mcpu=<gfx> to the
folded subarch triple form (e.g. -mtriple=amdgpu9.00-amd-amdhsa), dropping the
redundant -mcpu.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
DeltaFile
+26-26llvm/test/CodeGen/AMDGPU/maximumnum.ll
+14-14llvm/test/CodeGen/AMDGPU/mad-mix.ll
+12-12llvm/test/CodeGen/AMDGPU/mad-mix-lo.ll
+10-10llvm/test/CodeGen/AMDGPU/mad-mix-hi.ll
+9-9llvm/test/CodeGen/AMDGPU/maximumnum.bf16.ll
+8-8llvm/test/CodeGen/AMDGPU/materialize-frame-index-sgpr.ll
+79-7992 files not shown
+307-30798 files

LLVM/project 83dc9c6flang/lib/Optimizer/Support InitFIR.cpp, mlir/include/mlir/Target/LLVMIR/Dialect/OpenACC OpenACCToLLVMIRTranslation.h

[mlir][openacc] Remove OpenACCToLLVMIRTranslation (#209295)

OpenACCToLLVMIRTranslation was designed more than 5 years ago and does
not align with the current upstreaming effort. OpenACC will be converted
to LLVM IR dialect before the translation to LLVM IR so this translation
is obsolete. Remove it to avoid confusion.
DeltaFile
+0-541mlir/lib/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.cpp
+0-191mlir/test/Target/LLVMIR/openacc-llvm.mlir
+0-31mlir/include/mlir/Target/LLVMIR/Dialect/OpenACC/OpenACCToLLVMIRTranslation.h
+0-24utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+0-14mlir/lib/Target/LLVMIR/Dialect/OpenACC/CMakeLists.txt
+0-3flang/lib/Optimizer/Support/InitFIR.cpp
+0-8047 files not shown
+0-81213 files

LLVM/project 1a072b5llvm/test/CodeGen/SystemZ zos-ppa2.ll

Fix test that had a check embedded which depended on the current LLVM version number. (#209530)

When the test was refactored, it embedded the current LLVM version
number in one of the check strings so that when I bumped the LLVM
version to 24, the test failed since it was expecting 23 but the
compiler was now generating 23.

Fix this issue by changing the check to a regex so it doesn't need
updating after every LLVM version change.
DeltaFile
+2-1llvm/test/CodeGen/SystemZ/zos-ppa2.ll
+2-11 files

LLVM/project cb83c6alibcxx/test/benchmarks/algorithms minmax.bench.cpp min.bench.cpp, libcxx/test/benchmarks/algorithms/nonmodifying search_n.bench.cpp

[libc++][NFC] Remove unused <cassert> from algorithm benchmarks (#209492)

A few benchmark files were including <cassert> but didn't use it.
DeltaFile
+0-1libcxx/test/benchmarks/algorithms/minmax.bench.cpp
+0-1libcxx/test/benchmarks/algorithms/min.bench.cpp
+0-1libcxx/test/benchmarks/algorithms/nonmodifying/search_n.bench.cpp
+0-33 files

LLVM/project 77ff300libc/test/src/sys/mman/linux posix_madvise_test.cpp

[libc] Fix a typo in posix_madvise_test. (#209523)
DeltaFile
+1-1libc/test/src/sys/mman/linux/posix_madvise_test.cpp
+1-11 files

LLVM/project 26e2b09llvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Checkers BUILD.gn

[gn build] Port e1d7480aabee (#209549)
DeltaFile
+1-0llvm/utils/gn/secondary/clang/lib/StaticAnalyzer/Checkers/BUILD.gn
+1-01 files

LLVM/project 61853ballvm/utils/gn/secondary/clang-tools-extra/clang-doc BUILD.gn, llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-doc BUILD.gn

[gn build] Port c6ebd7a2ced7 (#209548)
DeltaFile
+0-1llvm/utils/gn/secondary/clang-tools-extra/clang-doc/BUILD.gn
+0-1llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-doc/BUILD.gn
+0-22 files

LLVM/project c8e2abbllvm/utils/gn/secondary/llvm/lib/Target/BPF BUILD.gn

[gn build] Port a718d2ad092b (#209547)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/Target/BPF/BUILD.gn
+1-01 files

LLVM/project c8c3c30llvm/utils/gn/secondary/clang/lib/ScalableStaticAnalysis/Analyses BUILD.gn, llvm/utils/gn/secondary/clang/unittests/ScalableStaticAnalysis BUILD.gn

[gn build] Port 612e7ca85c53 (#209545)
DeltaFile
+1-1llvm/utils/gn/secondary/clang/unittests/ScalableStaticAnalysis/BUILD.gn
+1-1llvm/utils/gn/secondary/clang/lib/ScalableStaticAnalysis/Analyses/BUILD.gn
+2-22 files

LLVM/project 2eac996llvm/test/CodeGen/AMDGPU local-atomicrmw-fadd.ll local-atomicrmw-fmin.ll

AMDGPU: Migrate CodeGen tests to amdgpu subarch triple (23) (#209214)

Mechanically migrate the command-line target spelling on llc/opt RUN
lines in llvm/test/CodeGen/AMDGPU from -mtriple=amdgcn ... -mcpu=<gfx> to the
folded subarch triple form (e.g. -mtriple=amdgpu9.00-amd-amdhsa), dropping the
redundant -mcpu.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude-Opus-4.8)
DeltaFile
+11-11llvm/test/CodeGen/AMDGPU/local-atomicrmw-fadd.ll
+11-11llvm/test/CodeGen/AMDGPU/local-atomicrmw-fmin.ll
+11-11llvm/test/CodeGen/AMDGPU/local-atomicrmw-fmax.ll
+11-11llvm/test/CodeGen/AMDGPU/local-atomicrmw-fsub.ll
+10-10llvm/test/CodeGen/AMDGPU/lower-buffer-fat-pointers-nontemporal-metadata.ll
+8-8llvm/test/CodeGen/AMDGPU/load-atomic-local.ll
+62-6288 files not shown
+330-33094 files

LLVM/project 6f2cffbllvm/utils/gn/secondary/llvm/lib/Passes BUILD.gn

[gn build] Port 5d5dd83a547e (#209544)
DeltaFile
+0-1llvm/utils/gn/secondary/llvm/lib/Passes/BUILD.gn
+0-11 files

LLVM/project 1f06699llvm/utils/gn/secondary/clang-tools-extra/clang-doc BUILD.gn, llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-doc BUILD.gn

[gn build] Port 1bd46015ea4e (#209543)
DeltaFile
+0-1llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-doc/BUILD.gn
+0-1llvm/utils/gn/secondary/clang-tools-extra/clang-doc/BUILD.gn
+0-22 files

LLVM/project 7d511e4llvm/utils/gn/secondary/clang-tools-extra/clang-doc BUILD.gn, llvm/utils/gn/secondary/clang-tools-extra/clang-doc/markdown BUILD.gn

[gn] port 7633d1e7a0f336 (no more clangDocMarkdown) (#209546)
DeltaFile
+0-6llvm/utils/gn/secondary/clang-tools-extra/clang-doc/markdown/BUILD.gn
+0-1llvm/utils/gn/secondary/clang-tools-extra/clang-doc/BUILD.gn
+0-1llvm/utils/gn/secondary/clang-tools-extra/unittests/clang-doc/BUILD.gn
+0-83 files

LLVM/project 3b11feblibc/src/__support/CPP string.h CMakeLists.txt, utils/bazel/llvm-project-overlay/libc BUILD.bazel

[libc][cpp::string] Don't allocate a string in operator=(string_view)

This PR:

- Updates `opreator=(string_view)` to avoid allocating a temporary string: https://github.com/llvm/llvm-project/blob/67ebc4b221c3e94028b33004cd5cd08deee95048/libc/src/__support/CPP/string.h#L106-L108
- Changes `operator+=(const string&)` to accept a `string_view` so that strings may be appended without allocation.
- Adds asserts to make it clear that `cpp::string` does not support self assignment. Currently, `cpp::string s = "abc"; s = s;` will zero out the string.
DeltaFile
+20-5libc/src/__support/CPP/string.h
+2-0libc/src/__support/CPP/CMakeLists.txt
+2-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+24-53 files

LLVM/project 97f7658clang/test/CodeGen pr9614.c memcmp-inline-builtin-to-asm.c

[Clang] Require x86 target for some tests (#209532)

These tests assert behavior about the always-inliner which now requires
a target to be present to check function attribute compatibility for
inlining.

Fix forward for 37b8e765ce4837a7577e6f762bcdffe4b232759c.
DeltaFile
+2-0clang/test/CodeGen/pr9614.c
+2-0clang/test/CodeGen/memcmp-inline-builtin-to-asm.c
+2-0clang/test/CodeGen/memcpy-inline-builtin.c
+6-03 files

LLVM/project a80e98eclang/lib/CodeGen CGCUDANV.cpp, clang/test/CodeGenCUDA device-stub.cu

[clang][cuda] Use the source filename for module ID (#209239)

Prior to
[#184065](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html
"https://github.com/llvm/llvm-project/issues/184065") (relanded in
[#201849](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html
"https://github.com/llvm/llvm-project/issues/201849")), the code
introduced in https://reviews.llvm.org/D42922 was using the GUID of an
internal linkage GlobalValue to create a module id, which would then be
used in a few cuda-specific places (including creating a symbol name
suffix).
[#184065](vscode-file://vscode-app/Applications/Visual%20Studio%20Code.app/Contents/Resources/app/out/vs/code/electron-browser/workbench/workbench.html
"https://github.com/llvm/llvm-project/issues/184065") assumed the
linkage of that symbol is external - which it isn't - and, thus, all
module IDs computed for this would be identical.

The fix is to not rely on GlobalValue GUIDs in the first place. What is
needed here is a hash that's specific to this module. So we're creating
that and explicitly decoupling that calculation from GlobalValue's

    [8 lines not shown]
DeltaFile
+13-0clang/test/CodeGenCUDA/device-stub.cu
+10-2clang/lib/CodeGen/CGCUDANV.cpp
+23-22 files

LLVM/project 48c2598llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize fmax-without-fast-math-flags.ll

[VPlan] Use VPlan::hasTailFolded in materializeConstantVectorTC. (#209502)

The current checks in materializeConstantVectorTripCount miss
tail-folded cases when vectorizing loops with fmax without fast-math
flags. Use recently added hasTailFolded helper to ensure we always bail
out on tail-folded loops.

Fixes https://github.com/llvm/llvm-project/issues/209159.
DeltaFile
+1-1llvm/test/Transforms/LoopVectorize/fmax-without-fast-math-flags.ll
+1-1llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+2-22 files

LLVM/project 7b54498llvm/lib/Target/Hexagon HexagonPatternsHVX.td HexagonISelLoweringHVX.cpp, llvm/test/CodeGen/Hexagon fminmax-v67.ll fminmax.ll

[Hexagon] Add lowering for `{max,min}num` (#202938)

Since the floating point requirements for `{max,min}num` are less strict
than the ones for `{max,min}imumnum`, it is fine to lower them to the
same instructions that already meet the requirements for the latter.
This is similar to what the RISC-V backend does for example.

This is also a lot better than generating a standard library call.
DeltaFile
+8-0llvm/lib/Target/Hexagon/HexagonPatternsHVX.td
+4-4llvm/test/CodeGen/Hexagon/fminmax-v67.ll
+6-0llvm/lib/Target/Hexagon/HexagonISelLoweringHVX.cpp
+2-2llvm/test/CodeGen/Hexagon/fminmax.ll
+4-0llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
+4-0llvm/lib/Target/Hexagon/HexagonPatterns.td
+28-66 files

LLVM/project fcc7142llvm/test/CodeGen/AMDGPU eliminate-frame-index-v-add-co-u32.mir eliminate-frame-index-s-add-i32.mir

[AMDGPU] Fix CFI emission when scratch instructions are used to spill

4b1cfc5d7c606e "[NFCI][AMDGPU] Final touch before moving to
`GET_SUBTARGETINFO_MACRO` (#177401)" (or more generally the move to
hasFlatScratchEnabled over just enableFlatScratch) was missed during the
CFI upstreaming for AMDGPU, and so we currently define the CFA
incorrectly for the architected flat scratch case.

This incorrect CFI is generated for e.g. gfx942. For such architecture,
the stack pointer (s32) holds a swizzled address (per-lane offset) but
the CFA needs to be an unswizzled address (per-wave).

In the incorrect program, we have a prologue looking like:

        s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
        s_mov_b32 s0, s33
        s_mov_b32 s33, s32
        [...]
        s_add_i32 s32, s32, 16

    [24 lines not shown]
DeltaFile
+76-76llvm/test/CodeGen/AMDGPU/eliminate-frame-index-v-add-co-u32.mir
+50-50llvm/test/CodeGen/AMDGPU/eliminate-frame-index-s-add-i32.mir
+57-37llvm/test/CodeGen/AMDGPU/vgpr-spill.mir
+31-31llvm/test/CodeGen/AMDGPU/eliminate-frame-index-v-add-u32.mir
+20-20llvm/test/CodeGen/AMDGPU/eliminate-frame-index-v-add-co-u32-wave32.mir
+10-10llvm/test/CodeGen/AMDGPU/eliminate-frame-index-scalar-bit-ops.mir
+244-2249 files not shown
+286-26615 files

LLVM/project 0ea1906clang/lib/StaticAnalyzer/Checkers ReportDanglingPtrDeref.cpp, lldb/packages/Python/lldbsuite/test/tools/lldb_dap types.py dap_types.py

Merge branch 'main' into users/bassiounix/clang/c2y/if-decl
DeltaFile
+2,026-0lldb/packages/Python/lldbsuite/test/tools/lldb_dap/types.py
+0-2,026lldb/packages/Python/lldbsuite/test/tools/lldb_dap/dap_types.py
+0-216lldb/packages/Python/lldbsuite/test/tools/lldb_dap/lldb_dap_testcase.py
+216-0lldb/packages/Python/lldbsuite/test/tools/lldb_dap/testcase.py
+105-0llvm/test/Transforms/LoopVectorize/fmax-without-fast-math-flags.ll
+95-0clang/lib/StaticAnalyzer/Checkers/ReportDanglingPtrDeref.cpp
+2,442-2,24289 files not shown
+3,314-2,50695 files