Changeset View
Changeset View
Standalone View
Standalone View
llvm/trunk/lib/Target/Hexagon/HexagonTargetTransformInfo.cpp
Show All 39 Lines | |||||
static const unsigned FloatFactor = 4; | static const unsigned FloatFactor = 4; | ||||
bool HexagonTTIImpl::useHVX() const { | bool HexagonTTIImpl::useHVX() const { | ||||
return ST.useHVXOps() && HexagonAutoHVX; | return ST.useHVXOps() && HexagonAutoHVX; | ||||
} | } | ||||
bool HexagonTTIImpl::isTypeForHVX(Type *VecTy) const { | bool HexagonTTIImpl::isTypeForHVX(Type *VecTy) const { | ||||
assert(VecTy->isVectorTy()); | assert(VecTy->isVectorTy()); | ||||
if (cast<VectorType>(VecTy)->isScalable()) | |||||
return false; | |||||
// Avoid types like <2 x i32*>. | // Avoid types like <2 x i32*>. | ||||
if (!cast<VectorType>(VecTy)->getElementType()->isIntegerTy()) | if (!cast<VectorType>(VecTy)->getElementType()->isIntegerTy()) | ||||
return false; | return false; | ||||
EVT VecVT = EVT::getEVT(VecTy); | EVT VecVT = EVT::getEVT(VecTy); | ||||
if (!VecVT.isSimple() || VecVT.getSizeInBits() <= 64) | if (!VecVT.isSimple() || VecVT.getSizeInBits() <= 64) | ||||
return false; | return false; | ||||
if (ST.isHVXVectorType(VecVT.getSimpleVT())) | if (ST.isHVXVectorType(VecVT.getSimpleVT())) | ||||
return true; | return true; | ||||
▲ Show 20 Lines • Show All 256 Lines • Show Last 20 Lines |