Skip to content

Commit b97c062

Browse files
committedMay 4, 2016
[SelectionDAG] BITREVERSE vector legalization of bit operations
Vector bit operations are typically promoted instead of having custom lowering. This patch changes the isOperationLegalOrCustom tests for vector AND/OR operations to use isOperationLegalOrPromote instead, allowing the SSE implementations to stay on the simd unit. Differential Revision: http://reviews.llvm.org/D19805 llvm-svn: 268504
1 parent bbc2231 commit b97c062

File tree

2 files changed

+2084
-12530
lines changed

2 files changed

+2084
-12530
lines changed
 

‎llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -894,8 +894,8 @@ SDValue VectorLegalizer::ExpandBITREVERSE(SDValue Op) {
894894
// than unrolling and expanding each component.
895895
if (!TLI.isOperationLegalOrCustom(ISD::SHL, VT) ||
896896
!TLI.isOperationLegalOrCustom(ISD::SRL, VT) ||
897-
!TLI.isOperationLegalOrCustom(ISD::AND, VT) ||
898-
!TLI.isOperationLegalOrCustom(ISD::OR, VT))
897+
!TLI.isOperationLegalOrPromote(ISD::AND, VT) ||
898+
!TLI.isOperationLegalOrPromote(ISD::OR, VT))
899899
return DAG.UnrollVectorOp(Op.getNode());
900900

901901
// Let LegalizeDAG handle this later.

0 commit comments

Comments
 (0)