Skip to content

Commit 358f934

Browse files
committed
Fixup, reuse same function as select instruction
1 parent f834ca4 commit 358f934

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,11 +1132,10 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
11321132
return getCmpSelInstrCost(*FOp, ICA.getReturnType(), ICA.getArgTypes()[0],
11331133
CmpInst::BAD_ICMP_PREDICATE, CostKind);
11341134
}
1135-
case Intrinsic::vp_merge: {
1136-
auto LT = getTypeLegalizationCost(RetTy);
1137-
return LT.first *
1138-
getRISCVInstructionCost(RISCV::VMERGE_VVM, LT.second, CostKind);
1139-
}
1135+
case Intrinsic::vp_merge:
1136+
return getCmpSelInstrCost(Instruction::Select, ICA.getReturnType(),
1137+
ICA.getArgTypes()[0], CmpInst::BAD_ICMP_PREDICATE,
1138+
CostKind);
11401139
}
11411140

11421141
if (ST->hasVInstructions() && RetTy->isVectorTy()) {

0 commit comments

Comments
 (0)