Changeset 6053


Ignore:
Timestamp:
May 20, 2018, 7:12:59 PM (4 weeks ago)
Author:
cameron
Message:

esimd_mergel 4 argument order fix

Location:
icGREP/icgrep-devel/icgrep
Files:
2 edited

Legend:

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

    r6052 r6053  
    406406Value * IDISA_Builder::esimd_mergeh(unsigned fw, Value * a, Value * b) {   
    407407    if (fw == 4) {
    408         Value * abh = simd_or(simd_and(simd_himask(fw*2), a), simd_srli(32, simd_and(simd_himask(fw*2), b), fw));
    409         Value * abl = simd_or(simd_slli(32, simd_and(simd_lomask(fw*2), a), fw), simd_and(simd_lomask(fw*2), b));
     408        Value * abh = simd_or(simd_and(simd_himask(fw*2), b), simd_srli(32, simd_and(simd_himask(fw*2), a), fw));
     409        Value * abl = simd_or(simd_slli(32, simd_and(simd_lomask(fw*2), b), fw), simd_and(simd_lomask(fw*2), a));
    410410        return esimd_mergeh(fw * 2, abl, abh);
    411411    }
     
    422422Value * IDISA_Builder::esimd_mergel(unsigned fw, Value * a, Value * b) {
    423423    if (fw == 4) {
    424         Value * abh = simd_or(simd_and(simd_himask(fw*2), a), simd_srli(32, simd_and(simd_himask(fw*2), b), fw));
    425         Value * abl = simd_or(simd_slli(32, simd_and(simd_lomask(fw*2), a), fw), simd_and(simd_lomask(fw*2), b));
     424        Value * abh = simd_or(simd_and(simd_himask(fw*2), b), simd_srli(32, simd_and(simd_himask(fw*2), a), fw));
     425        Value * abl = simd_or(simd_slli(32, simd_and(simd_lomask(fw*2), b), fw), simd_and(simd_lomask(fw*2), a));
    426426        return esimd_mergel(fw * 2, abl, abh);
    427427    }
  • icGREP/icgrep-devel/icgrep/kernels/hex_convert.cpp

    r6051 r6053  
    6363    for (unsigned i = 0; i < 4; i++) {
    6464        Value * bit_data = b->loadInputStreamBlock("binary_data", ZERO, b->getInt32(i));
    65         Value * nybble_0 = b->fwCast(8, b->esimd_mergel(4, b->allZeroes(), bit_data));
    66         Value * nybble_1 = b->fwCast(8, b->esimd_mergeh(4, b->allZeroes(), bit_data));
     65        Value * nybble_0 = b->fwCast(8, b->esimd_mergel(4, bit_data, b->allZeroes()));
     66        Value * nybble_1 = b->fwCast(8, b->esimd_mergeh(4, bit_data, b->allZeroes()));
    6767        Value * data_09 = b->simd_add(8, nybble_0, splatCh_0);
    6868        Value * data_af = b->simd_add(8, nybble_0, splatCh_a);
Note: See TracChangeset for help on using the changeset viewer.