diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2017-02-24 15:35:52 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2017-02-24 15:35:52 +0000 |
| commit | 7f6a7c97a7fe34452c74e7f639e6a136947d3e24 (patch) | |
| tree | 9de965bdec8fc7cf79fec492f3222ea6734ab7ad | |
| parent | ec9a8de0e60fdf80da53d8473e04ddad645545a8 (diff) | |
| download | bcm5719-llvm-7f6a7c97a7fe34452c74e7f639e6a136947d3e24.tar.gz bcm5719-llvm-7f6a7c97a7fe34452c74e7f639e6a136947d3e24.zip | |
[X86][SSE] Target shuffle combine can try to combine up to 16 vectors
Noticed while profiling PR32037, the target shuffle ops were being stored in SmallVector<*,8> types but the combiner could store as many as 16 ops at maximum depth (2 per depth).
llvm-svn: 296130
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index fe67d914e14..618d7a8c561 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -5826,7 +5826,7 @@ static bool getFauxShuffleMask(SDValue N, SmallVectorImpl<int> &Mask, static void resolveTargetShuffleInputsAndMask(SmallVectorImpl<SDValue> &Inputs, SmallVectorImpl<int> &Mask) { int MaskWidth = Mask.size(); - SmallVector<SDValue, 8> UsedInputs; + SmallVector<SDValue, 16> UsedInputs; for (int i = 0, e = Inputs.size(); i < e; ++i) { int lo = UsedInputs.size() * MaskWidth; int hi = lo + MaskWidth; @@ -27394,8 +27394,8 @@ static bool combineX86ShufflesConstants(const SmallVectorImpl<SDValue> &Ops, // Extract constant bits from each source op. bool OneUseConstantOp = false; - SmallVector<SmallBitVector, 4> UndefEltsOps(NumOps); - SmallVector<SmallVector<APInt, 8>, 4> RawBitsOps(NumOps); + SmallVector<SmallBitVector, 16> UndefEltsOps(NumOps); + SmallVector<SmallVector<APInt, 16>, 16> RawBitsOps(NumOps); for (unsigned i = 0; i != NumOps; ++i) { SDValue SrcOp = Ops[i]; OneUseConstantOp |= SrcOp.hasOneUse(); @@ -27530,7 +27530,7 @@ static bool combineX86ShufflesRecursively(ArrayRef<SDValue> SrcOps, SDValue Input1 = (OpInputs.size() > 1 ? OpInputs[1] : SDValue()); // Add the inputs to the Ops list, avoiding duplicates. - SmallVector<SDValue, 8> Ops(SrcOps.begin(), SrcOps.end()); + SmallVector<SDValue, 16> Ops(SrcOps.begin(), SrcOps.end()); int InputIdx0 = -1, InputIdx1 = -1; for (int i = 0, e = Ops.size(); i < e; ++i) { @@ -27634,8 +27634,8 @@ static bool combineX86ShufflesRecursively(ArrayRef<SDValue> SrcOps, HasVariableMask |= isTargetShuffleVariableMask(Op.getOpcode()); // Update the list of shuffle nodes that have been combined so far. - SmallVector<const SDNode *, 8> CombinedNodes(SrcNodes.begin(), - SrcNodes.end()); + SmallVector<const SDNode *, 16> CombinedNodes(SrcNodes.begin(), + SrcNodes.end()); CombinedNodes.push_back(Op.getNode()); // See if we can recurse into each shuffle source op (if it's a target |

