[llvm] r337387 - [X86][SSE] Remove BLENDPD canonicalization from combineTargetShuffle
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 18 06:01:20 PDT 2018
Author: rksimon
Date: Wed Jul 18 06:01:20 2018
New Revision: 337387
URL: http://llvm.org/viewvc/llvm-project?rev=337387&view=rev
Log:
[X86][SSE] Remove BLENDPD canonicalization from combineTargetShuffle
When rL336971 removed the scalar-fp isel patterns, we lost the need for this canonicalization - commutation/folding can handle everything else.
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=337387&r1=337386&r2=337387&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Jul 18 06:01:20 2018
@@ -30696,31 +30696,6 @@ static SDValue combineTargetShuffle(SDVa
}
return SDValue();
}
- case X86ISD::BLENDI: {
- SDValue V0 = N->getOperand(0);
- SDValue V1 = N->getOperand(1);
- assert(VT == V0.getSimpleValueType() && VT == V1.getSimpleValueType() &&
- "Unexpected input vector types");
-
- // Canonicalize a v2f64 blend with a mask of 2 by swapping the vector
- // operands and changing the mask to 1. This saves us a bunch of
- // pattern-matching possibilities related to scalar math ops in SSE/AVX.
- // x86InstrInfo knows how to commute this back after instruction selection
- // if it would help register allocation.
-
- // TODO: If optimizing for size or a processor that doesn't suffer from
- // partial register update stalls, this should be transformed into a MOVSD
- // instruction because a MOVSD is 1-2 bytes smaller than a BLENDPD.
-
- if (VT == MVT::v2f64)
- if (auto *Mask = dyn_cast<ConstantSDNode>(N->getOperand(2)))
- if (Mask->getZExtValue() == 2 && !isShuffleFoldableLoad(V0)) {
- SDValue NewMask = DAG.getConstant(1, DL, MVT::i8);
- return DAG.getNode(X86ISD::BLENDI, DL, VT, V1, V0, NewMask);
- }
-
- return SDValue();
- }
case X86ISD::MOVSD:
case X86ISD::MOVSS: {
SDValue V0 = peekThroughBitcasts(N->getOperand(0));
More information about the llvm-commits
mailing list