Commit 574e4b28 authored by Simon Pilgrim's avatar Simon Pilgrim
Browse files

[X86][SSE] Vectorize a bit (AND/XOR/OR) op if a BUILD_VECTOR has the same op...

[X86][SSE] Vectorize a bit (AND/XOR/OR) op if a BUILD_VECTOR has the same op for all their scalar elements.

If all a BUILD_VECTOR's source elements are the same bit (AND/XOR/OR) operation type and each has one constant operand, lower to a pair of BUILD_VECTOR and just apply the bit operation to the vectors.

The constant operands will form a constant vector meaning that we still only have a single BUILD_VECTOR to lower and we will have replaced all the scalarized operations with a single SSE equivalent.

Its not in our interest to start make a general purpose vectorizer from this, but I'm seeing enough of these scalar bit operations from the later legalization/scalarization stages to support them at least.

Differential Revision: http://reviews.llvm.org/D18492

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264666 91177308-0d34-0410-b5e6-96231b3b80d8
parent 51d98d36
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment