Skip to content

Commit 2d02fa5

Browse files
committed
Return invalid without V instructions
1 parent ec89b5c commit 2d02fa5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,7 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
11581158
case Intrinsic::experimental_vp_splat: {
11591159
auto LT = getTypeLegalizationCost(RetTy);
11601160
// TODO: Lower i1 experimental_vp_splat
1161-
if (LT.second.getScalarType() == MVT::i1)
1161+
if (!ST->hasVInstructions() || LT.second.getScalarType() == MVT::i1)
11621162
return InstructionCost::getInvalid();
11631163
return LT.first * getRISCVInstructionCost(LT.second.isFloatingPoint()
11641164
? RISCV::VFMV_V_F

0 commit comments

Comments
 (0)