[X86] Use llvm::isOneConstant (NFC)
This commit is contained in:
parent
823ddba1b3
commit
1fe6a8a584
|
@ -56700,11 +56700,9 @@ static SDValue combineScalarToVector(SDNode *N, SelectionDAG &DAG) {
|
||||||
// This occurs frequently in our masked scalar intrinsic code and our
|
// This occurs frequently in our masked scalar intrinsic code and our
|
||||||
// floating point select lowering with AVX512.
|
// floating point select lowering with AVX512.
|
||||||
// TODO: SimplifyDemandedBits instead?
|
// TODO: SimplifyDemandedBits instead?
|
||||||
if (VT == MVT::v1i1 && Src.getOpcode() == ISD::AND && Src.hasOneUse())
|
if (VT == MVT::v1i1 && Src.getOpcode() == ISD::AND && Src.hasOneUse() &&
|
||||||
if (auto *C = dyn_cast<ConstantSDNode>(Src.getOperand(1)))
|
isOneConstant(Src.getOperand(1)))
|
||||||
if (C->getAPIntValue().isOne())
|
return DAG.getNode(ISD::SCALAR_TO_VECTOR, DL, MVT::v1i1, Src.getOperand(0));
|
||||||
return DAG.getNode(ISD::SCALAR_TO_VECTOR, DL, MVT::v1i1,
|
|
||||||
Src.getOperand(0));
|
|
||||||
|
|
||||||
// Combine scalar_to_vector of an extract_vector_elt into an extract_subvec.
|
// Combine scalar_to_vector of an extract_vector_elt into an extract_subvec.
|
||||||
if (VT == MVT::v1i1 && Src.getOpcode() == ISD::EXTRACT_VECTOR_ELT &&
|
if (VT == MVT::v1i1 && Src.getOpcode() == ISD::EXTRACT_VECTOR_ELT &&
|
||||||
|
|
Loading…
Reference in New Issue
Block a user