decouple MMX check from regular splat checks. Some refactoring is coming, and MMX should be left alone to be easily removed after moving to intrinsics

llvm-svn: 113247
This commit is contained in:
Bruno Cardoso Lopes 2010-09-07 18:41:45 +00:00
parent 8499f47ef4
commit 5a45db3e6c
1 changed files with 8 additions and 4 deletions

View File

@ -5271,12 +5271,16 @@ X86TargetLowering::LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const {
if (isZeroShuffle(SVOp))
return getZeroVector(VT, Subtarget->hasSSE2(), DAG, dl);
// Promote splats to v4f32.
if (SVOp->isSplat()) {
if (isMMX)
// FIXME: this is somehow handled during isel by MMX pattern fragments. Remove
// the check or come up with another solution when all MMX move to intrinsics,
// but don't allow this to be considered legal, we don't want vector_shuffle
// operations to be matched during isel anymore.
if (isMMX && SVOp->isSplat())
return Op;
// Promote splats to v4f32.
if (SVOp->isSplat())
return PromoteSplat(SVOp, DAG);
}
// If the shuffle can be profitably rewritten as a narrower shuffle, then
// do it!