Ignore:
Timestamp:
Apr 18, 2018, 10:02:24 AM (18 months ago)
Author:
cameron
Message:

AVX512 subfeature detection and popcount from Cole with further modification

File:
1 edited

Legend:

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

    r5973 r5977  
    506506            Value * const countSoFar = b->CreateAlignedLoad(ptr, alignment, c->getName() + "_accumulator");
    507507            const auto fieldWidth = b->getSizeTy()->getBitWidth();
    508             auto fields = (b->getBitBlockWidth() / fieldWidth);
    509             Value * fieldCounts = b->simd_popcount(fieldWidth, to_count);
    510             while (fields > 1) {
    511                 fields /= 2;
    512                 fieldCounts = b->CreateAdd(fieldCounts, b->mvmd_srli(fieldWidth, fieldCounts, fields));
    513             }
    514             value = b->CreateAdd(b->mvmd_extract(fieldWidth, fieldCounts, 0), countSoFar, "countSoFar");
     508            Value * bitBlockCount = b->simd_popcount(b->getBitBlockWidth(), to_count);
     509            value = b->CreateAdd(b->mvmd_extract(fieldWidth, bitBlockCount, 0), countSoFar, "countSoFar");
    515510            b->CreateAlignedStore(value, ptr, alignment);
    516511        } else if (const Lookahead * l = dyn_cast<Lookahead>(stmt)) {
Note: See TracChangeset for help on using the changeset viewer.