Changeset 4997


Ignore:
Timestamp:
Mar 31, 2016, 11:17:36 AM (20 months ago)
Author:
cameron
Message:

Fix AVX2 packh/l

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IDISA/idisa_avx_builder.cpp

    r4996 r4997  
    5858        std::vector<Constant*> Idxs;
    5959        for (unsigned i = 0; i < field_count/4; i++) {
     60            Idxs.push_back(getInt32(2*i));
     61        }
     62        for (unsigned i = 0; i < field_count/4; i++) {
    6063            Idxs.push_back(getInt32(2*i + 1));
    6164        }
    6265        for (unsigned i = 0; i < field_count/4; i++) {
    63             Idxs.push_back(getInt32(2*i));
     66            Idxs.push_back(getInt32(field_count/2 + 2*i));
    6467        }
    6568        for (unsigned i = 0; i < field_count/4; i++) {
    6669            Idxs.push_back(getInt32(field_count/2 + 2*i + 1));
    67         }
    68         for (unsigned i = 0; i < field_count/4; i++) {
    69             Idxs.push_back(getInt32(field_count/2 + 2*i));
    7070        }
    7171        Value * shufa = CreateShuffleVector(aVec, aVec, ConstantVector::get(Idxs));
     
    8484        std::vector<Constant*> Idxs;
    8585        for (unsigned i = 0; i < field_count/4; i++) {
     86            Idxs.push_back(getInt32(2*i));
     87        }
     88        for (unsigned i = 0; i < field_count/4; i++) {
    8689            Idxs.push_back(getInt32(2*i + 1));
    8790        }
    8891        for (unsigned i = 0; i < field_count/4; i++) {
    89             Idxs.push_back(getInt32(2*i));
     92            Idxs.push_back(getInt32(field_count/2 + 2*i));
    9093        }
    9194        for (unsigned i = 0; i < field_count/4; i++) {
    9295            Idxs.push_back(getInt32(field_count/2 + 2*i + 1));
    93         }
    94         for (unsigned i = 0; i < field_count/4; i++) {
    95             Idxs.push_back(getInt32(field_count/2 + 2*i));
    9696        }
    9797        Value * shufa = CreateShuffleVector(aVec, aVec, ConstantVector::get(Idxs));
Note: See TracChangeset for help on using the changeset viewer.