LLVM/project a413043 — llvm/lib/Target/AArch64 AArch64PredicateAsCounterLoopRewrites.cpp

Use CreateIntrinsic
DeltaFile
+11-14llvm/lib/Target/AArch64/AArch64PredicateAsCounterLoopRewrites.cpp
+11-141 files

LLVM/project a44cd9b — llvm/lib/Target/AArch64 AArch64PredicateAsCounterLoopRewrites.cpp, llvm/test/CodeGen/AArch64 predicate-as-counter-loop-rewrites.ll

[AArch64] Use multi-vector intrinsics for masked load/store users of predicate-as-counter

If the user of the original wide mask is a masked load or store
intrinsic (matching the element size of the predicate-as-counter),
rewrite it directly to a masked multi-vector load/store.

This avoids materializing the vector mask and is easier to handle here
than later (e.g. in SelectionDAG), since we do not need to match the
concatenation of all `pext` segments of the predicate-as-counter.

Assisted-by: Codex
DeltaFile
+87-137llvm/test/CodeGen/AArch64/predicate-as-counter-loop-rewrites.ll
+110-1llvm/lib/Target/AArch64/AArch64PredicateAsCounterLoopRewrites.cpp
+197-1382 files

LLVM/project 9ee0c90 — llvm/lib/Target/AArch64 AArch64PredicateAsCounterLoopRewrites.cpp, llvm/test/CodeGen/AArch64 predicate-as-counter-loop-rewrites.ll

