Skip to content

Conversation

@fhahn
Copy link
Contributor

@fhahn fhahn commented Apr 16, 2025

Remove legacy ILV sinkScalarOperands, which is superseded by the sinkScalarOperands VPlan transforms.

There are a few cases that aren't handled by VPlan's sinkScalarOperands, namely when we have scalar-steps where the first lane is used outside a replicate region; the IR-based sinking is able to sink computing the steps for all lanes except the first.

We could improve this further, by duplicating such scalar-steps recipes, one to serve the first-lane-only users and users in replicate regions, but I am not sure if the extra complexity is warrented.

Remove legacy ILV sinkScalarOperands, which is superseded by the
sinkScalarOperands VPlan transforms.

There are a few cases that aren't handled by VPlan's sinkScalarOperands,
namely when we have scalar-steps where the first lane is used outside a
replicate region; the IR-based sinking is able to sink computing the
steps for all lanes except the first.

We could improve this further, by duplicating such scalar-steps recipes,
one to serve the first-lane-only users and users in replicate regions,
but I am not sure if the extra complexity is warrented.
@github-actions
Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
View the diff from clang-format here.
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index d2f93bb7d..586a66af6 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -2857,7 +2857,6 @@ void InnerLoopVectorizer::fixVectorizedLoop(VPTransformState &State) {
   if (!State.Plan->getVectorLoopRegion())
     return;
 
-
   VPRegionBlock *VectorRegion = State.Plan->getVectorLoopRegion();
   VPBasicBlock *HeaderVPBB = VectorRegion->getEntryBasicBlock();
   BasicBlock *HeaderBB = State.CFG.VPBB2IRBB[HeaderVPBB];

@fhahn fhahn closed this Apr 21, 2025
@fhahn fhahn deleted the remove-ilvsink-scalar-operands branch April 21, 2025 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant