Skip to content

Commit deb29c8

Browse files
committed
Further simplify extract_vector_elt combine
1 parent c9c5967 commit deb29c8

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

llvm/lib/Target/AMDGPU/SIISelLowering.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14689,12 +14689,8 @@ SITargetLowering::performExtractVectorEltCombine(SDNode *N,
1468914689

1469014690
SDLoc SL(N);
1469114691
SDValue AndMask = DAG.getConstant(0x1f, SL, MVT::i32);
14692-
ConstantSDNode *Index = dyn_cast<ConstantSDNode>(N->getOperand(1));
14693-
uint64_t I = Index->getZExtValue();
14694-
const SDValue Zero = DAG.getConstant(0, SL, MVT::i32);
14695-
const SDValue One = DAG.getConstant(1, SL, MVT::i32);
1469614692
SDValue EVE = DAG.getNode(ISD::EXTRACT_VECTOR_ELT, SL, MVT::i32,
14697-
Vec->getOperand(0), I == 0 ? Zero : One);
14693+
Vec->getOperand(0), N->getOperand(1));
1469814694
SDValue A = DAG.getNode(ISD::AND, SL, MVT::i32, EVE, AndMask);
1469914695
DAG.ReplaceAllUsesWith(N, A.getNode());
1470014696
}

0 commit comments

Comments
 (0)