LLVM/project e784c7dllvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-simd-64.ll

[RISCV] Fix crashes and add RV32 RUN line to rvp-simd-64.ll (#194782)

Prevent combinePExtTruncate from forming RISCVISD nodes with illegal
type. Remove unnecessary call to getSimpleVT().

Legalize shift amount when custom legalizing i64 shifts.
SelectionDAGBuilder usually pre-legalizes shift amounts. If we scalarize
a vXi64 vector shift the shift amount will be i64.
DeltaFile
+3,250-1,325llvm/test/CodeGen/RISCV/rvp-simd-64.ll
+12-4llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+3,262-1,3292 files

LLVM/project 1230cfdllvm/test/CodeGen/AMDGPU ptr-arg-dbg-value.ll, llvm/test/CodeGen/BPF/CORE offset-reloc-basic.ll

[AMDGPU] Propagate debug info to constant materialization instr (#192669)

Set the debug location on non-target constant nodes so that the
resulting machine instructions inherit the correct source location.
DeltaFile
+5-4llvm/test/DebugInfo/COFF/jump-table-with-indirect-ptr-null.ll
+4-4llvm/test/tools/llvm-objdump/ELF/AMDGPU/source-lines.ll
+3-3llvm/test/CodeGen/AMDGPU/ptr-arg-dbg-value.ll
+2-2llvm/test/CodeGen/BPF/CORE/offset-reloc-basic.ll
+1-1llvm/test/DebugInfo/AMDGPU/debug-loc-copy.ll
+1-1llvm/test/DebugInfo/ARM/single-constant-use-preserves-dbgloc.ll
+16-151 files not shown
+18-157 files

LLVM/project 70a26a2llvm/docs LangRef.rst TransformMetadata.rst, llvm/lib/Transforms/Scalar WarnMissedTransforms.cpp

[LoopVectorize] Add metadata to distinguish vectorized loop body from scalar remainder (#190258)

Add two new loop metadata attributes — `llvm.loop.vectorize.body` and
`llvm.loop.vectorize.epilogue` — that the loop vectorizer sets on the
generated vector loop and epilogue loop respectively. The metadata is
only emitted when optimization remarks are enabled (`ORE->enabled()`),
so it has zero cost in normal compilation.

These enable downstream passes (LoopUnroll, WarnMissedTransforms) to
produce more precise optimization remarks. Instead of the generic "loop
not unrolled" warning on a source line that was vectorized, the unroller
can now report:
- **"vectorized loop"** for the main vector body
- **"epilogue loop"** for the scalar epilogue/remainder
- **"epilogue vectorized loop"** for an epilogue that was itself
vectorized during epilogue vectorization (carries both attributes)

A shared `getLoopVectorizeKindPrefix()` helper in
`LoopUtils.h`/`LoopUtils.cpp` reads the metadata and returns the

    [17 lines not shown]
DeltaFile
+120-0llvm/test/Transforms/LoopTransformWarning/vectorizer-loop-kind-unroll-warning.ll
+110-0llvm/test/Transforms/LoopUnroll/vectorizer-loop-kind-remarks.ll
+42-0llvm/docs/LangRef.rst
+21-0llvm/docs/TransformMetadata.rst
+10-3llvm/lib/Transforms/Scalar/WarnMissedTransforms.cpp
+12-0llvm/lib/Transforms/Utils/LoopUtils.cpp
+315-35 files not shown
+346-911 files

LLVM/project 63c0520llvm/lib/Target/RISCV RISCVSchedSiFive7.td, llvm/test/CodeGen/RISCV short-forward-branch-opt.ll sifive7-enable-intervals.mir

[RISCV] Use BufferSize = 0 for ProcResGroup in SiFive7 scheduling models (#194754)

As it turns out, even if a `ProcResGroup` consists of in-order pipes, as
long as its (the group's) BufferSize is not zero, Machine Scheduler will
not use in-order scheduling on instructions that consume it. Since
BufferSize also defaults to -1 for `ProcResGroup`, we have been
scheduling the resource consumption of SiFive7's `PipeAB` (scalar pipes)
and `VA1OrVA2` (vector pipes) in an out-of-order fashion!

Co-authored-by: Min Hsu <min.hsu at sifive.com>
DeltaFile
+18-18llvm/test/CodeGen/RISCV/short-forward-branch-opt.ll
+7-7llvm/lib/Target/RISCV/RISCVSchedSiFive7.td
+3-3llvm/test/CodeGen/RISCV/sifive7-enable-intervals.mir
+28-283 files

LLVM/project 2be72edllvm/lib/Transforms/Vectorize SLPVectorizer.cpp

[SLP][NFC] Reduce compile time of isTreeTinyAndNotFullyVectorizable

Cache root entry and SLPCostThreshold queries once, group
!ForReduction-only checks under two blocks, extract a shared benign-node
predicate from the two duplicated lambdas, and skip HasSingleLoad and
allConstant work when results are dead.

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/194895
DeltaFile
+268-198llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+268-1981 files

LLVM/project b46904aclang/lib/CIR/CodeGen CIRGenBuiltinAArch64.cpp, clang/test/CodeGen/AArch64 neon-perm.c

[CIR][AArch64] Lower NEON vzip intrinsics (#193658)

### Summary

part of https://github.com/llvm/llvm-project/issues/185382

lower part of intrinsics in :
https://arm-software.github.io/acle/neon_intrinsics/advsimd.html#zip-elements

Lower NEON::BI__builtin_neon_vzip_v and NEON::BI__builtin_neon_vzipq_v
in CIRGenBuiltinAArch64.cpp by porting the existing incubator logic
(`clangir/clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp`) onto ClangIR:
two bitcasts on the input vectors, two rounds of cir.vec.shuffle
generating the low/high interleave patterns, each stored through a
ptr_stride of the sret base pointer.

### Test
- test_vzip_mf8
- test_vzipq_mf8

    [11 lines not shown]
DeltaFile
+0-376clang/test/CodeGen/AArch64/neon-perm.c
+372-0clang/test/CodeGen/AArch64/neon/perm.c
+0-36clang/test/CodeGen/AArch64/fp8-intrinsics/acle_neon_fp8_untyped.c
+24-1clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
+396-4134 files

LLVM/project f11ad99libcxx/test/selftest/dsl dsl.sh.py, libcxx/utils/libcxx/test/features localization.py

[libcxx][lit] Fixing libcxx test failures on Windows (#194752)

PR#194368 changed how line breaks are handles on Windows and it broke
several libcxx tests on Windows, including
libcxx/test/std/localization/locale.categories/facet.numpunct/
locale.numpunct.byname/thousands_sep.pass.cpp
This patch addresses this issue.
DeltaFile
+5-3libcxx/test/selftest/dsl/dsl.sh.py
+1-1libcxx/utils/libcxx/test/features/localization.py
+6-42 files

LLVM/project 507caafllvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 vector-extract-last-active.ll vector-reduce-smin.ll

[X86] Add custom ISD::VEC_REDUCE_*MIN/MAX lowering (#194848)

Pulled out of #194473 - update combineMinMaxReduction to fold to a
ISD::VECREDUCE_SMAX/SMIN/UMAX/UMIN node and then perform the lowering
later on.

combineMinMaxReduction will go away once we can use
shouldExpandReduction, rely on the middle-end to recognise reductions
and not have to recreate them from the expanded patterns.

I've added pre-SSE41 handling using vector unrolling - hopefully this
will go away once #194672 is in place.
DeltaFile
+109-243llvm/test/CodeGen/X86/vector-extract-last-active.ll
+118-56llvm/lib/Target/X86/X86ISelLowering.cpp
+39-39llvm/test/CodeGen/X86/vector-reduce-smin.ll
+22-44llvm/test/CodeGen/X86/intrinsic-cttz-elts.ll
+28-28llvm/test/CodeGen/X86/vector-reduce-smax.ll
+25-25llvm/test/CodeGen/X86/vector-reduce-umin.ll
+341-4351 files not shown
+355-4497 files

LLVM/project f933bbfllvm/test/TableGen directive2.td directive1.td, llvm/utils/TableGen/Basic DirectiveEmitter.cpp

[TableGen] Use guarded assert in constexpr functions (#194728)

The constexpr functions in question take a scoped enum as an argument
and a switch statement returns a value for each value of the enum. These
are all legal statements in a constexpr function in C++14.

Under constexpr rules, the evaluation of a constexpr function cannot
lead to an evaluation of any prohibited forms of expressions. An
evaluation of the functions being discussed with a valid argument will
terminate at the switch, and an code that follows will not be evaluated.

Using "llvm_unreachable" after the switch should be ok as long as the
expansion of the llvm_unreachable macro does not contain any statements
not allowed to appear in a constexpr function. At the same time, GCC
before v9 did not tolerate any unguarded calls to non-constexpr
functions after the switch.

To avoid using "llvm_unreachable", which can have multiple expansions,
use an assert with an explicit condition that the underlying value of
the argument lies between the minimum and maximum values of the enum.
DeltaFile
+16-12llvm/utils/TableGen/Basic/DirectiveEmitter.cpp
+10-12llvm/test/TableGen/directive2.td
+10-12llvm/test/TableGen/directive1.td
+36-363 files

LLVM/project fe85dc9mlir/include/mlir/Dialect/SPIRV/IR SPIRVCLOps.td, mlir/lib/Dialect/SPIRV/IR SPIRVOps.cpp

[mlir][SPIR-V] Add OpenCL.std ldexp, pown, and rootn ops (#194791)

Add operations that follow `float op(float, int)` pattern, mirroring the
existing `spirv.GL.Ldexp` op
DeltaFile
+120-0mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCLOps.td
+115-0mlir/test/Dialect/SPIRV/IR/ocl-ops.mlir
+38-8mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
+20-0mlir/test/Target/SPIRV/ocl-ops.mlir
+293-84 files

LLVM/project f78419clibcxxabi/test/configs llvm-libc++abi-llvm-libc.cfg.in

[libc++abi][libc][test] Use LLVM-libc headers in LLVM-libc config (#194665)
DeltaFile
+1-1libcxxabi/test/configs/llvm-libc++abi-llvm-libc.cfg.in
+1-11 files

LLVM/project 766a42allvm/lib/CodeGen/AsmPrinter AsmPrinter.cpp, llvm/lib/Target/AArch64 AArch64AsmPrinter.cpp

[CodeGen] Use getFnAttributeAsParsedInteger for patchable-function attributes (#194726)

Replace `getAsInteger()` parsing of the `patchable-function-entry`
and `patchable-function-prefix` function attributes with the existing
`Function::getFnAttributeAsParsedInteger()` helper across AsmPrinter
and all backend targets.

The IR verifier already validates these attributes as unsigned base-10
integers via `checkUnsignedBaseTenFuncAttr`, so parse failure at point
of use indicates a verifier bypass or IR corruption.
`getFnAttributeAsParsedInteger()` returns a default of 0 on failure
(matching the implicit behavior of the old code) and emits a diagnostic
rather than silently continuing.
DeltaFile
+8-15llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+5-12llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
+3-10llvm/lib/Target/X86/X86MCInstLower.cpp
+2-8llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+3-6llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
+2-6llvm/lib/Target/ARM/ARMAsmPrinter.cpp
+23-576 files not shown
+32-8712 files

LLVM/project 095d465llvm/lib/Target/X86 X86MCInstLower.cpp, llvm/test/CodeGen/X86 gfni-lzcnt.ll bitreverse.ll

[X86] Add constant comments for VGF2P8AFFINEQB rmbi forms (#194789)

Handle AVX-512 VGF2P8AFFINEQB rmbi instructions in X86MCInstLower.

Unlike the existing rmi forms, rmbi uses a 64-bit broadcast memory
operand, so the constant pool entry may only contain the broadcast
source instead of a full-width vector constant. Print that constant
repeated across the destination vector width when forming the asm
comment.

Related: https://github.com/llvm/llvm-project/pull/194572
DeltaFile
+31-21llvm/lib/Target/X86/X86MCInstLower.cpp
+20-20llvm/test/CodeGen/X86/gfni-lzcnt.ll
+20-20llvm/test/CodeGen/X86/bitreverse.ll
+12-12llvm/test/CodeGen/X86/gfni-rotates.ll
+9-9llvm/test/CodeGen/X86/gfni-shifts.ll
+8-8llvm/test/CodeGen/X86/gfni-tzcnt.ll
+100-902 files not shown
+113-1038 files

LLVM/project 6238ce1llvm/test/Transforms/LoopVectorize float-induction.ll if-pred-stores.ll, llvm/test/Transforms/LoopVectorize/ARM mve-reductions.ll pointer_iv.ll

[LV][NFC] Regenerate CHECK lines for some tests (#194842)
DeltaFile
+1,513-1,493llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
+1,325-1,285llvm/test/Transforms/LoopVectorize/float-induction.ll
+667-637llvm/test/Transforms/LoopVectorize/ARM/mve-reductions.ll
+579-558llvm/test/Transforms/LoopVectorize/if-pred-stores.ll
+521-513llvm/test/Transforms/LoopVectorize/if-pred-non-void.ll
+375-357llvm/test/Transforms/LoopVectorize/ARM/pointer_iv.ll
+4,980-4,84310 files not shown
+6,346-6,19016 files

LLVM/project 8bdffd0lldb/source/Plugins/Process/gdb-remote ProcessGDBRemote.h ProcessGDBRemote.cpp

fixup! use map typedef
DeltaFile
+2-4lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
+2-3lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+4-72 files

LLVM/project a3a4468lldb/source/Plugins/Process/gdb-remote ProcessGDBRemote.cpp GDBRemoteClientBase.cpp

fixup! make helper method to send packet
DeltaFile
+3-21lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+17-0lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
+5-0lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h
+25-213 files

LLVM/project 7ac0543lldb/source/Plugins/Process/gdb-remote ProcessGDBRemote.cpp

fixup! don't fallback on all packets
DeltaFile
+21-11lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+21-111 files

LLVM/project 9b336e9lldb/include/lldb/Utility GDBRemote.h, lldb/source/Plugins/Process/gdb-remote ProcessGDBRemote.cpp ProcessGDBRemote.h

[lldb] Override UpdateBreakpointSites in ProcessGDBRemote to use MultiBreakpoint

This concludes the implementation of MultiBreakpoint by actually using
the new packet to batch breakpoint requests.

https://github.com/llvm/llvm-project/pull/192910
DeltaFile
+192-0lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+8-0lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
+4-0lldb/source/Utility/GDBRemote.cpp
+3-0lldb/include/lldb/Utility/GDBRemote.h
+207-04 files

LLVM/project c2aaec9lldb/include/lldb/Target Process.h, lldb/source/Target Process.cpp

fixup! protect bp cache with a lock
DeltaFile
+7-0lldb/source/Target/Process.cpp
+1-0lldb/include/lldb/Target/Process.h
+8-02 files

LLVM/project aee8491flang/lib/Semantics resolve-names.cpp, flang/test/Semantics resolve128.f90

[Flang][Semantics] Fix crash on invalid function result declaration (#194648)

Fixes https://github.com/llvm/llvm-project/issues/194596.

When the function result symbol is encountered while the compiler is
already completing the function result type, flang could recursively
re-enter _CompleteFunctionResultType()_ and crash on invalid code.

Instead of crashing on conflicting declarations, flang now reports an
“already declared” error and stops further recursion.
DeltaFile
+26-0flang/test/Semantics/resolve128.f90
+12-1flang/lib/Semantics/resolve-names.cpp
+38-12 files

LLVM/project 450064alldb/source/Plugins/Process/gdb-remote ProcessGDBRemote.cpp

fixup! don't fallback on all packets
DeltaFile
+21-11lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+21-111 files

LLVM/project 398049fclang/test/CodeGen 2008-07-31-asm-labels.c

Search for @_thisIsNotAPipe vs _thisIsNotAPipe (#192132)

z/OS has a table of mapped names in the IR. Counting the hits for just
the name leads to one more hit than expected. Search for the name with
the @ char to make sure the right occurrences are being counted.
DeltaFile
+3-3clang/test/CodeGen/2008-07-31-asm-labels.c
+3-31 files

LLVM/project e231ee6clang-tools-extra/clang-tidy/readability IdentifierLengthCheck.cpp IdentifierLengthCheck.h, clang-tools-extra/docs/clang-tidy/checks/readability identifier-length.rst

[clang-tidy][readability-identifier-length] refactoring and cleanup (#194610)

This PR implements the refactorings discussed with @localspook in
#193838

---------

Co-authored-by: Victor Chernyakin <chernyakin.victor.j at outlook.com>
DeltaFile
+32-78clang-tools-extra/clang-tidy/readability/IdentifierLengthCheck.cpp
+3-17clang-tools-extra/docs/clang-tidy/checks/readability/identifier-length.rst
+5-5clang-tools-extra/clang-tidy/readability/IdentifierLengthCheck.h
+40-1003 files

LLVM/project 5e7e097offload/test lit.cfg, offload/test/mapping data_member_ref.cpp

[offload] Enable Intel GPU tests and mark CUDA tests unsupported (#194790)

- Remove UNSUPPORTED: intelgpu from 12 passing tests:
  * mapping/data_member_ref.cpp
  * offloading/bug50022.cpp, info.c
* offloading/target_critical_region.cpp, target_depend_nowait.cpp,
target_nowait_target.cpp
  * offloading/strided_update/* (6 tests)
  * unified_shared_memory/close_member.c

- Change CUDA tests from XFAIL to UNSUPPORTED for Intel GPU:
  * offloading/CUDA/basic_launch.cu
  * offloading/CUDA/basic_launch_blocks_and_threads.cu
  * offloading/CUDA/basic_launch_multi_arg.cu
  * offloading/CUDA/launch_tu.cu

- Add Intel GPU configuration section to lit.cfg to disable USM tests by
default
DeltaFile
+4-0offload/test/lit.cfg
+0-3offload/test/mapping/data_member_ref.cpp
+0-3offload/test/offloading/strided_update/strided_update_ptr_count_expression.c
+0-2offload/test/offloading/strided_update/strided_update_partial_to.c
+0-2offload/test/offloading/strided_update/strided_update_to.c
+0-2offload/test/offloading/strided_update/strided_update_to_pointer.c
+4-1211 files not shown
+8-2917 files

LLVM/project ef7dc47llvm/lib/Transforms/Vectorize VPlanTransforms.cpp

[VPlan] Strip phi-check in collectUsersRecursively (NFC) (#194816)

The SetVector already ensures that there are no cycles in the
collection.
DeltaFile
+0-2llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+0-21 files

LLVM/project 150f39fllvm/lib/Target/AArch64/AsmParser AArch64AsmParser.cpp, llvm/utils/TableGen/Basic ARMTargetDefEmitter.cpp

[AArch64][llvm] Generate asm parser extension map from TableGen (NFC)

Modify ARMTargetDefEmitter to emit the assembly parser `ExtensionMap[]`
and replace the hand-written table in AArch64AsmParser.cpp with the
generated one.

Keep the assembly parser-only quirks in the emitter: the directive
denylist, the legacy primary spellings for `mte` and `compnum`, and the
extra bits needed for the `sve2-*` shorthand extensions.

This removes the duplicate manual table while preserving existing
directive parsing and required-feature diagnostics.
DeltaFile
+5-137llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
+97-0llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp
+102-1372 files

LLVM/project 97d6d0bllvm/utils/TableGen/Basic ARMTargetDefEmitter.cpp

fixup! Use SmallDenseSet<> for quick lookup
DeltaFile
+30-28llvm/utils/TableGen/Basic/ARMTargetDefEmitter.cpp
+30-281 files

LLVM/project 3dd7565llvm/docs ReleaseNotes.md ReleaseNotesTemplate.txt

[Docs] Normalize headers and indents for ReleaseNotes (#194784)

- Normalize the header syntax for ReleaseNotes (current `.md` file and
`ReleaseNotesTemplate.txt`) to use `#`-based headings
- Normalize indents to distinguish doc title from page headers

Fixes navigation indents for Furo theme update (see
https://github.com/llvm/llvm-project/pull/184440).
DeltaFile
+43-80llvm/docs/ReleaseNotes.md
+36-72llvm/docs/ReleaseNotesTemplate.txt
+79-1522 files

LLVM/project da0706flldb/source/Plugins/Process/gdb-remote ProcessGDBRemote.cpp GDBRemoteClientBase.cpp

fixup! make helper method to send packet
DeltaFile
+3-21lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
+17-0lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
+5-0lldb/source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h
+25-213 files

LLVM/project 0d97b5aclang/test/CodeGen/AArch64 neon-perm.c poly64.c, clang/test/CodeGen/AArch64/fp8-intrinsics acle_neon_fp8_untyped.c

[CIR][AArch64] Lower NEON zip1/2 elements intrinsics (#194311)

### Summary

part of : https://github.com/llvm/llvm-project/issues/185382

This is a follow up : https://github.com/llvm/llvm-project/pull/193658

Lower zip1 and zip2 intrinsics in
https://arm-software.github.io/acle/neon_intrinsics/advsimd.html#zip-elements

All the intrinsics are handled inline in
`llvm-project/build/lib/clang/23/include/arm_neon.h` like:
```
#ifdef __LITTLE_ENDIAN__
__ai __attribute__((target("neon"))) int8x8_t vzip1_s8(int8x8_t __p0, int8x8_t __p1) {
  int8x8_t __ret;
  __ret = __builtin_shufflevector(__p0, __p1, 0, 8, 1, 9, 2, 10, 3, 11);
  return __ret;

    [12 lines not shown]
DeltaFile
+551-0clang/test/CodeGen/AArch64/neon/perm.c
+0-420clang/test/CodeGen/AArch64/neon-perm.c
+0-40clang/test/CodeGen/AArch64/fp8-intrinsics/acle_neon_fp8_untyped.c
+0-20clang/test/CodeGen/AArch64/poly64.c
+551-4804 files