From 72dbe0cc0e5240838584487791a812107f4c8f3e Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 27 Feb 2017 16:15:27 +0000 Subject: [PATCH] [X86] Fix SmallVector sizes in constant pool shuffle decoding to avoid heap allocation Some of the vectors are under sized to avoid heap allocation. In one case the vector was oversized. Differential Revision: https://reviews.llvm.org/D30387 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296353 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86ShuffleDecodeConstantPool.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp b/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp index 3ce8609267f..df6ddafa717 100644 --- a/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp +++ b/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp @@ -104,7 +104,7 @@ void DecodePSHUFBMask(const Constant *C, SmallVectorImpl &ShuffleMask) { // The shuffle mask requires a byte vector. APInt UndefElts; - SmallVector RawMask; + SmallVector RawMask; if (!extractConstantMask(C, 8, UndefElts, RawMask)) return; @@ -145,7 +145,7 @@ void DecodeVPERMILPMask(const Constant *C, unsigned ElSize, // The shuffle mask requires elements the same size as the target. APInt UndefElts; - SmallVector RawMask; + SmallVector RawMask; if (!extractConstantMask(C, ElSize, UndefElts, RawMask)) return; @@ -231,7 +231,7 @@ void DecodeVPPERMMask(const Constant *C, SmallVectorImpl &ShuffleMask) { // The shuffle mask requires a byte vector. APInt UndefElts; - SmallVector RawMask; + SmallVector RawMask; if (!extractConstantMask(C, 8, UndefElts, RawMask)) return; @@ -286,7 +286,7 @@ void DecodeVPERMVMask(const Constant *C, unsigned ElSize, // The shuffle mask requires elements the same size as the target. APInt UndefElts; - SmallVector RawMask; + SmallVector RawMask; if (!extractConstantMask(C, ElSize, UndefElts, RawMask)) return; @@ -314,7 +314,7 @@ void DecodeVPERMV3Mask(const Constant *C, unsigned ElSize, // The shuffle mask requires elements the same size as the target. APInt UndefElts; - SmallVector RawMask; + SmallVector RawMask; if (!extractConstantMask(C, ElSize, UndefElts, RawMask)) return; -- 2.50.1