[llvm] r320928 - [X86] Don't pass a zero input to the passthru operand of getVectorMaskingNode/getScalarMaskingNode when its going to emit an ISD::OR/ISD::AND. NFCI
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 16 13:12:24 PST 2017
Author: ctopper
Date: Sat Dec 16 13:12:24 2017
New Revision: 320928
URL: http://llvm.org/viewvc/llvm-project?rev=320928&view=rev
Log:
[X86] Don't pass a zero input to the passthru operand of getVectorMaskingNode/getScalarMaskingNode when its going to emit an ISD::OR/ISD::AND. NFCI
In those cases, the pass thru operand of the methods isn't used. The calls to the scalar version were passing a MVT::i1 zero, which is an illegal type at the stage this code runs.
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=320928&r1=320927&r2=320928&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sat Dec 16 13:12:24 2017
@@ -20156,9 +20156,8 @@ SDValue X86TargetLowering::LowerINTRINSI
MVT BitcastVT = MVT::getVectorVT(MVT::i1,
Mask.getSimpleValueType().getSizeInBits());
SDValue FPclass = DAG.getNode(IntrData->Opc0, dl, MaskVT, Src1, Imm);
- SDValue FPclassMask = getVectorMaskingNode(FPclass, Mask,
- DAG.getConstant(0, dl, MaskVT),
- Subtarget, DAG);
+ SDValue FPclassMask = getVectorMaskingNode(FPclass, Mask, SDValue(),
+ Subtarget, DAG);
SDValue Res = DAG.getNode(ISD::INSERT_SUBVECTOR, dl, BitcastVT,
DAG.getUNDEF(BitcastVT), FPclassMask,
DAG.getIntPtrConstant(0, dl));
@@ -20169,8 +20168,8 @@ SDValue X86TargetLowering::LowerINTRINSI
SDValue Imm = Op.getOperand(2);
SDValue Mask = Op.getOperand(3);
SDValue FPclass = DAG.getNode(IntrData->Opc0, dl, MVT::v1i1, Src1, Imm);
- SDValue FPclassMask = getScalarMaskingNode(FPclass, Mask,
- DAG.getConstant(0, dl, MVT::i1), Subtarget, DAG);
+ SDValue FPclassMask = getScalarMaskingNode(FPclass, Mask, SDValue(),
+ Subtarget, DAG);
return DAG.getNode(X86ISD::VEXTRACT, dl, MVT::i8, FPclassMask,
DAG.getIntPtrConstant(0, dl));
}
@@ -20213,8 +20212,7 @@ SDValue X86TargetLowering::LowerINTRINSI
Cmp = DAG.getNode(IntrData->Opc0, dl, MaskVT, Op.getOperand(1),
Op.getOperand(2));
}
- SDValue CmpMask = getVectorMaskingNode(Cmp, Mask,
- DAG.getConstant(0, dl, MaskVT),
+ SDValue CmpMask = getVectorMaskingNode(Cmp, Mask, SDValue(),
Subtarget, DAG);
SDValue Res = DAG.getNode(ISD::INSERT_SUBVECTOR, dl, BitcastVT,
DAG.getUNDEF(BitcastVT), CmpMask,
@@ -20237,8 +20235,7 @@ SDValue X86TargetLowering::LowerINTRINSI
if(!Cmp.getNode())
Cmp = DAG.getNode(IntrData->Opc0, dl, MVT::v1i1, Src1, Src2, CC);
- SDValue CmpMask = getScalarMaskingNode(Cmp, Mask,
- DAG.getConstant(0, dl, MVT::i1),
+ SDValue CmpMask = getScalarMaskingNode(Cmp, Mask, SDValue(),
Subtarget, DAG);
return DAG.getNode(X86ISD::VEXTRACT, dl, MVT::i8, CmpMask,
DAG.getIntPtrConstant(0, dl));
More information about the llvm-commits
mailing list