diff --git a/include/xvec/x86/permute.hpp b/include/xvec/x86/permute.hpp index ba13735..4af0046 100644 --- a/include/xvec/x86/permute.hpp +++ b/include/xvec/x86/permute.hpp @@ -89,7 +89,7 @@ inline auto permute_x86_register(x86_avx2_tag, const basic_vec<_Tp, _AbiT>& v, c // same size. There is no advantage to using 128-bit permute instructions. const auto _rv = permute::size()>(v, perm_uninitResize); - auto impl = [_rv](_ImplT i) -> _ImplT { + auto impl = [_rv](_ImplT i) { auto block = permute::size>(i, perm_uninitResize); // Bump to whole register auto r = [=]{ diff --git a/test/TestSimdPermute.cpp b/test/TestSimdPermute.cpp index f02f257..5556613 100644 --- a/test/TestSimdPermute.cpp +++ b/test/TestSimdPermute.cpp @@ -159,7 +159,8 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(BySmallIndex, TypeParam, PermuteTestTypes) { using UnsignedIndexSimd = xvec::simd::vec; const auto unsignedIndexes = GetRandomVector(TypeParam::size() - 1); - const auto signedIndexes = xvec::rebind_cast(unsignedIndexes); + const auto signedIndexes1 = xvec::rebind_cast(unsignedIndexes); + const auto signedIndexes2 = xvec::rebind_cast(unsignedIndexes); std::array expected{}; for (std::size_t i = 0; i < expected.size(); ++i) @@ -168,13 +169,13 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(BySmallIndex, TypeParam, PermuteTestTypes) const auto computedOptionUnsignedA = permute(f.v0, unsignedIndexes); BOOST_TEST(to_array(computedOptionUnsignedA) == expected, boost::test_tools::per_element()); - const auto computedOptionSignedA = permute(f.v0, signedIndexes); + const auto computedOptionSignedA = permute(f.v0, signedIndexes1); BOOST_TEST(to_array(computedOptionSignedA) == expected, boost::test_tools::per_element()); const auto computedOptionUnsignedB = f.v0[unsignedIndexes]; BOOST_TEST(to_array(computedOptionUnsignedB) == expected, boost::test_tools::per_element()); - const auto computedOptionSignedB = f.v0[signedIndexes]; + const auto computedOptionSignedB = f.v0[signedIndexes2]; BOOST_TEST(to_array(computedOptionSignedB) == expected, boost::test_tools::per_element()); #if defined(_XVEC_HAS_CONSTEXPR)