[AArch64] Avoid materializing full masks for extractelement users of predicate-as-counter (#220961)

If the user of the original wide mask is an `extractelement` and the
index is known to be within the first segment of the
predicate-as-counter, replace it with `extractelement(pext(counter,
0))`.

This avoids materializing the vector mask and produces a form that can
be folded into a conditional branch when the predicate-as-counter is
produced by a `whilelo`.

Assisted-by: Codex
DeltaFile
+89-153llvm/test/CodeGen/AArch64/predicate-as-counter-loop-rewrites.ll
+37-0llvm/lib/Target/AArch64/AArch64PredicateAsCounterLoopRewrites.cpp
+126-1532 files

LLVM/project f571d5c — clang/include/clang/AST StmtOpenMP.h, clang/lib/AST StmtOpenMP.cpp

[clang][OpenMP] Extend no-loop promotion to the split teams loop

Widen the no-loop promotion to apply not only to the fused target teams
distribute parallel for but include the same region written as separate
directives, other directives promotable to parallel for, and regions
carrying a schedule clause that asks for a mapping a no-loop kernel
already provides.

Use the SPMD_NO_LOOP kernel tag to carry the promotion decision, based
on whether the kernel can get fully promoted to a no-loop kernel. This
eliminates the previous discrepancy where a clause got the tag but not
the promotion.
DeltaFile
+95-24clang/test/OpenMP/target_no_loop.cpp
+39-28clang/lib/CodeGen/CGStmtOpenMP.cpp
+56-10clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
+10-1clang/include/clang/AST/StmtOpenMP.h
+2-1clang/lib/Sema/SemaOpenMP.cpp
+2-1clang/lib/AST/StmtOpenMP.cpp
+204-652 files not shown
+206-658 files

LLVM/project 4bbefe7 — llvm/test/CodeGen/PowerPC aix-ifunc-toc-restore-query-neg.ll

PPC: Fix unnecessary host requirement in test
DeltaFile
+6-7llvm/test/CodeGen/PowerPC/aix-ifunc-toc-restore-query-neg.ll
+6-71 files

LLVM/project 5c31fc6 — llvm/utils/gn/secondary/lldb/source/Utility BUILD.gn

[gn build] Port 2c10250e85242 (#229744)
DeltaFile
+1-0llvm/utils/gn/secondary/lldb/source/Utility/BUILD.gn
+1-01 files

LLVM/project a6343f9 — llvm/utils/gn/secondary/clang/lib/Analysis/FlowSensitive/Models BUILD.gn

[gn build] Port e03123a631628 (#229745)
DeltaFile
+1-0llvm/utils/gn/secondary/clang/lib/Analysis/FlowSensitive/Models/BUILD.gn
+1-01 files

LLVM/project 0cbccdf — llvm/test/CodeGen/PowerPC peephole-elim-extsw-subreg-input.mir

PPC: Add MIR examples for missed extsw+word-load fold on subregister input

A gprc LWZ/LWZX feeding EXTSW_32_64 folds into a sign-extending LWA/LWAX
load. The equivalent 64-bit zero-extending word loads (LWZ8/LWZX8) whose
sub_32 feeds EXTSW_32_64 are not folded, leaving a redundant lwz+extsw
(or lwzx+extsw) pair. Add MIR examples documenting the missed fold.

Co-authored-by: Claude (Claude Opus 4.8, claude-opus-4-8) <noreply at anthropic.com>
DeltaFile
+152-6llvm/test/CodeGen/PowerPC/peephole-elim-extsw-subreg-input.mir
+152-61 files

LLVM/project 80fa92a — llvm/lib/Target/PowerPC PPCMIPeephole.cpp, llvm/test/CodeGen/PowerPC peephole-elim-extsw-subreg-input.mir

PPC: Fold 64-bit zero-extending word load feeding extsw subregister

A gprc LWZ/LWZX feeding EXTSW_32_64 is rewritten into a sign-extending
LWA/LWAX load. Extend the same fold to the 64-bit zero-extending word
loads LWZ8/LWZX8 when the EXTSW_32_64 reads their sub_32 subregister,
producing a single LWA/LWAX instead of a redundant lwz+extsw pair.

Co-authored-by: Claude (Claude Opus 4.8, claude-opus-4-8) <noreply at anthropic.com>
DeltaFile
+12-12llvm/test/CodeGen/PowerPC/peephole-elim-extsw-subreg-input.mir
+13-3llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
+25-152 files

LLVM/project 140abf6 — llvm/lib/Target/PowerPC PPCMIPeephole.cpp

review comments
DeltaFile
+3-4llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
+3-41 files

LLVM/project 83e96ea — llvm/lib/Target/PowerPC PPCMIPeephole.cpp

Remove NarrowSubReg check
DeltaFile
+1-2llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
+1-21 files

LLVM/project 20b7ab7 — llvm/lib/Target/PowerPC PPCMIPeephole.cpp, llvm/test/CodeGen/PowerPC peephole-elim-extsw-subreg-input.mir

PPC: Fix extsw elimination when the input reads a subregister

The EXTSW_32_64 sign-extend elimination previously assumed its input
was a full register value. It would then try using that value as the
source of the new (unnecessary) INSERT_SUBREG.

The new test would then hit this verifier error:

```
bb.0:
  liveins: $x3
  %0:g8rc = COPY killed $x3
  %1:g8rc = RLDICL killed %0:g8rc, 0, 33
  %3:g8rc = IMPLICIT_DEF
  %2:g8rc = INSERT_SUBREG %3:g8rc(tied-def 0), %1:g8rc, %subreg.sub_32
  $x3 = COPY killed %2:g8rc
  BLR8 implicit $lr8, implicit $rm, implicit killed $x3

*** Bad machine code: INSERT_SUBREG expected inserted value to have equal or lesser size than the subreg it was inserted into ***

    [8 lines not shown]
DeltaFile
+27-12llvm/lib/Target/PowerPC/PPCMIPeephole.cpp
+30-0llvm/test/CodeGen/PowerPC/peephole-elim-extsw-subreg-input.mir
+57-122 files

LLVM/project 32f2588 — llvm/lib/Target/PowerPC PPCInstrInfo.cpp, llvm/test/CodeGen/PowerPC sext_elimination.mir

PPC: Fix EXTSW elimination promoting a subregister operand

promoteInstr32To64ForElimEXTSW copies operands from the 32-bit
instruction verbatim into its promoted 64-bit form. When an operand
reads the sub_32 subregister of a 64-bit register, the promoted
instruction (which takes a full register) ended up with an illegal
subregister use and failed the machine verifier.

Drop the sub_32 subregister and use the original full register, which
provides the low 32 bits the promoted instruction operates on. This
avoids  verifier error regressions in a future change.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude Opus 4.8, claude-opus-4-8)
DeltaFile
+36-10llvm/test/CodeGen/PowerPC/sext_elimination.mir
+12-0llvm/lib/Target/PowerPC/PPCInstrInfo.cpp
+48-102 files

LLVM/project 39e103c — llvm/utils/gn/secondary/llvm/lib/Target/AArch64 BUILD.gn

[gn build] Port e128a79c81bd4 (#229746)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/Target/AArch64/BUILD.gn
+1-01 files

LLVM/project 7972124 — llvm/utils/gn/secondary/clang/lib/AST BUILD.gn

[gn] Add include_dir required by abbf6958bb8449 (#229747)

See
https://github.com/llvm/llvm-project/pull/174549#pullrequestreview-5442294153
DeltaFile
+1-0llvm/utils/gn/secondary/clang/lib/AST/BUILD.gn
+1-01 files

LLVM/project 26b9cfb — llvm/include/llvm/Target CGPassBuilderOption.h, llvm/lib/Passes CodeGenPassBuilder.cpp

[CodeGen][AMDGPU][NPM] Wire up SSAMachineSchedulerPass in optimized regalloc pipeline
DeltaFile
+19-4llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+7-0llvm/lib/Passes/CodeGenPassBuilder.cpp
+4-2llvm/test/CodeGen/AMDGPU/mul.ll
+3-0llvm/include/llvm/Target/CGPassBuilderOption.h
+2-0llvm/test/CodeGen/AMDGPU/add.ll
+35-65 files

LLVM/project 5215171 — clang/lib/CIR/CodeGen CIRGenCoroutine.cpp, clang/test/CIR/CodeGenCoroutines coro-agg.cpp

[CIR] Destroy non-trivially destructible co_await results after the cir.await (#229585)

Follow-up to #225412. When await_resume() returns a class with a
non-trivial destructor and the result is discarded the destructor was
pushed inside the cir.await resume region. The associated
cir.cleanup.scope captured the region's terminator which led to a "block
with no terminator" verification error.

Push the destructor after the await instead such that the result is
destroyed at the end of the full expression.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+360-0clang/test/CIR/CodeGenCoroutines/coro-agg.cpp
+34-5clang/lib/CIR/CodeGen/CIRGenCoroutine.cpp
+394-52 files

LLVM/project 63a614c — clang/lib/Sema SemaOpenMP.cpp, clang/test/OpenMP flatten_codegen.cpp

[Clang][OpenMP] Mixed signed/unsigned trip counts fix (#226462)

Build that 1 already in the loop-index type (same pattern as the
existing 0).

Fixes #225756
DeltaFile
+40-0openmp/runtime/test/transform/flatten/mixed-sign.c
+9-14clang/lib/Sema/SemaOpenMP.cpp
+14-0clang/test/OpenMP/flatten_codegen.cpp
+63-143 files

LLVM/project 3b547c9 — clang/include/clang/CodeGenUtils ItaniumCXXABIUtils.h, clang/lib/CIR/CodeGen CIRGenItaniumCXXABI.cpp

[CIR][CodeGen] Share isStandardLibraryRTTIDescriptor

Deduplicates `isStandardLibraryRTTIDescriptor` between CIR and classic CodeGen
into `ItaniumCXXABIUtils.h`, taking the classic implementation. The two copies
have been equivalent since #227781 filled in the builtin types CIR was missing.

Assisted-by: Claude Code (Claude Fable 5.1).
DeltaFile
+3-155clang/lib/CodeGen/ItaniumCXXABI.cpp
+1-154clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
+148-0clang/lib/CodeGenUtils/ItaniumCXXABIUtils.cpp
+4-0clang/include/clang/CodeGenUtils/ItaniumCXXABIUtils.h
+156-3094 files

LLVM/project f4f62f3 — clang/include/clang/CodeGenUtils ItaniumCXXABIUtils.h, clang/lib/CIR/CodeGen CIRGenItaniumCXXABI.cpp

[CIR][CodeGen][NFC] Share canUseSingleInheritance

Deduplicates `canUseSingleInheritance` between CIR and classic CodeGen into
`ItaniumCXXABIUtils.h`.

Assisted-by: Claude Code (Claude Fable 5.1).
DeltaFile
+2-30clang/lib/CodeGen/ItaniumCXXABI.cpp
+2-28clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
+22-0clang/lib/CodeGenUtils/ItaniumCXXABIUtils.cpp
+5-0clang/include/clang/CodeGenUtils/ItaniumCXXABIUtils.h
+31-584 files

LLVM/project 6a53d30 — llvm/test/CodeGen/AMDGPU gds-load-store.ll, llvm/test/CodeGen/AMDGPU/GlobalISel legalize-load-constant.mir legalize-load-flat.mir

Rebase, address comments

Created using spr 1.3.7
DeltaFile
+3,103-3,156llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-private.mir
+3,245-2,647llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-local.mir
+2,490-2,634llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-global.mir
+4,568-0llvm/test/CodeGen/AMDGPU/gds-load-store.ll
+2,148-2,222llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-flat.mir
+1,812-1,908llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-constant.mir
+17,366-12,5671,301 files not shown
+61,625-26,1301,307 files

LLVM/project 687b07a — clang/lib/CodeGen CGOpenMPRuntimeGPU.cpp CGStmtOpenMP.cpp, clang/test/OpenMP target_no_loop.cpp

[clang][OpenMP] Emit lastprivate final copies in no-loop kernels

Promotion rejected lastprivate because the no-loop branch leaves the
worksharing path before it privatizes or copies out, so the clause would
have been silently dropped.

Privatize the non-counter variables in the parallel region and copy them
out under the last iteration that applyWorkshareLoop publishes, forcing
the exit barrier the copy reads through. Loop counters stay at the
distribute level and reach EmitOMPSimdFinal.
DeltaFile
+76-20clang/test/OpenMP/target_no_loop.cpp
+53-4clang/lib/CodeGen/CGStmtOpenMP.cpp
+48-0offload/test/offloading/target-no-loop.c
+0-2clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp
+177-264 files

LLVM/project 15b0bb7 — llvm/include/llvm/Target CGPassBuilderOption.h, llvm/lib/Passes CodeGenPassBuilder.cpp

[CodeGen][AMDGPU][NPM] Wire up SSAMachineSchedulerPass in optimized regalloc pipeline
DeltaFile
+19-4llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+7-0llvm/lib/Passes/CodeGenPassBuilder.cpp
+3-0llvm/include/llvm/Target/CGPassBuilderOption.h
+1-0llvm/test/CodeGen/AMDGPU/mul.ll
+1-0llvm/test/CodeGen/AMDGPU/add.ll
+31-45 files

LLVM/project f08b63c — llvm/lib/Target/AArch64 AArch64PredicateAsCounterLoopRewrites.cpp, llvm/lib/Target/Hexagon HexagonLoopIdiomRecognition.cpp

Merge branch 'main' into users/arsenm/mips/insert-branch-dead-at
DeltaFile
+951-882llvm/lib/Target/RISCV/RISCVSchedTTAscalonX.td
+1,008-0llvm/test/CodeGen/AMDGPU/atomicrmw_usub_sat.ll
+675-0llvm/test/CodeGen/AArch64/predicate-as-counter-loop-rewrites.ll
+453-69llvm/test/Transforms/Inline/AArch64/sme-pstatesm-attrs.ll
+430-0llvm/lib/Target/AArch64/AArch64PredicateAsCounterLoopRewrites.cpp
+175-172llvm/lib/Target/Hexagon/HexagonLoopIdiomRecognition.cpp
+3,692-1,123292 files not shown
+7,599-3,197298 files

LLVM/project 0e432f4 — clang/include/clang/CodeGenUtils ItaniumCXXABIUtils.h, clang/lib/CIR/CodeGen CIRGenItaniumCXXABI.cpp

[CIR][CodeGen] Share isStandardLibraryRTTIDescriptor

Deduplicates `isStandardLibraryRTTIDescriptor` between CIR and classic CodeGen
into `ItaniumCXXABIUtils.h`, taking the classic implementation. The two copies
have been equivalent since #227781 filled in the builtin types CIR was missing.

Assisted-by: Claude Code (Claude Fable 5.1).
DeltaFile
+3-155clang/lib/CodeGen/ItaniumCXXABI.cpp
+1-154clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
+148-0clang/lib/CodeGenUtils/ItaniumCXXABIUtils.cpp
+4-0clang/include/clang/CodeGenUtils/ItaniumCXXABIUtils.h
+156-3094 files

LLVM/project e7421d4 — clang/include/clang/CodeGenUtils ItaniumCXXABIUtils.h, clang/lib/CIR/CodeGen CIRGenItaniumCXXABI.cpp

[CIR][CodeGen][NFC] Share canUseSingleInheritance

Deduplicates `canUseSingleInheritance` between CIR and classic CodeGen into
`ItaniumCXXABIUtils.h`.

Assisted-by: Claude Code (Claude Fable 5.1).
DeltaFile
+2-30clang/lib/CodeGen/ItaniumCXXABI.cpp
+2-28clang/lib/CIR/CodeGen/CIRGenItaniumCXXABI.cpp
+22-0clang/lib/CodeGenUtils/ItaniumCXXABIUtils.cpp
+5-0clang/include/clang/CodeGenUtils/ItaniumCXXABIUtils.h
+31-584 files

LLVM/project 81732f2 — clang/include/clang/CodeGenUtils TargetUtils.h, clang/lib/CIR/CodeGen TargetInfo.h TargetInfo.cpp

[CIR][CodeGen][NFC] Share requiresAMDGPUProtectedVisibility

Deduplicates `requiresAMDGPUProtectedVisibility` between CIR and classic CodeGen
into `TargetUtils.h`. The shared version takes a bool for "currently hidden" in
place of the `llvm::GlobalValue` and `cir::VisibilityKind` the two callers
passed.

Assisted-by: Claude Code (Claude Fable 5.1).
DeltaFile
+3-15clang/lib/CodeGen/Targets/AMDGPU.cpp
+0-14clang/lib/CIR/CodeGen/Targets/AMDGPU.cpp
+14-0clang/lib/CodeGenUtils/TargetUtils.cpp
+6-2clang/lib/CIR/CodeGen/TargetInfo.cpp
+6-0clang/include/clang/CodeGenUtils/TargetUtils.h
+0-4clang/lib/CIR/CodeGen/TargetInfo.h
+29-356 files

LLVM/project b620524 — clang/include/clang/CodeGenUtils TargetUtils.h, clang/lib/CIR/CodeGen CIRGenBuiltinAArch64.cpp

[CIR][CodeGen][NFC] Share hasExtraNeonArgument

Deduplicates `hasExtraNeonArgument` between CIR and classic CodeGen into
`TargetUtils.h`.

Assisted-by: Claude Code (Claude Fable 5.1).
DeltaFile
+2-38clang/lib/CIR/CodeGen/CIRGenBuiltinAArch64.cpp
+3-34clang/lib/CodeGen/TargetBuiltins/ARM.cpp
+25-0clang/lib/CodeGenUtils/TargetUtils.cpp
+6-0clang/include/clang/CodeGenUtils/TargetUtils.h
+36-724 files

LLVM/project 26f18e2 — clang/include/clang/CodeGenUtils TargetUtils.h, clang/lib/CIR/CodeGen/Targets AArch64.cpp

[CIR][CodeGen][NFC] Share the Arm SME inlinability check

Deduplicates `ArmSMEInlinability` and `getArmSMEInlinability` between CIR and
classic CodeGen into a new `TargetUtils.h`.

Assisted-by: Claude Code (Claude Fable 5.1).
DeltaFile
+18-60clang/lib/CodeGen/Targets/AArch64.cpp
+3-52clang/lib/CIR/CodeGen/Targets/AArch64.cpp
+50-0clang/lib/CodeGenUtils/TargetUtils.cpp
+48-0clang/include/clang/CodeGenUtils/TargetUtils.h
+1-0clang/lib/CodeGenUtils/CMakeLists.txt
+120-1125 files

LLVM/project ccc6ac4 — clang/include/clang/CodeGenUtils FunctionUtils.h CodeGenUtils.h, clang/lib/CodeGenUtils ModuleUtils.cpp ClassUtils.cpp

[CIR][CodeGen][NFC] Retire the CodeGenUtils.h catch-all header

Moves the last helpers out of `CodeGenUtils.h` into `ClassUtils.h`,
`ModuleUtils.h`, `TargetUtils.h` and `FunctionUtils.h` (`checkTargetFeatures`,
since it came from CodeGenFunction.cpp) and deletes the header. Only moves code
already on main, so it can be dropped on its own.

Assisted-by: Claude Code (Claude Fable 5.1).
DeltaFile
+0-269clang/lib/CodeGenUtils/CodeGenUtils.cpp
+120-0clang/lib/CodeGenUtils/FunctionUtils.cpp
+0-78clang/include/clang/CodeGenUtils/CodeGenUtils.h
+78-0clang/lib/CodeGenUtils/ClassUtils.cpp
+37-0clang/lib/CodeGenUtils/ModuleUtils.cpp
+24-2clang/include/clang/CodeGenUtils/FunctionUtils.h
+259-34918 files not shown
+337-36324 files