Changeset View
Changeset View
Standalone View
Standalone View
llvm/include/llvm/CodeGen/BasicTTIImpl.h
Show First 20 Lines • Show All 1,152 Lines • ▼ Show 20 Lines | unsigned RetVF = | ||||
(RetTy->isVectorTy() ? cast<FixedVectorType>(RetTy)->getNumElements() | (RetTy->isVectorTy() ? cast<FixedVectorType>(RetTy)->getNumElements() | ||||
: 1); | : 1); | ||||
assert((RetVF == 1 || VF == 1) && "VF > 1 and RetVF is a vector type"); | assert((RetVF == 1 || VF == 1) && "VF > 1 and RetVF is a vector type"); | ||||
const IntrinsicInst *I = ICA.getInst(); | const IntrinsicInst *I = ICA.getInst(); | ||||
const SmallVectorImpl<const Value *> &Args = ICA.getArgs(); | const SmallVectorImpl<const Value *> &Args = ICA.getArgs(); | ||||
FastMathFlags FMF = ICA.getFlags(); | FastMathFlags FMF = ICA.getFlags(); | ||||
switch (IID) { | switch (IID) { | ||||
default: | default: | ||||
// FIXME: all cost kinds should default to the same thing? | |||||
if (CostKind != TTI::TCK_RecipThroughput) | |||||
return BaseT::getIntrinsicInstrCost(ICA, CostKind); | |||||
break; | break; | ||||
case Intrinsic::cttz: | case Intrinsic::cttz: | ||||
// FIXME: If necessary, this should go in target-specific overrides. | // FIXME: If necessary, this should go in target-specific overrides. | ||||
if (VF == 1 && RetVF == 1 && getTLI()->isCheapToSpeculateCttz()) | if (VF == 1 && RetVF == 1 && getTLI()->isCheapToSpeculateCttz()) | ||||
return TargetTransformInfo::TCC_Basic; | return TargetTransformInfo::TCC_Basic; | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 772 Lines • Show Last 20 Lines |