Skip to content

Commit 5b1cc58

Browse files
committed
[X86] getOnesVector - use getAllOnesConstant helper. NFC.
1 parent a025ef1 commit 5b1cc58

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4441,10 +4441,8 @@ static SDValue concatSubVectors(SDValue V1, SDValue V2, SelectionDAG &DAG,
44414441
static SDValue getOnesVector(EVT VT, SelectionDAG &DAG, const SDLoc &dl) {
44424442
assert((VT.is128BitVector() || VT.is256BitVector() || VT.is512BitVector()) &&
44434443
"Expected a 128/256/512-bit vector type");
4444-
4445-
APInt Ones = APInt::getAllOnes(32);
44464444
unsigned NumElts = VT.getSizeInBits() / 32;
4447-
SDValue Vec = DAG.getConstant(Ones, dl, MVT::getVectorVT(MVT::i32, NumElts));
4445+
SDValue Vec = DAG.getAllOnesConstant(dl, MVT::getVectorVT(MVT::i32, NumElts));
44484446
return DAG.getBitcast(VT, Vec);
44494447
}
44504448

0 commit comments

Comments
 (0)