[llvm] r321968 - [X86] Remove unneeded code from combineGatherScatter that used to delte SIGN_EXTEND_INREG nodes created during legalization of v2i1/v4i1 masks on KNL.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 7 10:34:08 PST 2018
Author: ctopper
Date: Sun Jan 7 10:34:08 2018
New Revision: 321968
URL: http://llvm.org/viewvc/llvm-project?rev=321968&view=rev
Log:
[X86] Remove unneeded code from combineGatherScatter that used to delte SIGN_EXTEND_INREG nodes created during legalization of v2i1/v4i1 masks on KNL.
v2i1/v4i1 are now legal on KNL so no sign_extend_inreg is generated.
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=321968&r1=321967&r2=321968&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Jan 7 10:34:08 2018
@@ -36479,22 +36479,12 @@ static SDValue combineGatherScatter(SDNo
}
}
- // Gather and Scatter instructions use k-registers for masks. The type of
- // the masks is v*i1. So the mask will be truncated anyway.
- // The SIGN_EXTEND_INREG my be dropped.
- SDValue Mask = N->getOperand(2);
- if (Subtarget.hasAVX512() && Mask.getOpcode() == ISD::SIGN_EXTEND_INREG) {
- SmallVector<SDValue, 5> NewOps(N->op_begin(), N->op_end());
- NewOps[2] = Mask.getOperand(0);
- DAG.UpdateNodeOperands(N, NewOps);
- return SDValue(N, 0);
- }
-
// With AVX2 we only demand the upper bit of the mask.
if (!Subtarget.hasAVX512()) {
const TargetLowering &TLI = DAG.getTargetLoweringInfo();
TargetLowering::TargetLoweringOpt TLO(DAG, !DCI.isBeforeLegalize(),
!DCI.isBeforeLegalizeOps());
+ SDValue Mask = N->getOperand(2);
KnownBits Known;
APInt DemandedMask(APInt::getSignMask(Mask.getScalarValueSizeInBits()));
if (TLI.SimplifyDemandedBits(Mask, DemandedMask, Known, TLO)) {
More information about the llvm-commits
mailing list