Changeset 4677 for icGREP


Ignore:
Timestamp:
Jul 16, 2015, 7:34:33 AM (4 years ago)
Author:
cameron
Message:

carry-in bug fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/carry_manager.cpp

    r4676 r4677  
    6767   
    6868Value * CarryManager::getCarryOpCarryIn(int localIndex) {
     69    unsigned cd_index = mCurrentScopeIndex + mCarryInfo->carryOpCarryDataOffset(localIndex);
    6970    if (mCarryInfo->getWhileDepth() == 0) {
    70        Value * packPtr = mBuilder->CreateGEP(mCarryDataPtr, mBuilder->getInt64(mCurrentScopeIndex + mCarryInfo->carryOpCarryDataOffset(localIndex)));
     71       Value * packPtr = mBuilder->CreateGEP(mCarryDataPtr, mBuilder->getInt64(cd_index));
    7172       mCarryInVector[mCarryInfo->carryOpCarryDataOffset(localIndex)] = mBuilder->CreateAlignedLoad(packPtr, BLOCK_SIZE/8);
    7273    }
    73     return mCarryInVector[mCarryInfo->carryOpCarryDataOffset(localIndex)];
     74    return mCarryInVector[cd_index];
    7475}
    7576
     
    103104        mCarryInVector[carryDataIndex] = mBuilder->CreateAlignedLoad(packPtr, BLOCK_SIZE/8);
    104105        mBuilder->CreateAlignedStore(strm, packPtr, BLOCK_SIZE/8);
    105        
    106106    }
    107107    Value * carry_in = mCarryInVector[carryDataIndex];
     
    128128        mCarryInVector[carryDataIndex] = mBuilder->CreateAlignedLoad(packPtr, BLOCK_SIZE/8);
    129129        mBuilder->CreateAlignedStore(strm, packPtr, BLOCK_SIZE/8);
    130        
    131130    }
    132131    Value * carry_in = mCarryInVector[carryDataIndex];
Note: See TracChangeset for help on using the changeset viewer.