LLVM/project 5ca62fd — flang/lib/Semantics check-omp-structure.cpp, flang/test/Semantics/OpenMP declare-simd-interface-body.f90 declare-simd.f90

[flang][OpenMP] Ignore DECLARE_SIMD and warn about missing implementa… (#232712)

…tion

Currently DECLARE_SIMD emits a "not yet implemented" error in the MLIR
to LLVM IR translation.

DECLARE_SIMD is a hint to the compiler and ignoring it is technically
speaking a conforming implementation (although obviously not desirable).
Do not abort compilation when DECLARE_SIMD is encountered, but emit a
warning that it's currently ignored.
DeltaFile
+12-0flang/test/Semantics/OpenMP/declare-simd-scope.f90
+9-0flang/test/Semantics/OpenMP/linear-clause01.f90
+6-1flang/test/Semantics/OpenMP/declare-simd.f90
+7-0mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+5-1flang/test/Semantics/OpenMP/declare-simd-interface-body.f90
+4-0flang/lib/Semantics/check-omp-structure.cpp
+43-28 files not shown
+56-214 files

LLVM/project 8dcc63f — llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer semanticly-same.ll

[SLP]Compare main lanes of same-opcode and copyable states

For a same-opcode state both main lanes were skipped, so the original
main lane (potenitally with copyables) was never compared.

Fixes #230578

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/233266
DeltaFile
+7-11llvm/test/Transforms/SLPVectorizer/RISCV/split-vectorize-parent-for-copyables.ll
+3-3llvm/test/Transforms/SLPVectorizer/X86/propagate_ir_flags.ll
+1-2llvm/test/Transforms/SLPVectorizer/semanticly-same.ll
+1-2llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+12-184 files

LLVM/project daeae66 — llvm/test/Transforms/SLPVectorizer semanticly-same.ll

[SLP][NFC]Add a test for alt/same opcode select, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/233264
DeltaFile
+35-0llvm/test/Transforms/SLPVectorizer/semanticly-same.ll
+35-01 files

LLVM/project bd28042 — cross-project-tests/intrinsic-header-tests riscv_packed_simd.c, llvm/lib/Target/RISCV RISCVISelLowering.cpp

[RISCV][P-ext] Use concat_vectors with 0 in widenPackedVectorWithZeros. (#232940)

This will be legalized and combined to a vector_shuffle. That shuffle
can then be matched to a pack with x0 after #232892.

This changes the zext.w to a pack, but that's not obviously worse. If we
need to canonicalize we can add a DAG combine later.
DeltaFile
+8-8llvm/test/CodeGen/RISCV/rvp-simd-32.ll
+6-6cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c
+4-5llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+18-193 files

LLVM/project 2bb6078 — llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV rvp-insert-subvector.ll

[RISCV][P-ext] Remove custom lowering of insert_subvector for v2i16/v4i8 on RV64. (#232899)

This was for handling inserting into a zero vector. After #232892 we let
the insert_subvector legalize to a shuffle_vector which we can then
lower as pack.

This changes the codegen from zext.w to pack, but that's not necessarily
worse. If it turns out to be a problem we can canonicalize pack with
zero with a DAGCombine or isel patterns in the future.
DeltaFile
+3-11llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+2-2llvm/test/CodeGen/RISCV/rvp-insert-subvector.ll
+5-132 files

LLVM/project 856dde0 — flang/lib/Semantics check-omp-atomic.cpp check-omp-structure.h, flang/test/Semantics/OpenMP clause-validity01.f90 flush02.f90

[flang][OpenMP] Switch clause verification to descriptor-based

Delete all the scattered pieces of clause verification that are now
replaced by the unified handling.
DeltaFile
+57-273flang/lib/Semantics/check-omp-structure.cpp
+300-0flang/lib/Semantics/check-omp-syntax.cpp
+22-10flang/lib/Semantics/check-omp-structure.h
+0-31flang/lib/Semantics/check-omp-atomic.cpp
+8-8flang/test/Semantics/OpenMP/flush02.f90
+8-7flang/test/Semantics/OpenMP/clause-validity01.f90
+395-32937 files not shown
+517-38443 files

LLVM/project 936dc93 — flang/test/Semantics/OpenMP to-clause-v45.f90 from-clause-v45.f90

Update tests
DeltaFile
+1-1flang/test/Semantics/OpenMP/to-clause-v45.f90
+1-1flang/test/Semantics/OpenMP/from-clause-v45.f90
+2-22 files

LLVM/project 6c4bc35 — llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/CodeGen/X86 pr233185.ll

[X86] combineConcatVectorOps - ensure at least one of the VSELECT/BLENDV selection operands fully concatenates (#233245)

Don't rely on IsConcatFree - we might still end up with temporary
CONCAT_VECTORS nodes that might not get folded away before another
combine recognises a vector that can be freely split.

Fixes #233185
DeltaFile
+46-0llvm/test/CodeGen/X86/pr233185.ll
+10-5llvm/lib/Target/X86/X86ISelLowering.cpp
+56-52 files

LLVM/project 8b8f178 — llvm/lib/Transforms/InstCombine InstCombineAddSub.cpp, llvm/test/Transforms/InstCombine fold-log2-ceil-idiom.ll

[InstCombine] Added log2-ceil check for non-power-of-two integer widths (#232418)

The log2-ceil fold is only valid for power-of-two integer bit widths.
Adding check for verifying bit width is power of two.

Fixes #227862
DeltaFile
+44-0llvm/test/Transforms/InstCombine/fold-log2-ceil-idiom.ll
+2-1llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
+46-12 files

LLVM/project b261801 — llvm/lib/Target/AMDGPU AMDGPUTargetTransformInfo.cpp, llvm/test/Analysis/CostModel/AMDGPU store.ll load.ll

[AMDGPU] Price memory operations by the number of memory instructions

Price a load or store as the number of memory instructions it is split
into.

Constant and buffer "fat" pointers are left alone (for now).
DeltaFile
+191-133llvm/test/Analysis/CostModel/AMDGPU/load.ll
+260-50llvm/test/Transforms/SLPVectorizer/AMDGPU/ordered-reduction-coalesced-loads.ll
+178-120llvm/test/Analysis/CostModel/AMDGPU/store.ll
+74-7llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+2-1llvm/test/CodeGen/AMDGPU/simplify-libcalls.ll
+2-1llvm/test/CodeGen/AMDGPU/amdgpu-simplify-libcall-sincos.ll
+707-3121 files not shown
+708-3137 files

LLVM/project 1769ec8 — llvm/lib/Target/AMDGPU AMDGPUTargetTransformInfo.cpp, llvm/test/Analysis/CostModel/AMDGPU store.ll load.ll

[AMDGPU] Price under-aligned memory operations

Without unaligned access for the address space, an access aligned below
4 bytes is split into pieces of its alignment. LDS accesses aligned to 4
use 8-byte pieces, and take a 12-byte piece only when aligned to 16 or
when unaligned DS access is enabled.

DeltaFile
+131-47llvm/test/Transforms/SLPVectorizer/AMDGPU/packed-math.ll
+48-33llvm/test/Analysis/CostModel/AMDGPU/store.ll
+48-33llvm/test/Analysis/CostModel/AMDGPU/load.ll
+22-2llvm/test/Transforms/SLPVectorizer/AMDGPU/vectorize-i8.ll
+10-1llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
+259-1165 files

LLVM/project 93d242e — llvm/lib/Target/X86 X86ISelLowering.cpp, llvm/test/Analysis/CostModel/X86 shuffle-splat.ll

[X86] Allow bf16 masked load/store with AVX512BW (#230953)

bf16 masked loads/stores don't use any avx512bf16 instructions, but
isLegalMaskedLoadStore only accepted bfloat with hasBF16(). Without it
they got scalarized, which is pretty bad (one branch plus an
extend/truncate libcall per element). With BWI they can use vmovdqu16
the same way f16 does, and the existing mask_move_lowering_f16_bf16
patterns only need BWI.

This relaxes the TTI check to BWI like half, and makes
v8bf16/v16bf16/v32bf16 legal with BWI. They were only legal with
BF16/AVXNECONVERT before, so on plain BWI the masked ops were split
before isel ever saw them (avx512bf16 implies BWI anyway). To go with
that:

- v8bf16/v16bf16 masked loads/stores use the same non-VLX widening as
f16.
- A few broadcast/insert/extract/subvector zeroing patterns that don't
need any bf16 instructions are now enabled with BWI (or folded into the

    [8 lines not shown]
DeltaFile
+610-0llvm/test/CodeGen/X86/bfloat.ll
+315-75llvm/test/Transforms/VectorCombine/X86/narrow-phi-of-shuffles.ll
+14-294llvm/test/CodeGen/X86/atomic-load-store.ll
+69-0llvm/test/CodeGen/X86/avx512-masked_memop-16-8.ll
+44-22llvm/lib/Target/X86/X86ISelLowering.cpp
+47-14llvm/test/Analysis/CostModel/X86/shuffle-splat.ll
+1,099-4055 files not shown
+1,151-44311 files

LLVM/project aaf0167 — llvm/lib/Support UnicodeNameToCodepointGenerated.cpp, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.896bit.ll amdgcn.bitcast.960bit.ll

Rebase, fix regressions

Created using spr 1.3.7
DeltaFile
+80,340-99,572llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+32,677-17,309llvm/test/CodeGen/AMDGPU/frem.ll
+21,540-27,245llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+23,347-23,371llvm/lib/Support/UnicodeNameToCodepointGenerated.cpp
+16,761-20,379llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+15,630-19,063llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.896bit.ll
+190,295-206,93915,511 files not shown
+1,224,782-749,27115,517 files

LLVM/project 8fbde41 — llvm/test/Transforms/SLPVectorizer/AArch64 odd-width-i1-reduction-split-compares.ll

[SLP][NFC]Add an test for non-power-of-2 i1 reduction, NFC



Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/233246
DeltaFile
+54-0llvm/test/Transforms/SLPVectorizer/AArch64/odd-width-i1-reduction-split-compares.ll
+54-01 files

LLVM/project 9ea9dcd — llvm/lib/CodeGen RegisterPressure.cpp, llvm/test/CodeGen/AMDGPU debug-value-scheduler-crash.mir schedule-pressure-unflagged-dead-physreg-def.mir

RegisterPressure: Detect dead physreg defs from LiveIntervals with lane masks (#233215)

Extend the fix from #225079 to the lane mask tracking path used by
targets with subregister liveness. adjustLaneLiveness also needs to
force the physreg unit ranges to be computed to identify dead defs,
rather than taking the conservative default when they are not cached.

Without this, an overlapping physreg def missing a dead flag is
counted as a live def. Conservatively assuming it is live doesn't work
because PressureDiff disagrees with the tracker and fails the
EXPENSIVE_CHECKS consistency assert.

This avoids an ll asm test failing when LiveVariables removed; #233202
fixes the missing dead flag for that case. I had additional patches
which nearly eliminate all missing dead flags. Unless the verifier
enforces accurate dead flags, we still need to handle this edge case.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+30-0llvm/test/CodeGen/AMDGPU/schedule-pressure-unflagged-dead-physreg-def.mir
+6-4llvm/lib/CodeGen/RegisterPressure.cpp
+1-1llvm/test/CodeGen/AMDGPU/debug-value-scheduler-crash.mir
+37-53 files

LLVM/project 61e3606 — flang/test/Semantics/OpenMP to-clause-v45.f90 from-clause-v45.f90

Update tests
DeltaFile
+1-1flang/test/Semantics/OpenMP/to-clause-v45.f90
+1-1flang/test/Semantics/OpenMP/from-clause-v45.f90
+2-22 files

LLVM/project b517c2e — llvm/lib/Transforms/Vectorize LoopVectorizationPlanner.h LoopVectorize.cpp

[LV] Thread an explicit CM param through VPlan-building/costing helpers (#224836)

Parameterize `cost()`, `tryToBuildVPlan1()`, `tryToBuildVPlan()`, 
`buildVPlans()` and `addReductionResultComputation` with an explicit
`LoopVectorizationCostModel &PlanCM` argument instead of always reaching
for the planner's own CM member.

This is preparation for tail-folded vector epilogue support, which will
plan against a separate CM from the one used for the main vector loop. 
Passing the CM in explicitly lets these functions to be called with
whichever CM applies to what's currently being planned.

All existing call sites still pass *CM, so this is NFC.
DeltaFile
+49-43llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+23-15llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+72-582 files

LLVM/project d504898 — clang/docs/CIR CodeDuplication.md CleanupAndEHDesign.md

[clang][docs] fix grammar and spelling errors in cir docs (#220877)

Fix some obvious typos and grammar mistakes in the CIR docs.

Signed-off-by: Hardik Kumar <hardikxk at gmail.com>
DeltaFile
+3-3clang/docs/CIR/CleanupAndEHDesign.md
+2-2clang/docs/CIR/CodeDuplication.md
+5-52 files

LLVM/project 7bbfd6f — flang/lib/Semantics check-omp-atomic.cpp check-omp-structure.h, flang/test/Semantics/OpenMP declare-target02.f90 flush02.f90

[flang][OpenMP] Switch clause verification to descriptor-based

Delete all the scattered pieces of clause verification that are now
replaced by the unified handling.
DeltaFile
+57-273flang/lib/Semantics/check-omp-structure.cpp
+300-0flang/lib/Semantics/check-omp-syntax.cpp
+22-10flang/lib/Semantics/check-omp-structure.h
+0-31flang/lib/Semantics/check-omp-atomic.cpp
+8-8flang/test/Semantics/OpenMP/flush02.f90
+15-0flang/test/Semantics/OpenMP/declare-target02.f90
+402-32237 files not shown
+517-38443 files

LLVM/project 8c0ea26 — flang/test/Semantics/OpenMP to-clause-v45.f90 from-clause-v45.f90

Update tests
DeltaFile
+1-1flang/test/Semantics/OpenMP/to-clause-v45.f90
+1-1flang/test/Semantics/OpenMP/from-clause-v45.f90
+2-22 files

LLVM/project 5e1d4a6 — llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeHelper.cpp, llvm/test/CodeGen/AMDGPU/GlobalISel unmerge-sgpr-s16.mir regbankselect-mui-regbanklegalize.mir

[AMDGPU][GlobalISel]: Fix uniform unmerge into 16-bit values (#232954)

UnmergeI32 replaces UnmergeV2S16: it produces the same 32-bit chunks
directly in the scalar representation that the unpack helper needs.
These previous <2 x s16> pieces were immediately passed to unpackAExt,
which bitcast each one to i32 before extracting its halves.

This preserves the previously valid vector case and also supports the
scalar i64 case, where producing vector chunks directly was invalid. The
<4 x s16> MIR regression checks the resulting four 16-bit outputs in
order.

Assisted by: Claude Opus 5.5
DeltaFile
+65-0llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-mui-regbanklegalize.mir
+5-7llvm/test/CodeGen/AMDGPU/GlobalISel/unmerge-sgpr-s16.mir
+4-5llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeHelper.cpp
+74-123 files

LLVM/project d05c46c — clang/test/CodeGen/AArch64/sve nand.c, clang/test/CodeGen/AArch64/sve-intrinsics acle_sve_nand.c

[clang][CIR] Add tests for SVE NAND intrinsics (#233173)

Tests for plain SVE `svnand`
(https://developer.arm.com/architectures/instruction-sets/intrinsics/#q=svnand).

Port: `clang/test/CodeGen/AArch64/sve-intrinsics/acle_sve_nand.c` to
`clang/test/CodeGen/AArch64/sve/nand.c`

Part of https://github.com/llvm/llvm-project/issues/223963.
DeltaFile
+49-0clang/test/CodeGen/AArch64/sve/nand.c
+0-38clang/test/CodeGen/AArch64/sve-intrinsics/acle_sve_nand.c
+49-382 files

LLVM/project 33f6412 — clang/test/CodeGen/AArch64/sve orn.c, clang/test/CodeGen/AArch64/sve-intrinsics acle_sve_orn.c

[clang][CIR] Add tests for SVE ORN intrinsics (#233169)

Tests for plain SVE `svorn`
(https://developer.arm.com/architectures/instruction-sets/intrinsics/#q=svorn).

Port: `clang/test/CodeGen/AArch64/sve-intrinsics/acle_sve_orn.c` to
`clang/test/CodeGen/AArch64/sve/orn.c`

Part of https://github.com/llvm/llvm-project/issues/223963.
DeltaFile
+49-0clang/test/CodeGen/AArch64/sve/orn.c
+0-38clang/test/CodeGen/AArch64/sve-intrinsics/acle_sve_orn.c
+49-382 files

LLVM/project bf63386 — llvm/include/llvm/Option ArgList.h, llvm/lib/Option ArgList.cpp

[Option] Allow subcommand names as positional arguments (#227077)

ArgList::getSubCommand() treats every positional argument that matches
a subcommand name as a subcommand, and reports multiple subcommands if
more than one does. That rejects valid command lines where a later
positional argument happens to be spelled like a subcommand, e.g.

  git branch clone  # create a new branch named "clone"

Add an AllowSubCommandNamesAsPositionals parameter to getSubCommand().
When set, the first positional argument that matches a subcommand name
is the subcommand, and later ones are passed to HandleOtherPositionals
instead of being reported as multiple subcommands.

This is needed by tools that can take a name or path as positional
argument.
Since name and path can be arbitrary strings including subcommand names.
DeltaFile
+38-0llvm/unittests/Option/OptionSubCommandsTest.cpp
+13-9llvm/lib/Option/ArgList.cpp
+10-4llvm/include/llvm/Option/ArgList.h
+61-133 files

LLVM/project 6d30aa1 — llvm/test/CodeGen/AMDGPU machine-scheduler-sink-trivial-remats.mir

AMDGPU: Mark unread physreg defs dead in a scheduler test (#233214)

These registers defined by IMPLICIT_DEF but never read. Without the
dead flags, the pressure tracker assumes the uncached physreg units
are live out of the region. Ideally physreg dead flags would be
accurate, though this is currently not a verifier enforced rule. This
avoids some test churn in a future pressure tracking commit.

Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
DeltaFile
+11-11llvm/test/CodeGen/AMDGPU/machine-scheduler-sink-trivial-remats.mir
+11-111 files

LLVM/project 28b3085 — llvm/test/tools/llvm-split/AMDGPU recursive-search-8.ll recursive-search-2.ll

[NFC][AMDGPU] Store through a global pointer in recursive search llvm-split tests

Their function sizes then do not depend on the cost of flat stores.

DeltaFile
+17-17llvm/test/tools/llvm-split/AMDGPU/recursive-search-8.ll
+17-17llvm/test/tools/llvm-split/AMDGPU/recursive-search-2.ll
+34-342 files

LLVM/project eed91a2 — llvm/test/Analysis/CostModel/AMDGPU store.ll load.ll

[NFC][AMDGPU] Precommit memory operation cost tests across alignments and subtargets
DeltaFile
+324-137llvm/test/Analysis/CostModel/AMDGPU/load.ll
+234-137llvm/test/Analysis/CostModel/AMDGPU/store.ll
+558-2742 files

LLVM/project 4fdbcc3 — clang/test/CodeGen/AArch64/sve nor.c, clang/test/CodeGen/AArch64/sve-intrinsics acle_sve_nor.c

[clang][CIR] Add tests for SVE NOR intrinsics (#233172)

Tests for plain SVE `svnor`
(https://developer.arm.com/architectures/instruction-sets/intrinsics/#q=svnor).

Port: `clang/test/CodeGen/AArch64/sve-intrinsics/acle_sve_nor.c` to
`clang/test/CodeGen/AArch64/sve/nor.c`

Part of https://github.com/llvm/llvm-project/issues/223963.
DeltaFile
+49-0clang/test/CodeGen/AArch64/sve/nor.c
+0-38clang/test/CodeGen/AArch64/sve-intrinsics/acle_sve_nor.c
+49-382 files

LLVM/project 4c10fc6 — flang/lib/Semantics check-omp-atomic.cpp check-omp-structure.h, flang/test/Semantics/OpenMP declare-target02.f90 flush02.f90

[flang][OpenMP] Switch clause verification to descriptor-based

Delete all the scattered pieces of clause verification that are now
replaced by the unified handling.
DeltaFile
+57-273flang/lib/Semantics/check-omp-structure.cpp
+300-0flang/lib/Semantics/check-omp-syntax.cpp
+22-10flang/lib/Semantics/check-omp-structure.h
+0-31flang/lib/Semantics/check-omp-atomic.cpp
+8-8flang/test/Semantics/OpenMP/flush02.f90
+15-0flang/test/Semantics/OpenMP/declare-target02.f90
+402-32237 files not shown
+517-38443 files

LLVM/project 320e008 — flang/lib/Semantics check-omp-syntax.cpp, flang/test/Semantics/OpenMP uses-allocators-version51.f90 uses-allocators-version50.f90

[flang][OpenMP] Improve diagnostics about modifier properties

Use OpenMPDeprecated and OpenMPFuture warning categories for modifier
diagnostics as well, analogously to how they are used for clauses.
DeltaFile
+67-31flang/lib/Semantics/check-omp-syntax.cpp
+4-4flang/test/Semantics/OpenMP/map-modifiers-v60.f90
+3-3flang/test/Semantics/OpenMP/uses-allocators-version50.f90
+3-3flang/test/Semantics/OpenMP/to-clause-v45.f90
+3-3flang/test/Semantics/OpenMP/from-clause-v45.f90
+2-2flang/test/Semantics/OpenMP/uses-allocators-version51.f90
+82-466 files not shown
+89-5312 files