[llvm] r288138 - Avoid repeated calls to MVT::getScalarSizeInBits(). NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 29 05:43:09 PST 2016
Author: rksimon
Date: Tue Nov 29 07:43:08 2016
New Revision: 288138
URL: http://llvm.org/viewvc/llvm-project?rev=288138&view=rev
Log:
Avoid repeated calls to MVT::getScalarSizeInBits(). NFCI.
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=288138&r1=288137&r2=288138&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Nov 29 07:43:08 2016
@@ -25447,12 +25447,12 @@ static bool matchUnaryVectorShuffle(MVT
const X86Subtarget &Subtarget,
unsigned &Shuffle, MVT &ShuffleVT) {
unsigned NumMaskElts = Mask.size();
+ unsigned MaskEltSize = MaskVT.getScalarSizeInBits();
bool FloatDomain = MaskVT.isFloatingPoint() ||
(!Subtarget.hasAVX2() && MaskVT.is256BitVector());
// Match against a VZEXT_MOVL instruction, SSE1 only supports 32-bits (MOVSS).
- if (((MaskVT.getScalarSizeInBits() == 32) ||
- (MaskVT.getScalarSizeInBits() == 64 && Subtarget.hasSSE2())) &&
+ if (((MaskEltSize == 32) || (MaskEltSize == 64 && Subtarget.hasSSE2())) &&
isUndefOrEqual(Mask[0], 0) &&
isUndefOrZeroInRange(Mask, 1, NumMaskElts - 1)) {
Shuffle = X86ISD::VZEXT_MOVL;
More information about the llvm-commits
mailing list