Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Nov 3, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

owenca and others added 21 commits November 2, 2025 22:01
- Replace verifyFormat(Foo, Bar, ...) with verifyFormat(Foo, ...) or
verifyNoChange(Foo, ...) if Foo = Bar.

- Other minor cleanups
This patch removes const to allow std::move a couple of lines below to
perform a move operation as intended.

Identified with performance-move-const.
In C++17, static constexpr members are implicitly inline, so they no
longer require an out-of-line definition.

Identified with readability-redundant-declaration.
In C++17, static constexpr members are implicitly inline, so they no
longer require an out-of-line definition.

Identified with readability-redundant-declaration.
In C++17, static constexpr members are implicitly inline, so they no
longer require an out-of-line definition.

Identified with readability-redundant-declaration.
Rewrite sinkScalarOperands in VPlanTransforms for clarity, in
preparation for follow-up work to extend it to handle more recipes.
Use early exit in getOrCreateVPValueForSCEVExpr.
When OMPT is enabled, the stack pointer was not saved to frame pointer
register immediately after storing the frame pointer to the stack.
Therefore the frame pointers did not constitute a proper chain.
Fixes [#163352](#163352)
This simplifies the test by moving some of the complicated options
to loop attributes, so that it's easier to extend the test file
with new cases.

The options `-enable-epilogue-vectorization` and
`-epilogue-vectorization-force-VF=2` were not strictly necessary
for the test.
Currently in optimizeMaskToEVL we convert every widened load, store or
reduction to a VP predicated recipe with EVL, regardless of whether or
not it uses the header mask.

So currently we have to be careful when working on other parts VPlan to
make sure that the EVL transform doesn't break or transform something
incorrectly, because it's not a semantics preserving transform.
Forgetting to do so has caused miscompiles before, like the case that
was fixed in #113667

This PR rewrites it to work in terms of pattern matching, so it now only
converts a recipe to a VP predicated recipe if it is exactly masked with
the header mask.

After this the transform should be a true optimisation and not change
any semantics, so it shouldn't miscompile things if other parts of VPlan
change.

This fixes #152541, and allows us to move addExplicitVectorLength into
tryToBuildVPlanWithVPRecipes in #153144

It also splits out the load/store transforms into separate patterns for
reversed and non-reversed, which should make #146525 easier to implement
and reason about.
…ter. nfc (#165568)

The function simplifyRecipe now takes a VPSingleDefRecipe pointer since
it only simplifies single-def recipes for now.
If we have v4i64 mul(zext(v4i16), sext(v4i16)), we can code-generate
that as v4i64 smull(v4i32 zext(v4i16), sext(v4i16), as
zext(x)==sext(zext(x)). This teaches the part of CGP that sinks operands
to uses about that, so that it can treat a zext that is more than twice
the width as a sext.
Don't drop `assume` intrinsic when it's using `public_type_test `
intrinsic, as it could be used by devirtualization.
Avoid the construction of `GUID` when not required. This improves the
performance of a LLD `--thinlto-index-only` link of `clang` by ~4-5% on
both Windows and Linux.
)

With split SVE, it is possible to have multiple stack adjustments at the
same location. Previously, these were all handled separately, which
could result in more stack adjustments than necessary.

This patch reworks the prologue/epilogue to group stack adjustments when
possible. A nice side-effect is that the code for the prologue and
epilogue is now more closely aligned/similar.
@pull pull bot locked and limited conversation to collaborators Nov 3, 2025
@pull pull bot added the ⤵️ pull label Nov 3, 2025
@pull pull bot merged commit 33609bd into optimizecompile:main Nov 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.