HomePhabricator

[X86][SSE] Optimize llvm.experimental.vector.reduce.xor.vXi1 parity reduction…

Authored by RKSimon on Apr 28 2019, 3:46 AM.

Description

[X86][SSE] Optimize llvm.experimental.vector.reduce.xor.vXi1 parity reduction (PR38840)

An xor reduction of a bool vector can be optimized to a parity check of the MOVMSK/BITCAST'd integer - if the population count is odd return 1, else return 0.

Differential Revision: https://reviews.llvm.org/D61230

llvm-svn: 359396