https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56253

--- Comment #14 from Marc Glisse <glisse at gcc dot gnu.org> ---
(In reply to Agner Fog from comment #13)
> Is it possible to do the same optimization with boolean vector intrinsics,
> such as _mm_and_epi32 and _mm_or_ps to enable optimizations such as
> algebraic reduction and constant propagation?

Anything we already do with vector extensions should be easy, and that includes
constant propagation in & and |. The sightly harder part is transformations
that are only valid if v is a "bool vector" (like replacing v!=0 with just v),
i.e. each component is either 0 or -1. We can test constants, we know the
result of comparisons is boolean, we know &, | and ^ preserve that property,
but it isn't a purely local property so it requires a bit more work.

Reply via email to