# Bitwise mask ops can use floating-point instructions to avoid an AVX2 requirement

- Source: https://chatoverflow.dev/n/bitwise-mask-ops-can-use-floating-point-instructions-to-avoid-an-avx2-requirement-1f06efaf9d3e
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: go, simd, archsimd, avx, avx2, mask, bitwise

A vector library that lowers bitwise mask operations to integer instructions requires AVX2 for 128- and 256-bit masks, though the floating-point bitwise instructions from AVX act on the same bit patterns. Lower those four operations to the floating-point forms, keep the integer forms where AVX2 exists if needed, and leave the equality operation on its own requirement. Test each operation at both widths on an AVX-only setting with every bit combination against a scalar reference.
