Index: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp =================================================================== --- llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp +++ llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp @@ -299,7 +299,7 @@ EVT DstTy = TLI->getValueType(DL, Dst); if (!SrcTy.isSimple() || !DstTy.isSimple()) - return BaseT::getCastInstrCost(Opcode, Dst, Src, CostKind); + return BaseT::getCastInstrCost(Opcode, Dst, Src, CostKind, I); static const TypeConversionCostTblEntry ConversionTbl[] = { @@ -403,7 +403,7 @@ SrcTy.getSimpleVT())) return Entry->Cost; - return BaseT::getCastInstrCost(Opcode, Dst, Src, CostKind); + return BaseT::getCastInstrCost(Opcode, Dst, Src, CostKind, I); } int AArch64TTIImpl::getExtractWithExtendCost(unsigned Opcode, Type *Dst, Index: llvm/test/Transforms/SLPVectorizer/AArch64/horizontal.ll =================================================================== --- llvm/test/Transforms/SLPVectorizer/AArch64/horizontal.ll +++ llvm/test/Transforms/SLPVectorizer/AArch64/horizontal.ll @@ -244,7 +244,7 @@ ; YAML-NEXT: Function: test_unrolled_select ; YAML-NEXT: Args: ; YAML-NEXT: - String: 'Vectorized horizontal reduction with cost ' -; YAML-NEXT: - Cost: '-47' +; YAML-NEXT: - Cost: '-31' ; YAML-NEXT: - String: ' and with tree size ' ; YAML-NEXT: - TreeSize: '10'