Ignore:
Timestamp:
Jun 23, 2018, 4:11:04 PM (16 months ago)
Author:
cameron
Message:

Prefer simd_select_hi/select_lo in place of simd_himask/lomask for arbitrary vector width

File:
1 edited

Legend:

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

    r6108 r6110  
    217217        Value * high_bits = simd_slli(16, mvmd_shuffle(8, interleave_table, fwCast(8, simd_srli(8, byte_merge, 4))), fw);
    218218        // For each 16-bit field, interleave the low bits of the two bytes.
    219         low_bits = simd_or(simd_and(low_bits, simd_lomask(16)), simd_srli(16, low_bits, 8-fw));
     219        low_bits = simd_or(simd_select_lo(16, low_bits), simd_srli(16, low_bits, 8-fw));
    220220        // For each 16-bit field, interleave the high bits of the two bytes.
    221         high_bits = simd_or(simd_and(high_bits, simd_himask(16)), simd_slli(16, high_bits, 8-fw));
     221        high_bits = simd_or(simd_select_hi(16, high_bits), simd_slli(16, high_bits, 8-fw));
    222222        return simd_or(low_bits, high_bits);
    223223    }
     
    234234        Value * high_bits = simd_slli(16, mvmd_shuffle(8, interleave_table, fwCast(8, simd_srli(8, byte_merge, 4))), fw);
    235235        // For each 16-bit field, interleave the low bits of the two bytes.
    236         low_bits = simd_or(simd_and(low_bits, simd_lomask(16)), simd_srli(16, low_bits, 8-fw));
     236        low_bits = simd_or(simd_select_lo(16, low_bits), simd_srli(16, low_bits, 8-fw));
    237237        // For each 16-bit field, interleave the high bits of the two bytes.
    238         high_bits = simd_or(simd_and(high_bits, simd_himask(16)), simd_slli(16, high_bits, 8-fw));
     238        high_bits = simd_or(simd_select_hi(16, high_bits), simd_slli(16, high_bits, 8-fw));
    239239        return simd_or(low_bits, high_bits);
    240240    }
Note: See TracChangeset for help on using the changeset viewer.