LLVM/project a8bf25cflang/include/flang/Optimizer/Transforms Passes.td, flang/lib/Optimizer/Transforms SimplifyRegionLite.cpp

[flang][NFC] Allow simplify-region-lite to run on any op (#220698)

The pass only walks the regions of getOperation(). Pinning it to
ModuleOp forced a single liveness lattice over the whole compile unit
and blocked scheduling it under a nested pass manager. Drop the
ModuleOp constraint so callers can run it per IsolatedFromAbove op.
Existing module-level addPass() uses are unchanged.
DeltaFile
+3-5flang/lib/Optimizer/Transforms/SimplifyRegionLite.cpp
+1-1flang/include/flang/Optimizer/Transforms/Passes.td
+4-62 files

LLVM/project 3e9019ellvm/test/Transforms/LoopVectorize div-exact.ll if-pred-stores.ll, llvm/test/Transforms/LoopVectorize/VPlan dissolve-replicate-regions.ll

[VPlan] Skip branch term in masks for some preserved uniform edges
DeltaFile
+28-2,414llvm/test/Transforms/LoopVectorize/predicator.ll
+6-425llvm/test/Transforms/LoopVectorize/X86/cost-conditional-branches.ll
+27-120llvm/test/Transforms/LoopVectorize/if-pred-stores.ll
+16-130llvm/test/Transforms/LoopVectorize/div-exact.ll
+32-93llvm/test/Transforms/LoopVectorize/X86/predicated-replicate-feeding-cast.ll
+25-76llvm/test/Transforms/LoopVectorize/VPlan/dissolve-replicate-regions.ll
+134-3,25833 files not shown
+560-3,83839 files

LLVM/project 74c6569llvm/include/llvm/CodeGen BasicTTIImpl.h

[TTI] Fix dyn_cast null-check in BasicTTIImpl (#220755)

Introduced in #107273.
DeltaFile
+1-1llvm/include/llvm/CodeGen/BasicTTIImpl.h
+1-11 files

LLVM/project 6909103offload/libompaccsupport device.cpp PluginManager.cpp, offload/libomptarget device.cpp PluginManager.cpp

[offload][nfc] Extract libomptarget infrastructure into libompaccsupport (#213784)

libompaccsupport will become the support library for both OpenMP and
OpenACC. This patch extracts the files that will become part of it.
Currently it only moves the files and the build configuration is
unchanged.

Next patches will start refactoring libompaccsupport to flesh out the
subset of the infrastructure that will be shared between OpenMP and
OpenACC in small verifiable chunks while maintaining libomptarget's
existing behaviour.

Gradually adding the libacctarget implementation that uses
libompaccsupport will also follow.
DeltaFile
+0-584offload/libomptarget/OpenMP/Mapping.cpp
+584-0offload/libompaccsupport/Mapping.cpp
+0-573offload/libomptarget/PluginManager.cpp
+573-0offload/libompaccsupport/PluginManager.cpp
+0-513offload/libomptarget/device.cpp
+512-0offload/libompaccsupport/device.cpp
+1,669-1,6703 files not shown
+1,728-1,7289 files

LLVM/project 44bf667llvm/test/Transforms/LoopVectorize div-exact.ll if-pred-stores.ll, llvm/test/Transforms/LoopVectorize/AArch64 conditional-branches-cost.ll

[VPlan] Skip branch term in masks for some preserved uniform edges
DeltaFile
+28-2,414llvm/test/Transforms/LoopVectorize/predicator.ll
+6-425llvm/test/Transforms/LoopVectorize/X86/cost-conditional-branches.ll
+27-120llvm/test/Transforms/LoopVectorize/if-pred-stores.ll
+16-130llvm/test/Transforms/LoopVectorize/div-exact.ll
+32-93llvm/test/Transforms/LoopVectorize/X86/predicated-replicate-feeding-cast.ll
+102-9llvm/test/Transforms/LoopVectorize/AArch64/conditional-branches-cost.ll
+211-3,19134 files not shown
+662-3,84740 files

LLVM/project 4be4f10llvm/lib/Transforms/Vectorize VPlanPredicator.cpp, llvm/test/Transforms/LoopVectorize hoist-predicated-loads.ll if-pred-stores.ll

[VPlan][Predicator] Preserve some uniform control flow

Implements "Partial Control-Flow Linearization" by Simon Moll and
Sebastian Hack.

That should allow implementation of an alternative to
https://github.com/llvm/llvm-project/pull/141900 based on this
functionality (see BOSCC in the paper).
DeltaFile
+1,514-204llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+1,492-137llvm/test/Transforms/LoopVectorize/predicator.ll
+184-128llvm/test/Transforms/LoopVectorize/X86/cost-conditional-branches.ll
+236-18llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+81-45llvm/test/Transforms/LoopVectorize/if-pred-stores.ll
+102-10llvm/test/Transforms/LoopVectorize/hoist-predicated-loads.ll
+3,609-54240 files not shown
+4,300-80046 files

LLVM/project 30b8641llvm/lib/Transforms/Vectorize VPlanPredicator.cpp

Implement non-uniform part of partial linearization algorithm
DeltaFile
+57-12llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+57-121 files

LLVM/project d29de05llvm/lib/Transforms/Vectorize VPlanRecipes.cpp

Don't crash dumping malformed phis
DeltaFile
+20-0llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+20-01 files

LLVM/project 7006cafllvm/lib/Transforms/Vectorize VPlanPredicator.cpp

[AI] Move convertPhisToBlends to post-linearization
DeltaFile
+28-9llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+28-91 files

LLVM/project 914f0efllvm/lib/Transforms/Vectorize VPlanUtils.h VPlanUtils.cpp, llvm/unittests/Transforms/Vectorize VPlanTest.cpp

Luke's reconstructSSA (#212209)
DeltaFile
+268-0llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
+37-0llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+9-0llvm/lib/Transforms/Vectorize/VPlanUtils.h
+314-03 files

LLVM/project abafe65llvm/test/Transforms/LoopVectorize/VPlan predicator.ll

Create actual test functions (AI-assisted)
DeltaFile
+478-25llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+478-251 files

LLVM/project 2f0864bllvm/test/Transforms/LoopVectorize predicator.ll, llvm/test/Transforms/LoopVectorize/VPlan predicator.ll

Copy to LoopVectorize/predicator.ll and generate CHECKs in both
DeltaFile
+1,077-0llvm/test/Transforms/LoopVectorize/predicator.ll
+547-1llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+1,624-12 files

LLVM/project e0ed02bllvm/test/Transforms/LoopVectorize/VPlan predicator.ll

Predicator tests for uniform control flow preservation
DeltaFile
+168-0llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+168-01 files

LLVM/project 3e11d9bllvm/lib/Transforms/Vectorize VPlanPredicator.cpp, llvm/test/Transforms/LoopVectorize predicator.ll

[VPlan] Use compact RPOT instead of just RPOT

This is necessary for the future partial linearization change, but I
wanted to commit this bit independently because it changes some tests on
itself and could potentially provide more blend optimization
opportunites (at least I hoped) but that didn't seem to happen.
DeltaFile
+58-15llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+32-32llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+4-4llvm/test/Transforms/LoopVectorize/predicator.ll
+4-4llvm/test/Transforms/LoopVectorize/X86/predicate-switch.ll
+98-554 files

LLVM/project 6417230llvm/lib/Transforms/Vectorize VPlanTransforms.cpp

Drop `removeCommonBlendMask` from `simplifyBlends` - noop now
DeltaFile
+0-19llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+0-191 files

LLVM/project 9ef1abcllvm/lib/Transforms/Vectorize VPlanPredicator.cpp, llvm/test/Transforms/LoopVectorize pr43166-fold-tail-by-masking.ll

[VPlan] Optimize away common blend mask in predicator
DeltaFile
+12-105llvm/test/Transforms/LoopVectorize/AArch64/conditional-branches-cost.ll
+5-16llvm/test/Transforms/LoopVectorize/pr43166-fold-tail-by-masking.ll
+16-2llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+8-7llvm/test/Transforms/LoopVectorize/VPlan/conditional-scalar-assignment-vplan.ll
+6-8llvm/test/Transforms/LoopVectorize/AArch64/masked-call-scalarize.ll
+8-6llvm/test/Transforms/LoopVectorize/RISCV/divrem.ll
+55-14422 files not shown
+90-18828 files

LLVM/project 4de5870llvm/lib/Transforms/Vectorize VPlanPredicator.cpp, llvm/test/Transforms/LoopVectorize select-cmp-blend-chain.ll reduction-inloop.ll

[VPlan] Make blend operands non-reorderable to optimize their masks in predicator

Sort the incoming edges according to RPOT order so that we could use
simpler source block mask instead of the edge mask.
DeltaFile
+78-118llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+105-10llvm/test/Transforms/LoopVectorize/AArch64/conditional-branches-cost.ll
+14-24llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+15-21llvm/test/Transforms/LoopVectorize/reduction-inloop.ll
+18-18llvm/test/Transforms/LoopVectorize/dereferenceable-info-from-assumption-constant-size.ll
+23-7llvm/test/Transforms/LoopVectorize/select-cmp-blend-chain.ll
+253-19849 files not shown
+479-39855 files

LLVM/project e73db4dorc-rt/test/regression check-rt-processi-info.test, orc-rt/test/regression/darwin lit.local.cfg check-rt-process-info.test

[orc-rt] Add darwin subdir for regression tests. (#220754)

All tests in the new subdirectory are implicitly gated on lit's
"system-darwin" feature flag.

Move check-rt-process-info.test into the darwin subdirectory and drop
its "system-darwin" guard, since it will now be covered by the darwin
directory's guard.
DeltaFile
+0-8orc-rt/test/regression/check-rt-processi-info.test
+6-0orc-rt/test/regression/darwin/check-rt-process-info.test
+2-0orc-rt/test/regression/darwin/lit.local.cfg
+8-83 files

LLVM/project 01145e3mlir/lib/Dialect/XeGPU/Transforms XeGPUVectorLinearize.cpp, mlir/test/Dialect/XeGPU xegpu-vector-linearize.mlir

[MLIR][XeGPU] Promote mixed-size vector.shuffle in xegpu-vector-linearize (#217141)

Linearizing an insert of a narrow chunk into a wider tile produces a
`vector.shuffle` whose operands have different lengths:

%0 = vector.insert_strided_slice %chunk, %tile {offsets = [1, 0],
strides = [1]}
     : vector<4xbf16> into vector<8x4xbf16>
  // becomes shuffle(vector<32xbf16>, vector<4xbf16>)

MLIR permits that, but LLVM and SPIR-V shuffles require both operands to
have the
same type, so `convert-vector-to-llvm` falls off its fast path and emits
one
`extractelement` plus one `insertelement` per result element. In a
workgroup-level
mxfp GEMM the linearizer emits ~1000 such shuffles, and scalarizing them
accounts
for roughly 70% of the emitted LLVM IR.

    [15 lines not shown]
DeltaFile
+64-20mlir/test/Dialect/XeGPU/xegpu-vector-linearize.mlir
+17-0mlir/lib/Dialect/XeGPU/Transforms/XeGPUVectorLinearize.cpp
+81-202 files

LLVM/project 6f1ee9bllvm/test/Transforms/LoopVectorize/VPlan predicator.ll

Remove tests from predicator.ll
DeltaFile
+0-352llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+0-3521 files

LLVM/project 803fa8allvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlanPredicator.cpp, llvm/test/Transforms/LoopVectorize/RISCV tail-folding-complex-mask.ll low-trip-count.ll

[VPlan] Reassociate header mask in the predicator during mask creation
DeltaFile
+37-28llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+45-5llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+0-29llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+9-10llvm/test/Transforms/LoopVectorize/RISCV/low-trip-count.ll
+3-1llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-complex-mask.ll
+0-2llvm/test/Transforms/LoopVectorize/VPlan/vplan-print-before-after-all.ll
+94-756 files

LLVM/project efab8e0llvm/test/Transforms/LoopVectorize/VPlan predicator.ll

Copy tests to predicator.ll
DeltaFile
+343-0llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+343-01 files

LLVM/project aab4e16llvm/lib/Target/AMDGPU AMDGPULowerIntrinsics.cpp, llvm/lib/Target/AMDGPU/AsmParser AMDGPUAsmParser.cpp

[AMDGPU] Validate barrier ID in S_BARRIER_SIGNAL_ISFIRST (#220101)

Value user_cluster_barrier_id is not supported.

Fixes: SWDEV-534494
DeltaFile
+3-36llvm/test/CodeGen/AMDGPU/lower-intrinsics-cluster-barrier.ll
+23-0llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+9-0llvm/lib/Target/AMDGPU/AMDGPULowerIntrinsics.cpp
+9-0llvm/test/CodeGen/AMDGPU/llvm.amdgcn.s.barrier.signal.isfirst.invalid_barrier.ll
+5-0llvm/test/MC/AMDGPU/gfx13_err.s
+3-0llvm/test/MC/AMDGPU/gfx12_err.s
+52-366 files

LLVM/project 30b1fa2llvm/lib/Transforms/Vectorize VPlanEVLTailFolding.cpp VPlanPatternMatch.h

[NFC][VPlan] Move `m_RemoveMask` to `VPlanPatternMatch.h`

I plan to use it in the `VPlanPredicator.cpp`.
DeltaFile
+0-23llvm/lib/Transforms/Vectorize/VPlanEVLTailFolding.cpp
+23-0llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
+23-232 files

LLVM/project 7ecc2b3offload/languages/kernel CMakeLists.txt

[Offload] Build LLVMOffloadKernel with add_library (#220748)

Depending on system and cmake configuration, LLVMOffloadKernel cannot
find LLVMOffload when testing because they live in different directories
in the build.

This patch aligns LLVMOffloadKernel's library build/install directory
configuration with LLVMOffload's, which makes sure it can always be
found.

The cause is that llvm_add_library adds some implicit handling which can
throw off the directories we need (see
3383f0d6fe01374b91845e7cd3ee949594c4bfc6)
DeltaFile
+7-3offload/languages/kernel/CMakeLists.txt
+7-31 files

LLVM/project db62516clang/test/CodeGenHLSL/builtins trunc_mat.hlsl tan_mat.hlsl

[HLSL] Add matrix support for float->float pure function intrinsics (#202455)

Resolves #184486, #184492, #184495, #184496, #184497, #184499, #184500,
#184501, #184502, #184503, #184504, #184507, #184508, #184509, #184514,
#184515, #184516, #184517, #184518, #184519, #184520, #184521, #184522

Assisted-by: Claude Sonnet 4
DeltaFile
+244-0clang/test/CodeGenHLSL/builtins/saturate_mat.hlsl
+233-0clang/test/CodeGenHLSL/builtins/rcp_mat.hlsl
+184-0clang/test/CodeGenHLSL/builtins/rsqrt_mat.hlsl
+184-0clang/test/CodeGenHLSL/builtins/frac_mat.hlsl
+143-0clang/test/CodeGenHLSL/builtins/tan_mat.hlsl
+142-0clang/test/CodeGenHLSL/builtins/trunc_mat.hlsl
+1,130-018 files not shown
+3,544-2324 files

LLVM/project e775ea8llvm/lib/Target/AMDGPU AMDGPUHWEvents.def AMDGPUHWEvents.cpp, llvm/test/CodeGen/AMDGPU flat-atomicrmw-fadd.ll a-v-flat-atomicrmw.ll

[AMDGPU] Track BUFFER_INV during waitcnt insertion (#220694)

Currently SIInsertWaitcnts doesn't mark `BUFFER_INV` instructions as
incrementing `VM_CNT`, though according to gfx942/gfx950 ISA `VM_CNT`
does increment. This PR teaches SIInsertWaitcnts to handle `BUFFER_INV`,
akin to how `GLOBAL_INV` is handled for gfx12+. No changes in behavior
are made for gfx12+ codegen.

Similar to `GLOBAL_INV` the implementation elides waits when inv
instructions are the only pending load events because they do not write
VGPRs.

The motivation is to use `BUFFER_INV 0` as a nop to increment `VM_CNT`
in branches to allow relaxed `s_waitcnt vmcnt` instructions (coming in a
separate PR).
DeltaFile
+45-0llvm/test/CodeGen/AMDGPU/waitcnt-buffer-inv.mir
+20-16llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+0-18llvm/test/CodeGen/AMDGPU/a-v-flat-atomicrmw.ll
+0-12llvm/test/CodeGen/AMDGPU/flat-atomicrmw-fadd.ll
+6-5llvm/lib/Target/AMDGPU/AMDGPUHWEvents.cpp
+1-1llvm/lib/Target/AMDGPU/AMDGPUHWEvents.def
+72-521 files not shown
+72-537 files

LLVM/project 8ee8291llvm/lib/Transforms/Vectorize VPlanPredicator.cpp

[NFC][VPlan] Move `introduceMasksAndLinearize` into a `VPPredicator`'s method

To reduce diff in the next PR.

AI-assisted.
DeltaFile
+21-13llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+21-131 files

LLVM/project a19f611llvm/lib/Target/RISCV RISCVISelLowering.cpp, llvm/test/CodeGen/RISCV/rvv convert-from-arbitrary-fp.ll fixed-vector-convert-from-arbitrary-fp.ll

[RISCV] Lower `CONVERT_FROM_ARBITRARY_FP` of Float8E5M2 with Zvfofp8min (#220132)

The new(-ish) `llvm.convert.from.arbitrary.fp` intrinsics (`ISD::
CONVERT_FROM_ARBITRARY_FP`) can be lowered into `vfwcvtbf16.f.f.v` from
Zvfofp8min if the input operand is a Float8E5M2 / Float8E4M3 vector
(represented by i8 vector in LLVM), and producing a bf16 vector result.

This patch adds such lowering for the Float8E5M2 type
(SelectionDAGBuilder hasn't supported the Float8E4M3 variant of
`CONVERT_FROM_ARBITRARY_FP`).

Note that although Zvfofp8min does not require Zvfbfmin or Zvfbfa[^1],
in reality it'll be pretty difficult to implement that (lower of
`vfwcvtbf16.f.f.v` even though there is only no bf16 vector support) in
legalization. So for this patch, I emit `vfwcvtbf16.f.f.v` only if both
Zvfofp8min _and_ bf16 vector support are present.

[^1]: Rationale:
https://github.com/riscv/riscv-isa-manual/pull/2979#issuecomment-4320773526
DeltaFile
+486-0llvm/test/CodeGen/RISCV/rvv/fixed-vector-convert-from-arbitrary-fp.ll
+54-0llvm/lib/Target/RISCV/RISCVISelLowering.cpp
+24-0llvm/test/CodeGen/RISCV/rvv/convert-from-arbitrary-fp.ll
+564-03 files

LLVM/project fadd7e6orc-rt/include/orc-rt/support Compiler.h

[orc-rt] Remove unused ORC_RT_HAS_CPP_ATTRIBUTE (#220747)
DeltaFile
+0-10orc-rt/include/orc-rt/support/Compiler.h
+0-101 files