[llvm] 5b1cc58 - [X86] getOnesVector - use getAllOnesConstant helper. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 29 09:52:38 PDT 2024
Author: Simon Pilgrim
Date: 2024-04-29T17:50:20+01:00
New Revision: 5b1cc58b3c72f51b8a1ce27e5fba15783d447d7c
URL: https://github.com/llvm/llvm-project/commit/5b1cc58b3c72f51b8a1ce27e5fba15783d447d7c
DIFF: https://github.com/llvm/llvm-project/commit/5b1cc58b3c72f51b8a1ce27e5fba15783d447d7c.diff
LOG: [X86] getOnesVector - use getAllOnesConstant helper. NFC.
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 7862468c3ca847..a811ce43422ec8 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -4441,10 +4441,8 @@ static SDValue concatSubVectors(SDValue V1, SDValue V2, SelectionDAG &DAG,
static SDValue getOnesVector(EVT VT, SelectionDAG &DAG, const SDLoc &dl) {
assert((VT.is128BitVector() || VT.is256BitVector() || VT.is512BitVector()) &&
"Expected a 128/256/512-bit vector type");
-
- APInt Ones = APInt::getAllOnes(32);
unsigned NumElts = VT.getSizeInBits() / 32;
- SDValue Vec = DAG.getConstant(Ones, dl, MVT::getVectorVT(MVT::i32, NumElts));
+ SDValue Vec = DAG.getAllOnesConstant(dl, MVT::getVectorVT(MVT::i32, NumElts));
return DAG.getBitcast(VT, Vec);
}
More information about the llvm-commits
mailing list