LLVM/project 7d44a15flang/lib/Semantics symbol.cpp, flang/test/Semantics/OpenMP declare-target-modfile.f90

[flang][openmp] Write to clause to modfile (#213936)

Fix bug where the list of variables would be ignored when writing the
to clause of a declare target directive to a modfile.
DeltaFile
+7-2flang/lib/Semantics/symbol.cpp
+4-0flang/test/Semantics/OpenMP/declare-target-modfile.f90
+11-22 files

LLVM/project e9094b4llvm/test/Transforms/LoopVectorize/VPlan/AArch64 vplan-memory-op-decisions.ll

Regenerate CHECKs after rebase
DeltaFile
+26-18llvm/test/Transforms/LoopVectorize/VPlan/AArch64/vplan-memory-op-decisions.ll
+26-181 files

LLVM/project c278f9dllvm/lib/Target/AMDGPU SIISelLowering.cpp, llvm/test/CodeGen/AMDGPU idot4-test.ll

[AMDGPU] Do not fold add chains wider than 32 bits into dot4 (#216015)

dot4 always produces a 32-bit result, so folding a wider accumulator
would silently drop its upper bits
DeltaFile
+66-0llvm/test/CodeGen/AMDGPU/idot4-test.ll
+3-1llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+69-12 files

LLVM/project c8293e2flang/lib/Parser Fortran-parsers.cpp

[flang][Parser][NFC] Don't build a discarded list while scanning identifiers (#219330)

```c++
constexpr auto rawName{nonDigitIdChar >> many(nonDigitIdChar || digit)};
TYPE_PARSER(space >> sourced(rawName >> construct<Name>()))
```

`many()` has resultType `std::list<const char *>`, so scanning an
identifier heap-allocates one node per character after the first -- the
leading `nonDigitIdChar` is outside `many()`. The `>>` operator discards
its left operand's value, so that list is destroyed unread; `sourced()`
recovers the text from the cursor span instead. Backtracking rescans
identifiers, so CloverLeaf_Serial (401KB) does 3.9M unnecessary
allocations.

Fix: use `skipMany`, documented as "equivalent to many(x) but with no
result", with the same `BacktrackingParser` wrapper. -0.88%
instructions:u; emitted code byte-identical with CloverLeaf_Serial.
DeltaFile
+1-1flang/lib/Parser/Fortran-parsers.cpp
+1-11 files

LLVM/project ac8cd41mlir/include/mlir/IR TypeRange.h

Use explicit `operator==` call for `DenseMapInfo<mlir::TypeRange>` to avoid `C++20 says that these are ambiguous, even though the second is reversed` warning (#218713)

Fix https://github.com/llvm/llvm-project/issues/81769
DeltaFile
+1-1mlir/include/mlir/IR/TypeRange.h
+1-11 files

LLVM/project eec11b4llvm/lib/Transforms/Vectorize VPlanPredicator.cpp, llvm/test/Transforms/LoopVectorize/VPlan predicator.ll

Share block masks in reconstructSSA for blend masks
DeltaFile
+12-18llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+4-7llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+16-252 files

LLVM/project 5a4c5f7llvm/lib/Transforms/Vectorize VPlanPredicator.cpp, llvm/test/Transforms/LoopVectorize blend-in-header.ll predicatedinst-loop-invariant.ll

Don't preserve branch-on-constant
DeltaFile
+15-62llvm/test/Transforms/LoopVectorize/constantfolder.ll
+5-25llvm/test/Transforms/LoopVectorize/predicatedinst-loop-invariant.ll
+2-10llvm/test/Transforms/LoopVectorize/blend-in-header.ll
+11-1llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+2-9llvm/test/Transforms/LoopVectorize/X86/replicate-recipe-with-only-first-lane-used.ll
+3-7llvm/test/Transforms/LoopVectorize/RISCV/dead-ops-cost.ll
+38-1141 files not shown
+39-1217 files

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

Extra tests for mask/phi re-use
DeltaFile
+149-0llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+149-01 files

LLVM/project 6ccf1dcllvm/lib/Transforms/Vectorize VPlanPredicator.cpp, llvm/test/Transforms/LoopVectorize predicator.ll

Fix bug in previous commit
DeltaFile
+84-10llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+22-19llvm/test/Transforms/LoopVectorize/predicator.ll
+10-5llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+7-6llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-complex-mask.ll
+7-6llvm/test/Transforms/LoopVectorize/RISCV/gather-scatter-cost.ll
+6-5llvm/test/Transforms/LoopVectorize/RISCV/divrem.ll
+136-512 files not shown
+145-578 files

LLVM/project 77eec55llvm/test/Transforms/LoopVectorize constant-fold-commutative-and.ll predicator.ll, llvm/test/Transforms/LoopVectorize/RISCV tail-folding-complex-mask.ll gather-scatter-cost.ll

Do CommonDom mask removal before reconstructSSA run for blend masks
DeltaFile
+23-31llvm/test/Transforms/LoopVectorize/predicator.ll
+12-16llvm/test/Transforms/LoopVectorize/RISCV/divrem.ll
+8-12llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-complex-mask.ll
+8-12llvm/test/Transforms/LoopVectorize/RISCV/gather-scatter-cost.ll
+5-10llvm/test/Transforms/LoopVectorize/constant-fold-commutative-and.ll
+5-10llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+61-913 files not shown
+73-1069 files

LLVM/project 8aec84dllvm/test/Transforms/LoopVectorize scalarize-masked-call.ll predicator.ll, llvm/test/Transforms/LoopVectorize/RISCV divrem.ll

WIP2
DeltaFile
+303-346llvm/test/Transforms/LoopVectorize/RISCV/divrem.ll
+100-100llvm/test/Transforms/LoopVectorize/X86/x86-predication.ll
+97-97llvm/test/Transforms/LoopVectorize/induction.ll
+64-60llvm/test/Transforms/LoopVectorize/predicator.ll
+56-65llvm/test/Transforms/LoopVectorize/scalarize-masked-call.ll
+23-23llvm/test/Transforms/LoopVectorize/X86/pr109581-unused-blend.ll
+643-69116 files not shown
+836-84922 files

LLVM/project 71aa326llvm/lib/Transforms/Vectorize VPlanPredicator.cpp, llvm/test/Transforms/LoopVectorize predicator.ll constantfolder.ll

WIP
DeltaFile
+336-288llvm/test/Transforms/LoopVectorize/RISCV/divrem.ll
+66-56llvm/test/Transforms/LoopVectorize/scalarize-masked-call.ll
+26-27llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+31-16llvm/test/Transforms/LoopVectorize/constantfolder.ll
+18-10llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+17-10llvm/test/Transforms/LoopVectorize/predicator.ll
+494-40714 files not shown
+579-45420 files

LLVM/project 776ec7ellvm/lib/Transforms/Vectorize VPlanPredicator.cpp, llvm/test/Transforms/LoopVectorize induction.ll predicator.ll

WIP preserve move uniform cfg, BROKEN

Masks for blends originated from preserved CFG are `true` which is wrong
with the current algorithm, see blend_masks_triangle_phi in
predicator.ll
DeltaFile
+6-369llvm/test/Transforms/LoopVectorize/X86/cost-conditional-branches.ll
+126-126llvm/test/Transforms/LoopVectorize/X86/x86-predication.ll
+128-83llvm/test/Transforms/LoopVectorize/predicator.ll
+97-97llvm/test/Transforms/LoopVectorize/induction.ll
+76-75llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+84-15llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+517-76526 files not shown
+993-1,09032 files

LLVM/project 0030e69llvm/lib/Transforms/Vectorize VPlan.h VPlanHelpers.h, llvm/test/Transforms/LoopVectorize hoist-predicated-loads-with-predicated-stores.ll

Awful AI-generated hack to deal with bcast/extractelement breaking SSA
DeltaFile
+35-77llvm/test/Transforms/LoopVectorize/VPlan/dissolve-replicate-regions.ll
+34-1llvm/lib/Transforms/Vectorize/VPlan.cpp
+18-12llvm/test/Transforms/LoopVectorize/hoist-predicated-loads-with-predicated-stores.ll
+14-10llvm/test/Transforms/LoopVectorize/RISCV/gather-scatter-cost.ll
+13-0llvm/lib/Transforms/Vectorize/VPlanHelpers.h
+6-0llvm/lib/Transforms/Vectorize/VPlan.h
+120-1002 files not shown
+122-1018 files

LLVM/project 73308b7llvm/lib/Transforms/Vectorize VPlanPredicator.cpp

[AI] Move convertPhisToBlends to post-linearization
DeltaFile
+41-12llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+41-121 files

LLVM/project 0f0dc28flang/test/Lower/OpenMP metadirective-loop.f90

Add closing-brace CHECK-NOT for fallback blocks
DeltaFile
+12-0flang/test/Lower/OpenMP/metadirective-loop.f90
+12-01 files

LLVM/project 665bc50libc/src/__support/math lgammaf16.h gamma_util.h, libc/test/src/math lgammaf_test.cpp

 [libc][math] Implement single precision lgamma function  (#205490)

The implementation reduces to `|x|` and selects a path:

- **Tiny** ($|x| < 2^{-23}$): truncated Laurent series $\text{lgamma}(x)
= -\log|x| - \gamma\,|x|$.
- **Small** ($|x| < 0.66$): a centered-monomial minimax fit (degree 17
for $x>0$, degree 25 for $x<0$) of the smooth quotient $g(x) =
\frac{\text{lgamma}(x) + \log|x|}{x}$, recovering $\text{lgamma}(x) =
x\cdot g(x) - \log|x|$ with a single FMA rounding.
- **Medium** ($|x| \in [0.66, 3.37]$): centered-monomial minimax fits
split into three sub-ranges that factor out the function's roots —
  - $[0.66, 1)$: $\text{lgamma}(t) = (t-1)\,P(t)$ (degree 14)
  - $[1, 2)$: $\text{lgamma}(t) = (t-1)(t-2)\,P(t)$ (degree 18)
  - $[2, 3.37)$: $\text{lgamma}(t) = (t-2)\,P(t)$ (degree 15)
- **Stirling** ($|x| > 3.37$): $(x-0.5)(\log x - 1) +
\frac{\log(2\pi)}{2} - \tfrac12$ plus a $1/x$ Bernoulli correction whose
term count is selected by sub-range (degree-10 residual poly on $(3.37,
73]$; 4-term, then 2-term; dropped entirely for $|x| > 2^{20}$).

    [42 lines not shown]
DeltaFile
+505-0libc/src/__support/math/lgammaf.h
+116-0libc/src/__support/math/gamma_util.h
+100-0libc/test/src/math/lgammaf_test.cpp
+100-0libc/test/src/math/smoke/lgammaf_test.cpp
+2-90libc/src/__support/math/lgammaf16.h
+38-1utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+861-9123 files not shown
+1,057-9229 files

LLVM/project 11243c9clang/lib/CodeGen CGHLSLBuiltins.cpp, clang/lib/Sema HLSLExternalSemaSource.cpp HLSLBuiltinTypeDeclBuilder.cpp

Merge branch 'users/icohedron/texturecubearray' into users/icohedron/rwtexture-load
DeltaFile
+187-131clang/lib/Sema/HLSLBuiltinTypeDeclBuilder.cpp
+37-113clang/test/AST/HLSL/Textures-vector-AST.hlsl
+37-113clang/test/AST/HLSL/Textures-scalar-AST.hlsl
+40-14clang/lib/CodeGen/CGHLSLBuiltins.cpp
+29-10clang/lib/Sema/HLSLExternalSemaSource.cpp
+15-22clang/test/SemaHLSL/Resources/Textures-SampleGrad.hlsl
+345-40310 files not shown
+510-48116 files

LLVM/project 1500b7dllvm/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 c02306dllvm/test/Transforms/LoopVectorize predicator.ll div-exact.ll, llvm/test/Transforms/LoopVectorize/AArch64 predication_costs.ll

WIP Don't adjust mask for preserved uniform edges
DeltaFile
+43-136llvm/test/Transforms/LoopVectorize/if-pred-stores.ll
+10-124llvm/test/Transforms/LoopVectorize/div-exact.ll
+33-48llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+7-48llvm/test/Transforms/LoopVectorize/RISCV/dead-ops-cost.ll
+13-38llvm/test/Transforms/LoopVectorize/predicator.ll
+34-4llvm/test/Transforms/LoopVectorize/AArch64/predication_costs.ll
+140-39811 files not shown
+179-50617 files

LLVM/project 47f2006llvm/lib/Transforms/Vectorize VPlanPredicator.cpp

Outline `shouldPreserveTerminator`
DeltaFile
+58-56llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+58-561 files

LLVM/project 46dfb9fllvm/lib/Transforms/Vectorize VPlanPredicator.cpp, llvm/test/Transforms/LoopVectorize uniform-blend.ll predicator.ll

[VPlan][Predicator] Preserve some uniform control flow

Implements "Partial Control-Flow Linearization" by Simon Moll and
Sebastian Hack. Does **NOT** improve predication/masking yet, so
applicability is artificially narrowed, only some uniform branches are
preserved. In particular, the following is left for future PRs:

* Block masks still contains now-unnecessary term for the preserved
  uniform branches.
* Mixed blends/phis aren't supported yet. Detecting where they would be
  necessary is as complex as implementing proper support (which would
  need either Luke's `reconstructSSA` or Iterated Dominance Frontier),
  so we also limit it to a trivial/structured CFG where there's only
  single block where those would need to be inserted.

I think even the current version might be enough to start implementing
an alternative to https://github.com/llvm/llvm-project/pull/141900 (see
BOSCC in the paper).
DeltaFile
+81-45llvm/test/Transforms/LoopVectorize/if-pred-stores.ll
+103-3llvm/lib/Transforms/Vectorize/VPlanPredicator.cpp
+45-38llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+49-13llvm/test/Transforms/LoopVectorize/predicator.ll
+32-8llvm/test/Transforms/LoopVectorize/uniform-blend.ll
+18-10llvm/test/Transforms/LoopVectorize/AArch64/transform-narrow-interleave-to-widen-memory-multi-block.ll
+328-11714 files not shown
+435-14620 files

LLVM/project 0f324b0llvm/lib/Transforms/Vectorize VPlanPredicator.cpp

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

LLVM/project 78d9230llvm/test/Transforms/LoopVectorize/VPlan predicator.ll

Add `*_no_phi` versions
DeltaFile
+623-0llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+623-01 files

LLVM/project 4078d35llvm/test/Transforms/LoopVectorize predicator.ll, llvm/test/Transforms/LoopVectorize/VPlan predicator.ll

Copy to LoopVectorize/predicator.ll and generate CHECKs in both
DeltaFile
+2,165-0llvm/test/Transforms/LoopVectorize/predicator.ll
+1,094-1llvm/test/Transforms/LoopVectorize/VPlan/predicator.ll
+3,259-12 files

LLVM/project 3a4b026llvm/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 aac6c47llvm/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 1a315dcllvm/lib/CodeGen MachineFunction.cpp

CodeGen: Use getVRegDef in salvageCopySSAImpl (#219518)
DeltaFile
+6-6llvm/lib/CodeGen/MachineFunction.cpp
+6-61 files

LLVM/project 2f30c78llvm/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 04618e9llvm/lib/Transforms/Vectorize VPlanTransforms.cpp

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