LLVM/project dfb992c — libcxxabi/src private_typeinfo.h private_typeinfo.cpp

[libc++abi] Merge dst_type_might_be_derived_from_static_type into path_dst_ptr_to_static_ptr
DeltaFile
+17-32libcxxabi/src/private_typeinfo.cpp
+1-1libcxxabi/src/private_typeinfo.h
+18-332 files

LLVM/project 83f8006 — libcxxabi/src private_typeinfo.h private_typeinfo.cpp

[libc++abi] Only store a single dst_ptr
DeltaFile
+12-16libcxxabi/src/private_typeinfo.cpp
+2-4libcxxabi/src/private_typeinfo.h
+14-202 files

LLVM/project 46656f9 — bolt/lib/Rewrite RewriteInstance.cpp, bolt/test/X86 ambiguous_fragment.test symbol-priority.test

[BOLT] Prefer global symbols at the same address (#244233)

Currently, BOLT's address-to-symbol resolution prioritizes function
symbols over other symbols and debug symbols, without making a
fine-grained distinction for local symbols. When multiple symbols share
the same address, BOLT may pick a local function symbol as the primary
name and emit it into the output binary and profile (this is especially
common on RISC-V due to the heavy use of label symbols). This can cause
confusion and potential profile mismatch issues (lots of `PG.` symbols
emitted, as described in #243760).

This patch standardizes the behavior of `discoverFileObjects()` and
refines the handling of local vs. global symbols, selecting the primary
symbol name according to the following priority order:
0: Global function
1: Non-global function
2: Other global symbol
3: Other non-global symbol
4: Global debug symbol
5: Non-global debug symbol
DeltaFile
+77-0bolt/test/X86/symbol-priority.test
+14-8bolt/lib/Rewrite/RewriteInstance.cpp
+2-2bolt/test/X86/ambiguous_fragment.test
+93-103 files

LLVM/project 738e2db — llvm/lib/Analysis InstructionSimplify.cpp, llvm/test/Transforms/InstSimplify icmp-monotonic.ll

[InstSimplify] Fold comparisons of ctpop with its operand (#221104)

Fold llvm.ctpop(x) <= x by registering x as an unsigned upper bound of
ctpop(x). Automatically handles other canonicalized variants.

Partially addresses #220800.

Alive2 proof https://alive2.llvm.org/ce/z/MTkIxk
DeltaFile
+86-0llvm/test/Transforms/InstSimplify/icmp-monotonic.ll
+3-1llvm/lib/Analysis/InstructionSimplify.cpp
+89-12 files

LLVM/project b841866 — llvm/lib/Target/PowerPC PPCInstr64Bit.td PPCInstrInfo.td, llvm/test/CodeGen/PowerPC stack-protector-pcrel-indirect-tail-call.ll

[PowerPC] Fix stack protector + indirect tail call on power10 (#246638)

The issue here is that findSplitPointForStackProtector() does not
recognize the mtctr instruction as being part of the terminator sequence
(as it's not just a physreg COPY). This results in the block being split
between the physreg copies for the arguments and the call. This will
fail machine verification, and in release builds will end up removing
those copies, resulting in a miscompile.

Fix this by using a pseudo that takes a GPR and expands to mtctr plus
the usual tail-call sequence. This is implemented as a custom inserter
pseudo so we don't need to deal with register class constraints. This is
sufficient, as the stack protector split happens before finalize-isel,
so we don't need this to be an emit-time pseudo.

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

Assisted-by: Claude
DeltaFile
+53-0llvm/test/CodeGen/PowerPC/stack-protector-pcrel-indirect-tail-call.ll
+26-6llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+19-2llvm/lib/Target/PowerPC/PPCInstrInfo.td
+9-2llvm/lib/Target/PowerPC/PPCInstr64Bit.td
+107-104 files

LLVM/project 19e8a82 — llvm/docs ReleaseNotes.md, llvm/docs/CommandGuide llvm-strings.md

[llvm-strings] Add --unicode option (#242890)

This commit adds the --unicode option from GNU strings to llvm-strings.
The options from GNU strings are supported, plus an additional option
value --unicode=utf8 to explicitly request UTF-8 output, similar to how
we also add an --encoding=utf8 option value to explicitly specify the
input is UTF-8.

This makes a slight change from what was previously proposed: it adds
`--unicode=utf8` as an option value, and rather than `--unicode=default`
specifying UTF-8 output, it is equivalent to leaving out the option.
This makes a difference only in one corner case: this makes
`--encoding=S` and `--encoding=S --unicode=default` behave the same, as
the option implies.
DeltaFile
+209-41llvm/tools/llvm-strings/llvm-strings.cpp
+76-0llvm/test/tools/llvm-strings/unicode.test
+48-10llvm/test/tools/llvm-strings/locale.test
+17-1llvm/docs/CommandGuide/llvm-strings.md
+3-1llvm/docs/ReleaseNotes.md
+2-0llvm/tools/llvm-strings/Opts.td
+355-536 files

LLVM/project 9057a37 — llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/RISCV tail-folding-complex-mask.ll low-trip-count.ll

[VPlan] Pull header mask out of (HM && Y) | (HM && Z)

The current (X && Y) | (X && Z) -> X && (Y | Z) combine requires one of the operands to have a single user. But if X is the header mask we usually want to do this regardless, similar to the reasoning behind reassociateHeaderMask.

This removes header masks in a good few places on RISC-V across llvm-test-suite and SPEC CPU 2017.
DeltaFile
+8-9llvm/test/Transforms/LoopVectorize/RISCV/low-trip-count.ll
+3-2llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+1-1llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-complex-mask.ll
+12-123 files

LLVM/project 0493d16 — clang/test/OpenMP thread_limit_gpu.c num_teams_kernel_attribute.cpp, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

[OMPIRBuilder] Fix writing of OpenMP num teams kernel attribute
DeltaFile
+47-0clang/test/OpenMP/num_teams_kernel_attribute.cpp
+42-0llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+6-6clang/test/OpenMP/thread_limit_gpu.c
+7-4llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+102-104 files

LLVM/project 8943ac6 — compiler-rt CMakeLists.txt

[cmake][compiler-rt] Remove now redundant policy(SET) (#246343)

LLVM now requires CMake 3.31 so this gets set by `cmake_minimum_required()`.
DeltaFile
+0-5compiler-rt/CMakeLists.txt
+0-51 files

LLVM/project 0c73276 — lldb/tools/driver CMakeLists.txt

[cmake][lldb][driver] Use target_link_options() (#246354)

LLVM now requires CMake 3.31 so no need for the ugly workaround.
DeltaFile
+9-7lldb/tools/driver/CMakeLists.txt
+9-71 files

LLVM/project 05074d9 — clang/test/OpenMP thread_limit_gpu.c num_teams_kernel_attribute.cpp, llvm/lib/Frontend/OpenMP OMPIRBuilder.cpp

[OMPIRBuilder] Fix writing of OpenMP num teams kernel attribute
DeltaFile
+47-0clang/test/OpenMP/num_teams_kernel_attribute.cpp
+42-0llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
+18-8llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+6-6clang/test/OpenMP/thread_limit_gpu.c
+113-144 files

LLVM/project d8fbd71 — llvm/lib/Transforms/Vectorize VPlanTransforms.cpp, llvm/test/Transforms/LoopVectorize/RISCV tail-folding-complex-mask.ll

[VPlan] Erase dead masks in removeCommonBlendMask

removeCommonBlendMask was leaving behind the old masks, which can cause other masks to still have dead recipes as users. This in turn prevents simplifyBlends from picking a start value for a blend that would have been dead-coded.

Erasing them improves codegen in various benchmarks, for example on sqlite with clang -march=rva23u64 -O3:

  void sqlite3HexToBlob(int *restrict dst, int *restrict src, int n) {
    for (int i = 0; i < n; i++) {
      int h = src[i], x;
      if (h >= '0' && h <= '9')
        x = h - '0';
      else if (h >= 'a' && h <= 'f')
        x = h - 'a' + 10;
      else
        x = h - 'A' + 10;
      dst[i] = x;
    }
  }


    [39 lines not shown]
DeltaFile
+6-2llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+2-4llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-complex-mask.ll
+8-62 files

LLVM/project 7de38ae — llvm/lib/Target/RISCV RISCVInstrGISel.td, llvm/lib/Target/RISCV/GISel RISCVLegalizerInfo.cpp RISCVInstructionSelector.cpp

[RISCV][GISel] Select scalable integer G_SPLAT_VECTOR (#247751)

Lower G_SPLAT_VECTOR with a scalar on the GPR bank to G_VMV_V_X_VL in
the instruction selector, with an undef passthru and VL set to VLMAX.
This matches what RISCVDAGToDAGISel::PreprocessISelDAG does for
SPLAT_VECTOR,
so the existing vmv.v.x patterns are reused.

Add a G_VMV_V_X_VL generic instruction equivalent to riscv_vmv_v_x_vl.
Also specify the legal G_SPLAT_VECTOR legalizer actions before the
custom one.

Part of #246831
DeltaFile
+235-0llvm/test/CodeGen/RISCV/GlobalISel/instruction-select/rvv/splatvector-rv64.mir
+193-0llvm/test/CodeGen/RISCV/GlobalISel/instruction-select/rvv/splatvector-rv32.mir
+60-0llvm/test/CodeGen/RISCV/GlobalISel/rvv/splat-vector.ll
+32-0llvm/lib/Target/RISCV/GISel/RISCVInstructionSelector.cpp
+8-0llvm/lib/Target/RISCV/RISCVInstrGISel.td
+3-2llvm/lib/Target/RISCV/GISel/RISCVLegalizerInfo.cpp
+531-26 files

LLVM/project ddf1a96 — llvm/test/CodeGen/Hexagon fptoi.sat.ll hlx-masked-load-store.ll, llvm/test/CodeGen/Hexagon/autohvx fp-to-int_2.ll cttz-elts-split.ll

[Hexagon] Disable global scheduler V2 by default (#247953)

Make -enable-global-sched default to false, until reported issues in the
pass are addressed. Hand-written tests that exercise it set
-enable-global-sched=true explicitly, and the autogenerated CHECK lines
are regenerated with the pass disabled.

Assisted by AI
DeltaFile
+91-85llvm/test/CodeGen/Hexagon/autohvx/int-to-fp.ll
+22-20llvm/test/CodeGen/Hexagon/autohvx/fp-to-int.ll
+10-10llvm/test/CodeGen/Hexagon/autohvx/cttz-elts-split.ll
+8-3llvm/test/CodeGen/Hexagon/hlx-masked-load-store.ll
+4-4llvm/test/CodeGen/Hexagon/fptoi.sat.ll
+4-4llvm/test/CodeGen/Hexagon/autohvx/fp-to-int_2.ll
+139-12644 files not shown
+196-17950 files

LLVM/project 9aa0a03 — llvm/lib/Target/RISCV RISCVCodeGenPrepare.cpp

Address review comment
DeltaFile
+2-2llvm/lib/Target/RISCV/RISCVCodeGenPrepare.cpp
+2-21 files

LLVM/project bdd09fc — llvm/lib/Target/AVR AVRRegisterInfo.cpp

[AVR] Fix a warning (NFC) (#247959)

This patch fixes:

    llvm/lib/Target/AVR/AVRRegisterInfo.cpp:255:12: error: unused
    variable 'Opc' [-Werror,-Wunused-variable]

Assisted-by: Antigravity
DeltaFile
+1-1llvm/lib/Target/AVR/AVRRegisterInfo.cpp
+1-11 files

LLVM/project 5ac9df5 — llvm/test/Transforms/LoopVectorize/RISCV tail-folding-complex-mask.ll

Precommit tests
DeltaFile
+131-0llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-complex-mask.ll
+131-01 files

LLVM/project 022249b — llvm/lib/CodeGen InlineSpiller.cpp, llvm/lib/Target/X86 X86InstrInfo.cpp

[X86][APX] Don't fold an NDD reload that needs a COPY into a split register (#246808)

This is an alternative solution to #237148 and #243055. If the
destination was created by splitting or spilling, just refuse the fold
rather than post handling the inserted COPY. It avoids unnecessary
spill/reload due to the COPY handling.

Assisted-by: Claude Opus 5.5
DeltaFile
+5-26llvm/lib/CodeGen/InlineSpiller.cpp
+11-11llvm/test/CodeGen/X86/apx/inline-spiller-hoist-folded-copy.ll
+6-6llvm/test/CodeGen/X86/apx/memfold-origVNI-crash.ll
+6-3llvm/lib/Target/X86/X86InstrInfo.cpp
+28-464 files

LLVM/project caf64f6 — llvm/lib/Target/AVR AVRInstrInfo.td AVRRegisterInfo.cpp, llvm/test/CodeGen/AVR alloca.ll issue-246837.ll

[AVR] Remove incorrect selection patterns of two pseudo instructions (#247453)

Remove the selection patterns of STDWSPQRr/STDSPQRr, which cannot guarantee the base pointer is the SP register..

Fixes https://github.com/llvm/llvm-project/issues/246837.
DeltaFile
+77-0llvm/test/CodeGen/AVR/issue-246837.ll
+5-9llvm/lib/Target/AVR/AVRRegisterInfo.cpp
+5-7llvm/test/CodeGen/AVR/alloca.ll
+2-2llvm/lib/Target/AVR/AVRInstrInfo.td
+89-184 files

LLVM/project 8518e9c — llvm/lib/Target/DirectX CMakeLists.txt DirectXTargetMachine.h, llvm/test/CodeGen/DirectX newpm-pipeline.ll

[DirectX] Wire up CodeGenPassBuilder

Introduce DirectXCodeGenPassBuilder and wire up the pass pipeline to be
the same as the existing DirectXPassConfig/addPassesToEmitFile.

Assisted-By: LLM

Reviewers: hekota, bogner

Pull Request: https://github.com/llvm/llvm-project/pull/244834
DeltaFile
+152-0llvm/lib/Target/DirectX/DirectXCodeGenPassBuilder.cpp
+42-0llvm/test/CodeGen/DirectX/newpm-pipeline.ll
+0-9llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
+7-0llvm/lib/Target/DirectX/DirectXTargetMachine.h
+2-0llvm/lib/Target/DirectX/CMakeLists.txt
+203-95 files

LLVM/project e4a87c9 — llvm/include/llvm/Passes CodeGenPassBuilder.h, llvm/lib/Passes CodeGenPassBuilder.cpp

[NFC][CodeGen][NewPM] Allow overriding buildPipeline

Also some refactoring around registerAsmPrinter to make targets that
want to override the entire pipeline (e.g., DirectX) easier. We can't
just do everything in buildCodeGenPipeline or otherwise we need to
reinvent all the start/stop machinery.

Assisted-By: LLM

Reviewers: arsenm, aeubanks

Pull Request: https://github.com/llvm/llvm-project/pull/244833
DeltaFile
+31-12llvm/lib/Passes/CodeGenPassBuilder.cpp
+10-0llvm/include/llvm/Passes/CodeGenPassBuilder.h
+41-122 files

LLVM/project 2ce491c — llvm/lib/Target/Hexagon HexagonVLIWPacketizer.cpp, llvm/test/CodeGen/Hexagon/autohvx hvx-store-packet-order.mir

[Hexagon] Don't packetize a slot-0-only store with a later aliasing store (#246713)

When two stores in a packet write to the same location, the one in slot
0 takes effect last. The shuffler keeps program order by putting the
first store in slot 1, but it cannot when the first store can only go in
slot 0, such as an HVX vmem. The packetizer allowed any store followed
by a store, so the HVX store then overwrote the later store.
This miscompiles a variable-index insert element into a vector on the
stack: the vector spill and the element store land in one packet, and
the inserted element is lost.
Fixes #246036.
_AI Usage: Claude Code_

---------

Co-authored-by: soumikiith <cs21resch11004 at iith.ac.in>
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+85-0llvm/test/CodeGen/Hexagon/autohvx/hvx-store-packet-order.mir
+10-1llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
+95-12 files

LLVM/project 6469bd5 — llvm/lib/Target/Hexagon HexagonPostRAHandleQFP.cpp, llvm/test/CodeGen/Hexagon/autohvx xqf-postra-partial-pair-refill.mir

[Hexagon] Handle partially redefined QFP pair refills (#244193)

Add the conversion instruction for a subregister selectively if the
subregister has not been redefined.

Fixes #237218

Assisted by AI.

---------

Co-authored-by: quic-santdas <quic_santdas at qti.qualcomm.com>
DeltaFile
+48-10llvm/lib/Target/Hexagon/HexagonPostRAHandleQFP.cpp
+47-0llvm/test/CodeGen/Hexagon/autohvx/xqf-postra-partial-pair-refill.mir
+95-102 files

LLVM/project 3095f69 — llvm/docs/CommandGuide llvm-ir2vec.md, llvm/test/tools/llvm-ir2vec triplets-max-arg-index.mir

[llvm-ir2vec] Add --max-arg-index to bound the Arg relations in triplets
DeltaFile
+38-0llvm/test/tools/llvm-ir2vec/triplets-max-arg-index.mir
+18-9llvm/utils/mlgo-utils/IR2Vec/generateTriplets.py
+5-19llvm/tools/llvm-ir2vec/lib/IRUtils/IRUtils.cpp
+17-0llvm/tools/llvm-ir2vec/lib/Common.h
+12-4llvm/docs/CommandGuide/llvm-ir2vec.md
+11-0llvm/tools/llvm-ir2vec/llvm-ir2vec.cpp
+101-321 files not shown
+104-357 files

LLVM/project f796393 — llvm/lib/Transforms/IPO Internalize.cpp, llvm/test/Transforms/Internalize ifunc.ll

[spr] update

Created using spr 2.0.0-beta.2
DeltaFile
+31-0llvm/test/Transforms/Internalize/ifunc.ll
+11-0llvm/lib/Transforms/IPO/Internalize.cpp
+42-02 files

LLVM/project ca21fb2 — llvm/lib/Target/Sparc SparcISelLowering.cpp, llvm/test/CodeGen/SPARC float.ll fp128-strict.ll

[SPARC] Keep +0.0 for unsigned i32 to FP conversions on 32-bit SPARC (#247614)

The generic expansion gives -0.0 for 0 when rounding toward negative
infinity. This was fixed for 64-bit SPARC in #239907. On 32-bit SPARC,
convert the value as signed and add 2^32 if the sign bit is set, in a
similar way to how it is done by GCC.

Values known to be non-negative are converted as signed directly.

Assisted-by: Claude
DeltaFile
+197-0llvm/test/CodeGen/SPARC/uitofp-i32.ll
+57-25llvm/test/CodeGen/SPARC/fp-strict.ll
+58-0llvm/lib/Target/Sparc/SparcISelLowering.cpp
+15-11llvm/test/CodeGen/SPARC/fp128-strict.ll
+12-2llvm/test/CodeGen/SPARC/float.ll
+339-385 files

LLVM/project 25f8503 — llvm/docs/CommandGuide llvm-ir2vec.md, llvm/test/tools/llvm-ir2vec triplets-max-arg-index.ll

[llvm-ir2vec] Add --max-arg-index to bound the Arg relations in IR triplets
DeltaFile
+40-0llvm/test/tools/llvm-ir2vec/triplets-max-arg-index.ll
+18-3llvm/tools/llvm-ir2vec/lib/IRUtils/IRUtils.cpp
+4-1llvm/docs/CommandGuide/llvm-ir2vec.md
+62-43 files

LLVM/project 14bf585 — llvm/tools/llvm-ir2vec/lib Common.h, llvm/tools/llvm-ir2vec/lib/IRUtils IRUtils.h IRUtils.cpp

[llvm-ir2vec][NFC]  Refactoring writers into a base class
DeltaFile
+33-2llvm/tools/llvm-ir2vec/lib/Common.h
+3-15llvm/tools/llvm-ir2vec/lib/MIRUtils/MIRUtils.cpp
+4-14llvm/tools/llvm-ir2vec/lib/IRUtils/IRUtils.cpp
+1-1llvm/tools/llvm-ir2vec/lib/MIRUtils/MIRUtils.h
+1-1llvm/tools/llvm-ir2vec/lib/IRUtils/IRUtils.h
+42-335 files

LLVM/project 73e9317 — clang-tools-extra/clang-doc Representation.h Representation.cpp

[clang-doc][NFC] Clean up includes and namespace use in Representation.h/cpp (#247741)

We're pretty inconsistent w/ our header hygiene and use of consistent
namespacing. Clean up the includes, and follow a style more consistent
w/ clang and llvm for namespace usage in implementation files.
DeltaFile
+58-63clang-tools-extra/clang-doc/Representation.cpp
+0-2clang-tools-extra/clang-doc/Representation.h
+58-652 files

LLVM/project 6165f2d — llvm/lib/CodeGen/GlobalISel IRTranslator.cpp, llvm/lib/Target/AArch64 AArch64ISelLowering.cpp

[GlobalISel] Fail translation of GEPs with scalable elements (#247573)

Scalable GEPs are non-canonical (rewritten to an i8 GEP with
llvm.vscale) and should not be lowered in GISel. Now we fail IR
translation, so every target can fall back to SelectionDAG.

The AArch64-only GEP fallBackToDAGISel check from #234057 is no longer
needed. This also stops RISC-V -global-isel from aborting on the same
IR.
DeltaFile
+24-0llvm/test/CodeGen/RISCV/GlobalISel/fallback-scalable-gep.ll
+15-1llvm/test/CodeGen/AArch64/GlobalISel/arm64-fallback-scalable-gep.ll
+9-1llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
+0-5llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+48-74 files