Support vector constant zeros, thanks to Zack Rusin for the testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47148 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-02-15 00:57:28 +00:00
parent db01c8ba26
commit b6e1dd7075

View File

@ -799,13 +799,13 @@ void ExecutionEngine::InitializeMemory(const Constant *Init, void *Addr) {
for (unsigned i = 0, e = CP->getNumOperands(); i != e; ++i)
InitializeMemory(CP->getOperand(i), (char*)Addr+i*ElementSize);
return;
} else if (isa<ConstantAggregateZero>(Init)) {
memset(Addr, 0, (size_t)getTargetData()->getABITypeSize(Init->getType()));
return;
} else if (Init->getType()->isFirstClassType()) {
GenericValue Val = getConstantValue(Init);
StoreValueToMemory(Val, (GenericValue*)Addr, Init->getType());
return;
} else if (isa<ConstantAggregateZero>(Init)) {
memset(Addr, 0, (size_t)getTargetData()->getABITypeSize(Init->getType()));
return;
}
switch (Init->getType()->getTypeID()) {