[PATCH] D18492: [X86][SSE] Vectorize a bit (AND/XOR/OR) op if a BUILD_VECTOR has the same op for all their scalar elements.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 26 12:15:35 PDT 2016
RKSimon created this revision.
RKSimon added reviewers: chandlerc, delena, andreadb, spatel.
RKSimon added a subscriber: llvm-commits.
RKSimon set the repository for this revision to rL LLVM.
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 probably 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 35523 bytes
Desc: not available
More information about the llvm-commits