Skip to content

Commit c99e4ba

Browse files
committed
Fix imm constant
1 parent 35e135e commit c99e4ba

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

include/xsimd/arch/xsimd_avx.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,16 +1674,15 @@ namespace xsimd
16741674
{
16751675
return _mm256_permute_pd(self, imm);
16761676
}
1677-
constexpr auto lane_mask = mask % make_batch_constant<uint64_t, (mask.size / 2), A>();
16781677
XSIMD_IF_CONSTEXPR(detail::is_only_from_lo(mask))
16791678
{
16801679
__m256d broadcast = _mm256_permute2f128_pd(self, self, 0x00); // [low | low]
1681-
return _mm256_permute_pd(broadcast, lane_mask.as_batch());
1680+
return _mm256_permute_pd(broadcast, imm);
16821681
}
16831682
XSIMD_IF_CONSTEXPR(detail::is_only_from_hi(mask))
16841683
{
16851684
__m256d broadcast = _mm256_permute2f128_pd(self, self, 0x11); // [high | high]
1686-
return _mm256_permute_pd(broadcast, lane_mask.as_batch());
1685+
return _mm256_permute_pd(broadcast, imm);
16871686
}
16881687

16891688
// Fallback to general algorithm. This is the same as the dynamic version with the exception

0 commit comments

Comments
 (0)