forked from OSchip/llvm-project
Support vector constant zeros, thanks to Zack Rusin for the testcase.
llvm-svn: 47148
This commit is contained in:
parent
bc0ba39a1e
commit
1dd86b1154
|
@ -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()) {
|
||||
|
|
Loading…
Reference in New Issue