Ignore:
Timestamp:
Oct 18, 2014, 4:05:41 PM (5 years ago)
Author:
cameron
Message:

All -> Zeroes, Ones

File:
1 edited

Legend:

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

    r4244 r4247  
    628628    Value * retVal = nullptr;
    629629    IRBuilder<> b(mBasicBlock);
    630     if (const All* all = dyn_cast<All>(expr))
     630    if (isa<Ones>(expr))
    631631    {
    632632        Value* ptr_all = b.CreateAlloca(mXi64Vect);
    633         b.CreateStore((all->getValue() == 0 ? mZeroInitializer : mAllOneInitializer), ptr_all);
     633        b.CreateStore(mAllOneInitializer, ptr_all);
     634        retVal = b.CreateLoad(ptr_all);
     635    }
     636    else if (isa<Zeroes>(expr))
     637    {
     638        Value* ptr_all = b.CreateAlloca(mXi64Vect);
     639        b.CreateStore(mZeroInitializer, ptr_all);
    634640        retVal = b.CreateLoad(ptr_all);
    635641    }
Note: See TracChangeset for help on using the changeset viewer.