llvm.org GIT mirror llvm / 2091df3
Don't decode vperm2i128 or vperm2f128 into a shuffle if bit 3 or 7 of the immediate is set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154907 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 8 years ago
2 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
168168
169169 void DecodeVPERM2X128Mask(EVT VT, unsigned Imm,
170170 SmallVectorImpl &ShuffleMask) {
171 if (Imm & 0x88)
172 return; // Not a shuffle
173
171174 unsigned HalfSize = VT.getVectorNumElements()/2;
172175 unsigned FstHalfBegin = (Imm & 0x3) * HalfSize;
173176 unsigned SndHalfBegin = ((Imm >> 4) & 0x3) * HalfSize;
44294429 case X86ISD::VPERM2X128:
44304430 ImmN = N->getOperand(N->getNumOperands()-1);
44314431 DecodeVPERM2X128Mask(VT, cast(ImmN)->getZExtValue(), Mask);
4432 if (Mask.empty()) return false;
44324433 break;
44334434 case X86ISD::MOVDDUP:
44344435 case X86ISD::MOVLHPD: