Skip to content

Commit 04a09b9

Browse files
committed
[X86] Use isNullConstantOrUndef helper. NFC.
1 parent e286ecf commit 04a09b9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7330,9 +7330,8 @@ static SDValue lowerBuildVectorAsBroadcast(BuildVectorSDNode *BVOp,
73307330
unsigned SeqLen = Sequence.size();
73317331
bool UpperZeroOrUndef =
73327332
SeqLen == 1 ||
7333-
llvm::all_of(ArrayRef(Sequence).drop_front(), [](SDValue V) {
7334-
return !V || V.isUndef() || isNullConstant(V);
7335-
});
7333+
llvm::all_of(ArrayRef(Sequence).drop_front(),
7334+
[](SDValue V) { return !V || isNullConstantOrUndef(V); });
73367335
SDValue Op0 = Sequence[0];
73377336
if (UpperZeroOrUndef && ((Op0.getOpcode() == ISD::BITCAST) ||
73387337
(Op0.getOpcode() == ISD::ZERO_EXTEND &&
@@ -43741,7 +43740,7 @@ static SDValue combineBitcast(SDNode *N, SelectionDAG &DAG,
4374143740
for (unsigned i = 1, e = SrcVT.getVectorNumElements(); i != e; ++i) {
4374243741
SDValue Op = N0.getOperand(i);
4374343742
LowUndef &= Op.isUndef() || (i >= e/2);
43744-
AllUndefOrZero &= (Op.isUndef() || isNullConstant(Op));
43743+
AllUndefOrZero &= isNullConstantOrUndef(Op);
4374543744
}
4374643745
if (AllUndefOrZero) {
4374743746
SDValue N00 = N0.getOperand(0);

0 commit comments

Comments
 (0)