summaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86TargetTransformInfo.cpp
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2013-04-17 20:04:53 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2013-04-17 20:04:53 +0000
commit9c63f0d687cf1130ee2e76a6fdc87d71ae9d3961 (patch)
treec2cf4c26228e0545ebb5e74407fd3e3fc9db094e /lib/Target/X86/X86TargetTransformInfo.cpp
parentd58b50b99b04bcb8199c2b0273618b6a37d61015 (diff)
downloadllvm-9c63f0d687cf1130ee2e76a6fdc87d71ae9d3961.tar.gz
llvm-9c63f0d687cf1130ee2e76a6fdc87d71ae9d3961.tar.bz2
llvm-9c63f0d687cf1130ee2e76a6fdc87d71ae9d3961.tar.xz
X86 cost model: Exit before calling getSimpleVT on non-simple VTs
getSimpleVT can only handle simple value types. radar://13676022 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86TargetTransformInfo.cpp')
-rw-r--r--lib/Target/X86/X86TargetTransformInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/X86/X86TargetTransformInfo.cpp b/lib/Target/X86/X86TargetTransformInfo.cpp
index 488c2a42b2..eba9d782d5 100644
--- a/lib/Target/X86/X86TargetTransformInfo.cpp
+++ b/lib/Target/X86/X86TargetTransformInfo.cpp
@@ -371,6 +371,10 @@ unsigned X86TTI::getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src) const {
EVT SrcTy = TLI->getValueType(Src);
EVT DstTy = TLI->getValueType(Dst);
+ // The function getSimpleVT only handles simple value types.
+ if (!SrcTy.isSimple() || !DstTy.isSimple())
+ return TargetTransformInfo::getCastInstrCost(Opcode, Dst, Src);
+
static const TypeConversionCostTblEntry<MVT> AVXConversionTbl[] = {
{ ISD::SIGN_EXTEND, MVT::v8i32, MVT::v8i16, 1 },
{ ISD::ZERO_EXTEND, MVT::v8i32, MVT::v8i16, 1 },