[llvm] [VPlan] Narrow VPWidenCastRecipe to scalar cast recipe. (PR #166514)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 5 04:49:31 PST 2025
================
@@ -1419,6 +1423,15 @@ static void narrowToSingleScalarRecipes(VPlan &Plan) {
}))
continue;
+ if (auto *CastR = dyn_cast<VPWidenCastRecipe>(RepOrWidenR)) {
+ VPBuilder Builder(CastR);
+ auto *Clone = Builder.createScalarCast(
+ CastR->getOpcode(), CastR->getOperand(0), CastR->getResultType(),
+ CastR->getDebugLoc());
+ CastR->replaceAllUsesWith(Clone);
+ CastR->eraseFromParent();
+ continue;
+ }
----------------
artagnon wrote:
I think you dropped the flags and metadata.
https://github.com/llvm/llvm-project/pull/166514
More information about the llvm-commits
mailing list