@@ -1485,6 +1485,7 @@ InstructionCost VPWidenCastRecipe::computeCost(ElementCount VF,
14851485 return TTI::CastContextHint::Normal;
14861486 };
14871487
1488+ VPValue *Operand = getOperand (0 );
14881489 TTI::CastContextHint CCH = TTI::CastContextHint::None;
14891490 // For Trunc, the context is the only user, which must be a
14901491 // VPWidenStoreRecipe, a VPInterleaveRecipe ,or a VPReplicateRecipe.
@@ -1497,14 +1498,14 @@ InstructionCost VPWidenCastRecipe::computeCost(ElementCount VF,
14971498 // a VPInterleaveRecipe, a VPReplicateRecipe or a live-in value.
14981499 else if (Opcode == Instruction::ZExt || Opcode == Instruction::SExt ||
14991500 Opcode == Instruction::FPExt) {
1500- if (getOperand ( 0 ) ->isLiveIn ())
1501+ if (Operand ->isLiveIn ())
15011502 CCH = TTI::CastContextHint::Normal;
1502- else if (getOperand ( 0 ) ->getDefiningRecipe ())
1503- CCH = ComputeCCH (getOperand ( 0 ) ->getDefiningRecipe ());
1503+ else if (Operand ->getDefiningRecipe ())
1504+ CCH = ComputeCCH (Operand ->getDefiningRecipe ());
15041505 }
15051506
1506- auto *SrcTy = cast<VectorType>(
1507- ToVectorTy (Ctx.Types .inferScalarType (getOperand ( 0 ) ), VF));
1507+ auto *SrcTy =
1508+ cast<VectorType>( ToVectorTy (Ctx.Types .inferScalarType (Operand ), VF));
15081509 auto *DestTy = cast<VectorType>(ToVectorTy (getResultType (), VF));
15091510 // Arm TTI will use the underlying instruction to determine the cost.
15101511 return Ctx.TTI .getCastInstrCost (
0 commit comments