[llvm] [VPlan] Use VPInstruction for uniform binops. (PR #141429)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 4 04:27:25 PDT 2025
================
@@ -196,6 +200,15 @@ static bool sinkScalarOperands(VPlan &Plan) {
SinkCandidate->replaceUsesWithIf(Clone, [SinkTo](VPUser &U, unsigned) {
return cast<VPRecipeBase>(&U)->getParent() != SinkTo;
});
+ } else {
+ if (auto *VPI = dyn_cast<VPInstruction>(SinkCandidate)) {
+ auto *OldCand = SinkCandidate;
+ SinkCandidate = new VPReplicateRecipe(VPI->getUnderlyingInstr(),
+ SinkCandidate->operands(), true,
+ nullptr /*Mask*/);
----------------
ayalz wrote:
Can VPI be cloned instead?
https://github.com/llvm/llvm-project/pull/141429
More information about the llvm-commits
mailing list