[llvm] [VPlan] Use VPInstructionWithType for uniform casts. (PR #140623)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Sun May 3 15:42:01 PDT 2026
================
@@ -1031,8 +1031,15 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
unsigned ExtOpcode = match(R.getOperand(0), m_SExt(m_VPValue()))
? Instruction::SExt
: Instruction::ZExt;
- auto *VPC =
- new VPWidenCastRecipe(Instruction::CastOps(ExtOpcode), A, TruncTy);
+ VPSingleDefRecipe *VPC;
+ if (vputils::isSingleScalar(Def))
----------------
artagnon wrote:
I actually think we could infer it for all recipes actually -- all we need is an opcode and a profitability criterion to propagate existing Narrow information from hard-coded cases like live-ins (which are necessarily narrow), calls, and intrinsics (which are necessarily wide).
https://github.com/llvm/llvm-project/pull/140623
More information about the llvm-commits
mailing list