Skip to content

Commit 431975b

Browse files
committed
[X86] LowerShift - directly initialize SmallVector with build vector operands. NFC.
Don't push_back the operands separately.
1 parent 3c661cf commit 431975b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30125,11 +30125,7 @@ static SDValue LowerShift(SDValue Op, const X86Subtarget &Subtarget,
3012530125
// element to the other.
3012630126
// This optimized lowering is only valid if the elements in a pair can
3012730127
// be treated identically.
30128-
SmallVector<SDValue, 32> AmtWideElts;
30129-
AmtWideElts.reserve(NumElts);
30130-
for (unsigned I = 0; I != NumElts; ++I) {
30131-
AmtWideElts.push_back(Amt.getOperand(I));
30132-
}
30128+
SmallVector<SDValue, 32> AmtWideElts(Amt->op_begin(), Amt->op_end());
3013330129
SmallVector<SDValue, 32> TmpAmtWideElts;
3013430130
int WideEltSizeInBits = EltSizeInBits;
3013530131
while (WideEltSizeInBits < 32) {

0 commit comments

Comments
 (0)