diff options
Diffstat (limited to 'llvm/lib/CodeGen/BasicTargetTransformInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/BasicTargetTransformInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp b/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp index e3ecf14d1f2..03c5eba3692 100644 --- a/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp +++ b/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp @@ -20,7 +20,6 @@ #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/Target/TargetLowering.h" #include <utility> - using namespace llvm; namespace { @@ -405,7 +404,9 @@ unsigned BasicTTI::getCmpSelInstrCost(unsigned Opcode, Type *ValTy, unsigned BasicTTI::getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index) const { - return 1; + std::pair<unsigned, MVT> LT = getTLI()->getTypeLegalizationCost(Val->getScalarType()); + + return LT.first; } unsigned BasicTTI::getMemoryOpCost(unsigned Opcode, Type *Src, |