[llvm-commits] [llvm] r170828 - in /llvm/trunk/lib: Target/TargetTransformImpl.cpp Transforms/Vectorize/BBVectorize.cpp
Nadav Rotem
nrotem at apple.com
Thu Dec 20 17:24:37 PST 2012
Author: nadav
Date: Thu Dec 20 19:24:36 2012
New Revision: 170828
URL: http://llvm.org/viewvc/llvm-project?rev=170828&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Target/TargetTransformImpl.cpp
llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp
Modified: llvm/trunk/lib/Target/TargetTransformImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetTransformImpl.cpp?rev=170828&r1=170827&r2=170828&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetTransformImpl.cpp (original)
+++ llvm/trunk/lib/Target/TargetTransformImpl.cpp Thu Dec 20 19:24:36 2012
@@ -340,6 +340,7 @@
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.
Modified: llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp?rev=170828&r1=170827&r2=170828&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/BBVectorize.cpp Thu Dec 20 19:24:36 2012
@@ -968,9 +968,9 @@
}
if (VTTI) {
- unsigned ICost = VTTI->getMemoryOpCost(I->getOpcode(), I->getType(),
+ unsigned ICost = VTTI->getMemoryOpCost(I->getOpcode(), aTypeI,
IAlignment, IAddressSpace);
- unsigned JCost = VTTI->getMemoryOpCost(J->getOpcode(), J->getType(),
+ unsigned JCost = VTTI->getMemoryOpCost(J->getOpcode(), aTypeJ,
JAlignment, JAddressSpace);
unsigned VCost = VTTI->getMemoryOpCost(I->getOpcode(), VType,
BottomAlignment,
More information about the llvm-commits
mailing list