Changeset 5983


Ignore:
Timestamp:
Apr 20, 2018, 11:29:53 PM (12 months ago)
Author:
nmedfort
Message:

Compilation bug fix

File:
1 edited

Legend:

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

    r5974 r5983  
    118118        iBuilder->SetInsertPoint(extendLiteralLengthCon);
    119119
    120         iBuilder->CreateLikelyCondBr(iBuilder->CreateICmpNE(iBuilder->CreateLoad(
    121                 iBuilder->getRawInputPointer("byteStream", iBuilder->CreateAdd(tokenPos, iBuilder->getInt64(1)))),
    122                                                             iBuilder->getInt8(0xff)), extendLiteralLengthExit,
    123                                     extendLiteralLengthBody);
     120        Value * const nextTokenPos = iBuilder->CreateAdd(tokenPos, iBuilder->getInt64(1));
     121        Value * const nextToken = iBuilder->CreateLoad(iBuilder->getRawInputPointer("byteStream", nextTokenPos));
     122        Value * const isExitToken = iBuilder->CreateICmpNE(nextToken, iBuilder->getInt8(0xff));
     123        iBuilder->CreateLikelyCondBr(isExitToken, extendLiteralLengthExit, extendLiteralLengthBody);
    124124
    125125
     
    127127        Value* newCursorPos2 = this->advanceUntilNextZero(iBuilder, "extender", iBuilder->CreateAdd(tokenPos, iBuilder->getInt64(1)), blockEnd);
    128128        BasicBlock* advanceFinishBlock = iBuilder->GetInsertBlock();
     129
    129130
    130131        iBuilder->CreateBr(extendLiteralLengthExit);
     
    136137
    137138        PHINode* phiCursorPosAfterLiteral = iBuilder->CreatePHI(iBuilder->getInt64Ty(), 3);
    138         phiCursorPosAfterLiteral->addIncoming(iBuilder->CreateAdd(tokenPos, iBuilder->getInt64(1)), extendLiteralLengthCon);
     139        phiCursorPosAfterLiteral->addIncoming(nextTokenPos, extendLiteralLengthCon);
    139140        phiCursorPosAfterLiteral->addIncoming(newCursorPos2, advanceFinishBlock);
    140141        phiCursorPosAfterLiteral->addIncoming(tokenPos, entryBlock);
Note: See TracChangeset for help on using the changeset viewer.