[llvm] r313311 - [X86] Remove an unnecessary SmallVector from LowerBUILD_VECTOR.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 14 15:47:59 PDT 2017
Author: ctopper
Date: Thu Sep 14 15:47:59 2017
New Revision: 313311
URL: http://llvm.org/viewvc/llvm-project?rev=313311&view=rev
Log:
[X86] Remove an unnecessary SmallVector from LowerBUILD_VECTOR.
I think this may have existed to convert from SDUse to SDValue, but it doesn't look like its needed now.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=313311&r1=313310&r2=313311&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Thu Sep 14 15:47:59 2017
@@ -7814,15 +7814,13 @@ X86TargetLowering::LowerBUILD_VECTOR(SDV
// For AVX-length vectors, build the individual 128-bit pieces and use
// shuffles to put them in place.
if (VT.is256BitVector() || VT.is512BitVector()) {
- SmallVector<SDValue, 64> Ops(Op->op_begin(), Op->op_begin() + NumElems);
-
EVT HVT = EVT::getVectorVT(*DAG.getContext(), ExtVT, NumElems/2);
// Build both the lower and upper subvector.
SDValue Lower =
- DAG.getBuildVector(HVT, dl, makeArrayRef(&Ops[0], NumElems / 2));
+ DAG.getBuildVector(HVT, dl, Op->ops().slice(0, NumElems / 2));
SDValue Upper = DAG.getBuildVector(
- HVT, dl, makeArrayRef(&Ops[NumElems / 2], NumElems / 2));
+ HVT, dl, Op->ops().slice(NumElems / 2, NumElems /2));
// Recreate the wider vector with the lower and upper part.
if (VT.is256BitVector())
More information about the llvm-commits
mailing list