Ignore:
Timestamp:
Dec 15, 2017, 12:44:01 PM (16 months ago)
Author:
nmedfort
Message:

Initial check-in of LookAhead? support; modified LineBreakKernel? to compute CR+LF using LookAhead?(1) + misc. fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/CBuilder.cpp

    r5771 r5782  
    9999    Value * const p = b->CreatePtrToInt(Ptr, intPtrTy);
    100100    Value * const s = b->CreatePtrToInt(Base, intPtrTy);
    101     Value * const e = b->CreateAdd(s, b->CreateSub(sz, b->CreateZExtOrTrunc(Size, intPtrTy)));
    102     return b->CreateAnd(b->CreateICmpUGE(p, s), b->CreateICmpULE(p, e));
     101    Value * const w = b->CreateAdd(p, b->CreateZExtOrTrunc(Size, intPtrTy));
     102    Value * const e = b->CreateAdd(s, sz);
     103    return b->CreateAnd(b->CreateICmpUGE(p, s), b->CreateICmpULE(w, e));
    103104}
    104105
Note: See TracChangeset for help on using the changeset viewer.