Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiply_sat shift arguments are not immediates #70

Open
kpuatamazon opened this issue Mar 5, 2020 · 0 comments
Open

multiply_sat shift arguments are not immediates #70

kpuatamazon opened this issue Mar 5, 2020 · 0 comments

Comments

@kpuatamazon
Copy link
Contributor

kpuatamazon commented Mar 5, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant