Changeset 5381


Ignore:
Timestamp:
Mar 30, 2017, 1:51:42 PM (2 years ago)
Author:
nmedfort
Message:

Bug fix for 32 bit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/streamset.cpp

    r5379 r5381  
    158158    Value * instance = iBuilder->CreateCacheAlignedAlloca(ty);
    159159    Value * const capacityPtr = iBuilder->CreateGEP(instance, {iBuilder->getInt32(0), iBuilder->getInt32(0)});
    160     Constant * const initialSize = ConstantExpr::getMul(ConstantExpr::getSizeOf(ty->getStructElementType(1)->getPointerElementType()), iBuilder->getSize(mBufferBlocks));
     160    Constant * initialSize = ConstantExpr::getSizeOf(ty->getStructElementType(1)->getPointerElementType());
     161    initialSize = ConstantExpr::getMul(initialSize, iBuilder->getSize(mBufferBlocks));
     162    initialSize = ConstantExpr::getIntegerCast(initialSize, iBuilder->getSizeTy(), false);
    161163    iBuilder->CreateStore(initialSize, capacityPtr);
    162164    Value * addr = iBuilder->CreateAlignedMalloc(initialSize, iBuilder->getCacheAlignment());
Note: See TracChangeset for help on using the changeset viewer.