Skip to content

multiply_sat shift arguments are not immediates #70

@kpuatamazon

Description

@kpuatamazon

srai_epi16 expects an immediate shift value, not a variable.
Here's it is called with a variable:

auto low = srai_epi16(multiply<int16_t>(upcasted_a.first, upcasted_b.first), right_shift);
auto hi = srai_epi16(multiply<int16_t>(upcasted_a.second, upcasted_b.second), right_shift);

And the caller is very much using a variable:
for (std::size_t shift = 0; shift <= 2 * 8 * sizeof(Type_); ++shift) {
*output.template as<vec_t>() = kernels::multiply_sat<Type_>(*input1.template as<vec_t>(), *input2.template as<vec_t>(), shift);

I don't know how newer gcc was fixing it (perhaps srav?) but it's breaking gcc 6.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions