From: Bruno Cardoso Lopes Date: Thu, 25 Aug 2011 21:40:34 +0000 (+0000) Subject: Make isMOVDDUP mask check more strict and update comments! X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=06ef923d1491b056555ebcb5cb276f8acd322187;p=oota-llvm.git Make isMOVDDUP mask check more strict and update comments! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138587 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index eedb1ff7141..80f3e943b54 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -3914,10 +3914,15 @@ bool X86::isMOVSLDUPMask(ShuffleVectorSDNode *N, } /// isMOVDDUPMask - Return true if the specified VECTOR_SHUFFLE operand -/// specifies a shuffle of elements that is suitable for input to MOVDDUP. +/// specifies a shuffle of elements that is suitable for input to 128-bit +/// version of MOVDDUP. bool X86::isMOVDDUPMask(ShuffleVectorSDNode *N) { - int e = N->getValueType(0).getVectorNumElements() / 2; + EVT VT = N->getValueType(0); + + if (VT.getSizeInBits() != 128) + return false; + int e = VT.getVectorNumElements() / 2; for (int i = 0; i < e; ++i) if (!isUndefOrEqual(N->getMaskElt(i), i)) return false;