mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
[AVX512] Removed special case for cmp instructions in getVectorMaskingNode. Now cmp intrinsics lower as other intrinsics through VSELECT, and then VSELECT tranforms to AND in PerformSELECTCombine.
No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220779 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
edf556ec1f
commit
d4345dd85f
@ -16158,8 +16158,7 @@ static SDValue getTargetVShiftNode(unsigned Opc, SDLoc dl, MVT VT,
|
||||
return DAG.getNode(Opc, dl, VT, SrcOp, ShAmt);
|
||||
}
|
||||
|
||||
/// \brief Return (and \p Op, \p Mask) for compare instructions or
|
||||
/// (vselect \p Mask, \p Op, \p PreservedSrc) for others along with the
|
||||
/// \brief Return (vselect \p Mask, \p Op, \p PreservedSrc) along with the
|
||||
/// necessary casting for \p Mask when lowering masking intrinsics.
|
||||
static SDValue getVectorMaskingNode(SDValue Op, SDValue Mask,
|
||||
SDValue PreservedSrc, SelectionDAG &DAG) {
|
||||
@ -16180,16 +16179,6 @@ static SDValue getVectorMaskingNode(SDValue Op, SDValue Mask,
|
||||
SDValue VMask = DAG.getNode(ISD::EXTRACT_SUBVECTOR, dl, MaskVT,
|
||||
DAG.getNode(ISD::BITCAST, dl, BitcastVT, Mask),
|
||||
DAG.getIntPtrConstant(0));
|
||||
|
||||
switch (Op.getOpcode()) {
|
||||
default: break;
|
||||
case X86ISD::PCMPEQM:
|
||||
case X86ISD::PCMPGTM:
|
||||
case X86ISD::CMPM:
|
||||
case X86ISD::CMPMU:
|
||||
return DAG.getNode(ISD::AND, dl, VT, Op, VMask);
|
||||
}
|
||||
|
||||
return DAG.getNode(ISD::VSELECT, dl, VT, VMask, Op, PreservedSrc);
|
||||
}
|
||||
|
||||
@ -16264,9 +16253,9 @@ static SDValue LowerINTRINSIC_WO_CHAIN(SDValue Op, SelectionDAG &DAG) {
|
||||
// (v2i64 %a), (v2i64 %b), (i8 %mask))) ->
|
||||
// (i8 (bitcast
|
||||
// (v8i1 (insert_subvector undef,
|
||||
// (v2i1 (and (PCMPEQM %a, %b),
|
||||
// (extract_subvector
|
||||
// (v8i1 (bitcast %mask)), 0))), 0))))
|
||||
// (v2i1 (vselect (extract_subvector
|
||||
// (v8i1 (bitcast %mask)), 0),
|
||||
// (PCMPEQM %a, %b), 0))))))
|
||||
EVT VT = Op.getOperand(1).getValueType();
|
||||
EVT MaskVT = EVT::getVectorVT(*DAG.getContext(), MVT::i1,
|
||||
VT.getVectorNumElements());
|
||||
|
Loading…
Reference in New Issue
Block a user