aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/TargetTransformImpl.cpp
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2012-12-21 01:24:36 +0000
committerNadav Rotem <nrotem@apple.com>2012-12-21 01:24:36 +0000
commitc2a537bd08d9deedefe184c9fb887c6d30ae9fd2 (patch)
treed7ed7d1dadda9eb7b15887696902ddee77103075 /lib/Target/TargetTransformImpl.cpp
parente30843ded90f9f7b22cc8dfa352922047ffedcc6 (diff)
BB-Vectorizer: Check the cost of the store pointer type
and not the return type, which is void. A number of test cases fail after adding the assertion in TTImpl. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170828 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/TargetTransformImpl.cpp')
-rw-r--r--lib/Target/TargetTransformImpl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Target/TargetTransformImpl.cpp b/lib/Target/TargetTransformImpl.cpp
index 7f9fdfc938..4320437020 100644
--- a/lib/Target/TargetTransformImpl.cpp
+++ b/lib/Target/TargetTransformImpl.cpp
@@ -340,6 +340,7 @@ unsigned
VectorTargetTransformImpl::getMemoryOpCost(unsigned Opcode, Type *Src,
unsigned Alignment,
unsigned AddressSpace) const {
+ assert(!Src->isVoidTy() && "Invalid type");
std::pair<unsigned, MVT> LT = getTypeLegalizationCost(Src);
// Assume that all loads of legal types cost 1.