This is the correct fix for PR1427. This fixes mmx-shuffle.ll and doesn't

cause other regressions.

llvm-svn: 37160
This commit is contained in:
Chris Lattner 2007-05-17 17:13:13 +00:00
parent 1ad4618715
commit dade607f19
1 changed files with 5 additions and 2 deletions

View File

@ -2675,7 +2675,8 @@ X86TargetLowering::LowerVECTOR_SHUFFLE(SDOperand Op, SelectionDAG &DAG) {
return Op;
}
if (X86::isSHUFPMask(PermMask.Val))
if (X86::isSHUFPMask(PermMask.Val) &&
MVT::getSizeInBits(VT) != 64) // Don't do this for MMX.
return Op;
// Handle v8i16 shuffle high / low shuffle node pair.
@ -2712,7 +2713,9 @@ X86TargetLowering::LowerVECTOR_SHUFFLE(SDOperand Op, SelectionDAG &DAG) {
}
}
if (NumElems == 4) {
if (NumElems == 4 &&
// Don't do this for MMX.
MVT::getSizeInBits(VT) != 64) {
MVT::ValueType MaskVT = PermMask.getValueType();
MVT::ValueType MaskEVT = MVT::getVectorBaseType(MaskVT);
SmallVector<std::pair<int, int>, 8> Locs;