Lines Matching refs:getOperand
929 RootMaskOp = Root->getOperand(*RootMaskPos); in VPMatchContext()
933 RootVectorLenOp = Root->getOperand(*RootVLenPos); in VPMatchContext()
950 SDValue MaskOp = OpVal.getOperand(*MaskPos); in match()
958 if (RootVectorLenOp != OpVal.getOperand(*VLenPos)) in match()
1098 LHS = N.getOperand(0); in isSetCCEquivalent()
1099 RHS = N.getOperand(1); in isSetCCEquivalent()
1100 CC = N.getOperand(2); in isSetCCEquivalent()
1107 LHS = N.getOperand(1); in isSetCCEquivalent()
1108 RHS = N.getOperand(2); in isSetCCEquivalent()
1109 CC = N.getOperand(3); in isSetCCEquivalent()
1113 if (N.getOpcode() != ISD::SELECT_CC || !TLI.isConstTrueVal(N.getOperand(2)) || in isSetCCEquivalent()
1114 !TLI.isConstFalseVal(N.getOperand(3))) in isSetCCEquivalent()
1121 LHS = N.getOperand(0); in isSetCCEquivalent()
1122 RHS = N.getOperand(1); in isSetCCEquivalent()
1123 CC = N.getOperand(4); in isSetCCEquivalent()
1196 (LD->getOperand(2).getOpcode() != ISD::TargetConstant || in canSplitIdx()
1197 !cast<ConstantSDNode>(LD->getOperand(2))->isOpaque()); in canSplitIdx()
1225 if (auto *C1 = dyn_cast<ConstantSDNode>(N0.getOperand(1))) { in reassociationCanBreakAddressingModePattern()
1256 if (auto *GA = dyn_cast<GlobalAddressSDNode>(N0.getOperand(1))) in reassociationCanBreakAddressingModePattern()
1292 SDValue N00 = N0.getOperand(0); in reassociateOpsCommutative()
1293 SDValue N01 = N0.getOperand(1); in reassociateOpsCommutative()
1363 ISD::CondCode CC1 = cast<CondCodeSDNode>(N1.getOperand(2))->get(); in reassociateOpsCommutative()
1364 ISD::CondCode CC00 = cast<CondCodeSDNode>(N00.getOperand(2))->get(); in reassociateOpsCommutative()
1365 ISD::CondCode CC01 = cast<CondCodeSDNode>(N01.getOperand(2))->get(); in reassociateOpsCommutative()
1406 N0.getOperand(0).getValueType() == N1.getOperand(0).getValueType() && in reassociateReduction()
1408 TLI.isOperationLegalOrCustom(Opc, N0.getOperand(0).getValueType()) && in reassociateReduction()
1409 TLI.shouldReassociateReduction(RedOpc, N0.getOperand(0).getValueType())) { in reassociateReduction()
1412 DAG.getNode(Opc, DL, N0.getOperand(0).getValueType(), in reassociateReduction()
1413 N0.getOperand(0), N1.getOperand(0))); in reassociateReduction()
1535 if (SDValue Op0 = SExtPromoteOperand(Op.getOperand(0), PVT)) in PromoteOperand()
1536 return DAG.getNode(ISD::AssertSext, DL, PVT, Op0, Op.getOperand(1)); in PromoteOperand()
1539 if (SDValue Op0 = ZExtPromoteOperand(Op.getOperand(0), PVT)) in PromoteOperand()
1540 return DAG.getNode(ISD::AssertZext, DL, PVT, Op0, Op.getOperand(1)); in PromoteOperand()
1611 SDValue N0 = Op.getOperand(0); in PromoteIntBinOp()
1615 SDValue N1 = Op.getOperand(1); in PromoteIntBinOp()
1679 SDValue N0 = Op.getOperand(0); in PromoteIntShiftOp()
1691 SDValue N1 = Op.getOperand(1); in PromoteIntShiftOp()
1696 ReplaceLoadWithPromotedLoad(Op.getOperand(0).getNode(), N0.getNode()); in PromoteIntShiftOp()
1728 return DAG.getNode(Op.getOpcode(), SDLoc(Op), VT, Op.getOperand(0)); in PromoteExtend()
2138 SDValue N0 = N->getOperand(0); in combine()
2139 SDValue N1 = N->getOperand(1); in combine()
2158 if (N->getOperand(0).getValueType() == MVT::Other) in getInputChainForNode()
2159 return N->getOperand(0); in getInputChainForNode()
2160 if (N->getOperand(NumOps-1).getValueType() == MVT::Other) in getInputChainForNode()
2161 return N->getOperand(NumOps-1); in getInputChainForNode()
2163 if (N->getOperand(i).getValueType() == MVT::Other) in getInputChainForNode()
2164 return N->getOperand(i); in getInputChainForNode()
2173 if (getInputChainForNode(N->getOperand(0).getNode()) == N->getOperand(1)) in visitTokenFactor()
2174 return N->getOperand(0); in visitTokenFactor()
2175 if (getInputChainForNode(N->getOperand(1).getNode()) == N->getOperand(0)) in visitTokenFactor()
2176 return N->getOperand(1); in visitTokenFactor()
2321 AddToWorklist(i, CurNode->getOperand(0).getNode(), CurOpNumber); in visitTokenFactor()
2370 Ops.push_back(N->getOperand(i)); in visitMERGE_VALUES()
2391 Op = N->getOperand(0); in isTruncateOf()
2398 cast<CondCodeSDNode>(N.getOperand(2))->get() != ISD::SETNE) in isTruncateOf()
2401 SDValue Op0 = N->getOperand(0); in isTruncateOf()
2402 SDValue Op1 = N->getOperand(1); in isTruncateOf()
2451 ConstantSDNode *Offset = dyn_cast<ConstantSDNode>(N->getOperand(1)); in canFoldInAddressingMode()
2460 ConstantSDNode *Offset = dyn_cast<ConstantSDNode>(N->getOperand(1)); in canFoldInAddressingMode()
2483 SDValue N0 = N->getOperand(0); in foldSelectWithIdentityConstant()
2484 SDValue N1 = N->getOperand(1); in foldSelectWithIdentityConstant()
2499 SDValue Cond = N1.getOperand(0); in foldSelectWithIdentityConstant()
2500 SDValue TVal = N1.getOperand(1); in foldSelectWithIdentityConstant()
2501 SDValue FVal = N1.getOperand(2); in foldSelectWithIdentityConstant()
2541 SDValue Sel = BO->getOperand(0); in foldBinOpIntoSelect()
2544 Sel = BO->getOperand(1); in foldBinOpIntoSelect()
2561 SDValue CT = Sel.getOperand(1); in foldBinOpIntoSelect()
2566 SDValue CF = Sel.getOperand(2); in foldBinOpIntoSelect()
2581 SDValue CBO = BO->getOperand(SelOpNo ^ 1); in foldBinOpIntoSelect()
2619 SDValue SelectOp = DAG.getSelect(DL, VT, Sel.getOperand(0), NewCT, NewCF); in foldBinOpIntoSelect()
2632 SDValue C = IsAdd ? N->getOperand(1) : N->getOperand(0); in foldAddSubBoolOfMaskedVal()
2633 SDValue Z = IsAdd ? N->getOperand(0) : N->getOperand(1); in foldAddSubBoolOfMaskedVal()
2639 if (Z.getOperand(0).getOpcode() != ISD::SETCC || in foldAddSubBoolOfMaskedVal()
2640 Z.getOperand(0).getValueType() != MVT::i1) in foldAddSubBoolOfMaskedVal()
2644 SDValue SetCC = Z.getOperand(0); in foldAddSubBoolOfMaskedVal()
2645 ISD::CondCode CC = cast<CondCodeSDNode>(SetCC->getOperand(2))->get(); in foldAddSubBoolOfMaskedVal()
2646 if (CC != ISD::SETEQ || !isNullConstant(SetCC.getOperand(1)) || in foldAddSubBoolOfMaskedVal()
2647 SetCC.getOperand(0).getOpcode() != ISD::AND || in foldAddSubBoolOfMaskedVal()
2648 !isOneConstant(SetCC.getOperand(0).getOperand(1))) in foldAddSubBoolOfMaskedVal()
2657 SDValue LowBit = DAG.getZExtOrTrunc(SetCC.getOperand(0), DL, VT); in foldAddSubBoolOfMaskedVal()
2672 SDValue ConstantOp = IsAdd ? N->getOperand(1) : N->getOperand(0); in foldAddSubOfSignBit()
2673 SDValue ShiftOp = IsAdd ? N->getOperand(0) : N->getOperand(1); in foldAddSubOfSignBit()
2679 SDValue Not = ShiftOp.getOperand(0); in foldAddSubOfSignBit()
2685 SDValue ShAmt = ShiftOp.getOperand(1); in foldAddSubOfSignBit()
2698 Not.getOperand(0), ShAmt); in foldAddSubOfSignBit()
2707 return (isBitwiseNot(Op0) && Op0.getOperand(0) == Op1) || in areBitwiseNotOfEachother()
2708 (isBitwiseNot(Op1) && Op1.getOperand(0) == Op0); in areBitwiseNotOfEachother()
2715 SDValue N0 = N->getOperand(0); in visitADDLike()
2716 SDValue N1 = N->getOperand(1); in visitADDLike()
2754 SDValue N00 = N0.getOperand(0); in visitADDLike()
2755 SDValue N01 = N0.getOperand(1); in visitADDLike()
2759 return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), Sub); in visitADDLike()
2763 return DAG.getNode(ISD::SUB, DL, VT, Add, N0.getOperand(1)); in visitADDLike()
2772 SDValue X = N0.getOperand(0); in visitADDLike()
2787 SDValue N01 = N0.getOperand(1); in visitADDLike()
2789 return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), Add); in visitADDLike()
2808 isConstantOrConstantVector(N0.getOperand(1), /* NoOpaque */ true)) { in visitADDLike()
2814 isMinSignedConstant(N0.getOperand(1)); in visitADDLike()
2818 DAG.getNode(ISD::ADD, DL, VT, N1, N0.getOperand(0)), in visitADDLike()
2819 N0.getOperand(1)); in visitADDLike()
2834 if (N0.getOpcode() == ISD::SUB && isNullOrNullSplat(N0.getOperand(0))) in visitADDLike()
2835 return DAG.getNode(ISD::SUB, DL, VT, N1, N0.getOperand(1)); in visitADDLike()
2838 if (N1.getOpcode() == ISD::SUB && isNullOrNullSplat(N1.getOperand(0))) in visitADDLike()
2839 return DAG.getNode(ISD::SUB, DL, VT, N0, N1.getOperand(1)); in visitADDLike()
2842 if (N1.getOpcode() == ISD::SUB && N0 == N1.getOperand(1)) in visitADDLike()
2843 return N1.getOperand(0); in visitADDLike()
2846 if (N0.getOpcode() == ISD::SUB && N1 == N0.getOperand(1)) in visitADDLike()
2847 return N0.getOperand(0); in visitADDLike()
2851 N0.getOperand(0) == N1.getOperand(1)) in visitADDLike()
2852 return DAG.getNode(ISD::SUB, DL, VT, N1.getOperand(0), in visitADDLike()
2853 N0.getOperand(1)); in visitADDLike()
2857 N0.getOperand(1) == N1.getOperand(0)) in visitADDLike()
2858 return DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), in visitADDLike()
2859 N1.getOperand(1)); in visitADDLike()
2862 if (N1.getOpcode() == ISD::SUB && N1.getOperand(1).getOpcode() == ISD::ADD && in visitADDLike()
2863 N0 == N1.getOperand(1).getOperand(0)) in visitADDLike()
2864 return DAG.getNode(ISD::SUB, DL, VT, N1.getOperand(0), in visitADDLike()
2865 N1.getOperand(1).getOperand(1)); in visitADDLike()
2868 if (N1.getOpcode() == ISD::SUB && N1.getOperand(1).getOpcode() == ISD::ADD && in visitADDLike()
2869 N0 == N1.getOperand(1).getOperand(1)) in visitADDLike()
2870 return DAG.getNode(ISD::SUB, DL, VT, N1.getOperand(0), in visitADDLike()
2871 N1.getOperand(1).getOperand(0)); in visitADDLike()
2875 N1.getOperand(0).getOpcode() == ISD::SUB && in visitADDLike()
2876 N0 == N1.getOperand(0).getOperand(1)) in visitADDLike()
2877 return DAG.getNode(N1.getOpcode(), DL, VT, N1.getOperand(0).getOperand(0), in visitADDLike()
2878 N1.getOperand(1)); in visitADDLike()
2883 SDValue N00 = N0.getOperand(0); in visitADDLike()
2884 SDValue N01 = N0.getOperand(1); in visitADDLike()
2885 SDValue N10 = N1.getOperand(0); in visitADDLike()
2886 SDValue N11 = N1.getOperand(1); in visitADDLike()
2900 if (ISD::matchBinaryPredicate(N0.getOperand(1), N1, MatchUSUBSAT, in visitADDLike()
2902 return DAG.getNode(ISD::USUBSAT, DL, VT, N0.getOperand(0), in visitADDLike()
2903 N0.getOperand(1)); in visitADDLike()
2913 N0.getOperand(0)); in visitADDLike()
2919 if (isBitwiseNot(N0.getOperand(0))) { in visitADDLike()
2920 A = N0.getOperand(1); in visitADDLike()
2921 Xor = N0.getOperand(0); in visitADDLike()
2922 } else if (isBitwiseNot(N0.getOperand(1))) { in visitADDLike()
2923 A = N0.getOperand(0); in visitADDLike()
2924 Xor = N0.getOperand(1); in visitADDLike()
2928 return DAG.getNode(ISD::SUB, DL, VT, A, Xor.getOperand(0)); in visitADDLike()
2940 SDValue Not = DAG.getNode(ISD::XOR, DL, VT, N0.getOperand(0), in visitADDLike()
2942 return DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(1), Not); in visitADDLike()
2949 SDValue Xor = DAG.getNode(ISD::XOR, DL, VT, N0.getOperand(1), N1); in visitADDLike()
2950 return DAG.getNode(ISD::ADD, DL, VT, Xor, N0.getOperand(0)); in visitADDLike()
2963 SDValue N0 = N->getOperand(0); in visitADD()
2964 SDValue N1 = N->getOperand(1); in visitADD()
2991 N0.getOperand(1).getOpcode() == ISD::VSCALE && in visitADD()
2993 const APInt &VS0 = N0.getOperand(1)->getConstantOperandAPInt(0); in visitADD()
2996 return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), VS); in visitADD()
3010 N0.getOperand(1).getOpcode() == ISD::STEP_VECTOR && in visitADD()
3012 const APInt &SV0 = N0.getOperand(1)->getConstantOperandAPInt(0); in visitADD()
3016 return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), SV); in visitADD()
3024 SDValue N0 = N->getOperand(0); in visitADDSAT()
3025 SDValue N1 = N->getOperand(1); in visitADDSAT()
3071 V = V.getOperand(0); in getAsCarry()
3075 if (V.getOpcode() == ISD::AND && isOneConstant(V.getOperand(1))) { in getAsCarry()
3080 V = V.getOperand(0); in getAsCarry()
3119 N1 = N1.getOperand(0); in foldAddSubMasked1()
3121 if (N1.getOpcode() != ISD::AND || !isOneOrOneSplat(N1->getOperand(1))) in foldAddSubMasked1()
3125 SDValue N10 = N1.getOperand(0); in foldAddSubMasked1()
3127 N10 = N10.getOperand(0); in foldAddSubMasked1()
3147 if (N1.getOpcode() == ISD::SHL && N1.getOperand(0).getOpcode() == ISD::SUB && in visitADDLikeCommutative()
3148 isNullOrNullSplat(N1.getOperand(0).getOperand(0))) in visitADDLikeCommutative()
3151 N1.getOperand(0).getOperand(1), in visitADDLikeCommutative()
3152 N1.getOperand(1))); in visitADDLikeCommutative()
3162 N0.hasOneUse() && isOneOrOneSplat(N0.getOperand(1)) && in visitADDLikeCommutative()
3166 SDValue Not = DAG.getNode(ISD::XOR, DL, VT, N0.getOperand(0), in visitADDLikeCommutative()
3175 if (isConstantOrConstantVector(N0.getOperand(1), /*NoOpaques=*/true)) { in visitADDLikeCommutative()
3176 SDValue Add = DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), N1); in visitADDLikeCommutative()
3177 return DAG.getNode(ISD::SUB, DL, VT, Add, N0.getOperand(1)); in visitADDLikeCommutative()
3181 if (isConstantOrConstantVector(N0.getOperand(0), /*NoOpaques=*/true)) { in visitADDLikeCommutative()
3182 SDValue Sub = DAG.getNode(ISD::SUB, DL, VT, N1, N0.getOperand(1)); in visitADDLikeCommutative()
3183 return DAG.getNode(ISD::ADD, DL, VT, Sub, N0.getOperand(0)); in visitADDLikeCommutative()
3188 if (N0.getOpcode() == ISD::MUL && N0.getOperand(0) == N1 && in visitADDLikeCommutative()
3189 isConstantOrConstantVector(N0.getOperand(1), /*NoOpaques=*/true) && in visitADDLikeCommutative()
3191 SDValue NewC = DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(1), in visitADDLikeCommutative()
3193 return DAG.getNode(ISD::MUL, DL, VT, N0.getOperand(0), NewC); in visitADDLikeCommutative()
3200 N0.getOperand(0).getScalarValueSizeInBits() == 1 && in visitADDLikeCommutative()
3202 SDValue ZExt = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, N0.getOperand(0)); in visitADDLikeCommutative()
3208 VTSDNode *TN = cast<VTSDNode>(N1.getOperand(1)); in visitADDLikeCommutative()
3210 SDValue ZExt = DAG.getNode(ISD::AND, DL, VT, N1.getOperand(0), in visitADDLikeCommutative()
3217 if (N1.getOpcode() == ISD::UADDO_CARRY && isNullConstant(N1.getOperand(1)) && in visitADDLikeCommutative()
3220 N0, N1.getOperand(0), N1.getOperand(2)); in visitADDLikeCommutative()
3233 SDValue N0 = N->getOperand(0); in visitADDC()
3234 SDValue N1 = N->getOperand(1); in visitADDC()
3278 ConstantSDNode *Const = isConstOrConstSplat(V.getOperand(1), false); in extractBooleanFlip()
3298 return V.getOperand(0); in extractBooleanFlip()
3305 SDValue N0 = N->getOperand(0); in visitADDO()
3306 SDValue N1 = N->getOperand(1); in visitADDO()
3336 DAG.getConstant(0, DL, VT), N0.getOperand(0)); in visitADDO()
3341 DAG.getConstant(0, DL, VT), N0.getOperand(0)); in visitADDO()
3363 if (N1.getOpcode() == ISD::UADDO_CARRY && isNullConstant(N1.getOperand(1))) { in visitUADDOLike()
3364 SDValue Y = N1.getOperand(0); in visitUADDOLike()
3368 N1.getOperand(2)); in visitUADDOLike()
3381 SDValue N0 = N->getOperand(0); in visitADDE()
3382 SDValue N1 = N->getOperand(1); in visitADDE()
3383 SDValue CarryIn = N->getOperand(2); in visitADDE()
3400 SDValue N0 = N->getOperand(0); in visitUADDO_CARRY()
3401 SDValue N1 = N->getOperand(1); in visitUADDO_CARRY()
3402 SDValue CarryIn = N->getOperand(2); in visitUADDO_CARRY()
3487 isNullConstant(Carry0.getOperand(1))) { in combineUADDO_CARRYDiamond()
3488 Z = Carry0.getOperand(2); in combineUADDO_CARRYDiamond()
3490 isOneConstant(Carry0.getOperand(1))) { in combineUADDO_CARRYDiamond()
3492 Z = DAG.getConstant(1, SDLoc(Carry0.getOperand(1)), VT); in combineUADDO_CARRYDiamond()
3516 if (Carry0.getOperand(0) == Carry1.getValue(0)) { in combineUADDO_CARRYDiamond()
3517 return cancelDiamond(Carry1.getOperand(0), Carry1.getOperand(1)); in combineUADDO_CARRYDiamond()
3527 if (Carry1.getOperand(0) == Carry0.getValue(0)) { in combineUADDO_CARRYDiamond()
3528 return cancelDiamond(Carry0.getOperand(0), Carry1.getOperand(1)); in combineUADDO_CARRYDiamond()
3531 if (Carry1.getOperand(1) == Carry0.getValue(0)) { in combineUADDO_CARRYDiamond()
3532 return cancelDiamond(Carry1.getOperand(0), Carry0.getOperand(0)); in combineUADDO_CARRYDiamond()
3590 if (Carry1.getOperand(0) != Carry0.getValue(0) && in combineCarryDiamond()
3591 Carry1.getOperand(1) != Carry0.getValue(0)) in combineCarryDiamond()
3596 Carry1.getOperand(0) == Carry0.getValue(0) ? 1 : 0; in combineCarryDiamond()
3599 SDValue CarryIn = Carry1.getOperand(CarryInOperandNum); in combineCarryDiamond()
3612 DAG.getNode(NewOp, DL, Carry1->getVTList(), Carry0.getOperand(0), in combineCarryDiamond()
3613 Carry0.getOperand(1), CarryIn); in combineCarryDiamond()
3642 N0.getOperand(0), NotC); in visitUADDO_CARRYLike()
3656 N0.getOperand(0), N0.getOperand(1), CarryIn); in visitUADDO_CARRYLike()
3680 N0.getOperand(0), NotC); in visitSADDO_CARRYLike()
3687 SDValue N0 = N->getOperand(0); in visitSADDO_CARRY()
3688 SDValue N1 = N->getOperand(1); in visitSADDO_CARRY()
3689 SDValue CarryIn = N->getOperand(2); in visitSADDO_CARRY()
3750 SDValue Op0 = N->getOperand(0); in foldSubToUSubSat()
3751 SDValue Op1 = N->getOperand(1); in foldSubToUSubSat()
3756 SDValue MaxLHS = Op0.getOperand(0); in foldSubToUSubSat()
3757 SDValue MaxRHS = Op0.getOperand(1); in foldSubToUSubSat()
3765 SDValue MinLHS = Op1.getOperand(0); in foldSubToUSubSat()
3766 SDValue MinRHS = Op1.getOperand(1); in foldSubToUSubSat()
3775 Op1.getOperand(0).getOpcode() == ISD::UMIN && in foldSubToUSubSat()
3776 Op1.getOperand(0).hasOneUse()) { in foldSubToUSubSat()
3777 SDValue MinLHS = Op1.getOperand(0).getOperand(0); in foldSubToUSubSat()
3778 SDValue MinRHS = Op1.getOperand(0).getOperand(1); in foldSubToUSubSat()
3779 if (MinLHS.getOpcode() == ISD::ZERO_EXTEND && MinLHS.getOperand(0) == Op0) in foldSubToUSubSat()
3782 if (MinRHS.getOpcode() == ISD::ZERO_EXTEND && MinRHS.getOperand(0) == Op0) in foldSubToUSubSat()
3802 SDValue N0 = N->getOperand(0); in visitSUB()
3803 SDValue N1 = N->getOperand(1); in visitSUB()
3809 return N->getOperand(0); in visitSUB()
3850 ConstantSDNode *ShiftAmt = isConstOrConstSplat(N1.getOperand(1)); in visitSUB()
3854 return DAG.getNode(NewSh, DL, VT, N1.getOperand(0), N1.getOperand(1)); in visitSUB()
3882 isNullConstant(N1S.getOperand(0))) in visitSUB()
3883 return DAG.getSplat(VT, DL, N1S.getOperand(1)); in visitSUB()
3892 if (N1.getOpcode() == ISD::SUB && isNullOrNullSplat(N1.getOperand(0))) in visitSUB()
3893 return DAG.getNode(ISD::ADD, DL, VT, N0, N1.getOperand(1)); in visitSUB()
3896 if (N1.getOpcode() == ISD::SUB && N0 == N1.getOperand(0)) in visitSUB()
3897 return N1.getOperand(1); in visitSUB()
3900 if (N0.getOpcode() == ISD::ADD && N0.getOperand(0) == N1) in visitSUB()
3901 return N0.getOperand(1); in visitSUB()
3904 if (N0.getOpcode() == ISD::ADD && N0.getOperand(1) == N1) in visitSUB()
3905 return N0.getOperand(0); in visitSUB()
3909 SDValue N01 = N0.getOperand(1); in visitSUB()
3911 return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), NewC); in visitSUB()
3916 SDValue N11 = N1.getOperand(1); in visitSUB()
3918 return DAG.getNode(ISD::SUB, DL, VT, NewC, N1.getOperand(0)); in visitSUB()
3923 SDValue N01 = N0.getOperand(1); in visitSUB()
3925 return DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), NewC); in visitSUB()
3930 SDValue N00 = N0.getOperand(0); in visitSUB()
3932 return DAG.getNode(ISD::SUB, DL, VT, NewC, N0.getOperand(1)); in visitSUB()
3937 (N0.getOperand(1).getOpcode() == ISD::SUB || in visitSUB()
3938 N0.getOperand(1).getOpcode() == ISD::ADD) && in visitSUB()
3939 N0.getOperand(1).getOperand(0) == N1) in visitSUB()
3940 return DAG.getNode(N0.getOperand(1).getOpcode(), DL, VT, N0.getOperand(0), in visitSUB()
3941 N0.getOperand(1).getOperand(1)); in visitSUB()
3944 if (N0.getOpcode() == ISD::ADD && N0.getOperand(1).getOpcode() == ISD::ADD && in visitSUB()
3945 N0.getOperand(1).getOperand(1) == N1) in visitSUB()
3946 return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), in visitSUB()
3947 N0.getOperand(1).getOperand(0)); in visitSUB()
3950 if (N0.getOpcode() == ISD::SUB && N0.getOperand(1).getOpcode() == ISD::SUB && in visitSUB()
3951 N0.getOperand(1).getOperand(1) == N1) in visitSUB()
3952 return DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), in visitSUB()
3953 N0.getOperand(1).getOperand(0)); in visitSUB()
3958 DAG.getNode(ISD::SUB, DL, VT, N1.getOperand(1), in visitSUB()
3959 N1.getOperand(0))); in visitSUB()
3963 SDValue A = N1.getOperand(0); in visitSUB()
3964 SDValue B = N1.getOperand(1); in visitSUB()
3977 if (N1.getOperand(0).getOpcode() == ISD::SUB && in visitSUB()
3978 isNullOrNullSplat(N1.getOperand(0).getOperand(0))) { in visitSUB()
3980 N1.getOperand(0).getOperand(1), in visitSUB()
3981 N1.getOperand(1)); in visitSUB()
3984 if (N1.getOperand(1).getOpcode() == ISD::SUB && in visitSUB()
3985 isNullOrNullSplat(N1.getOperand(1).getOperand(0))) { in visitSUB()
3987 N1.getOperand(0), in visitSUB()
3988 N1.getOperand(1).getOperand(1)); in visitSUB()
4013 SDValue Xor = DAG.getNode(ISD::XOR, DL, VT, N0.getOperand(1), in visitSUB()
4015 return DAG.getNode(ISD::ADD, DL, VT, Xor, N0.getOperand(0)); in visitSUB()
4023 SDValue Add = DAG.getNode(ISD::ADD, DL, VT, N0, N1.getOperand(0)); in visitSUB()
4030 isConstantOrConstantVector(N0.getOperand(1), /*NoOpaques=*/true)) { in visitSUB()
4031 SDValue Sub = DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), N1); in visitSUB()
4032 return DAG.getNode(ISD::ADD, DL, VT, Sub, N0.getOperand(1)); in visitSUB()
4036 isConstantOrConstantVector(N1.getOperand(1), /*NoOpaques=*/true)) { in visitSUB()
4037 SDValue Sub = DAG.getNode(ISD::SUB, DL, VT, N0, N1.getOperand(0)); in visitSUB()
4038 return DAG.getNode(ISD::SUB, DL, VT, Sub, N1.getOperand(1)); in visitSUB()
4043 isConstantOrConstantVector(N0.getOperand(1), /*NoOpaques=*/true)) { in visitSUB()
4044 SDValue Sub = DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), N1); in visitSUB()
4045 return DAG.getNode(ISD::SUB, DL, VT, Sub, N0.getOperand(1)); in visitSUB()
4049 isConstantOrConstantVector(N0.getOperand(0), /*NoOpaques=*/true)) { in visitSUB()
4050 SDValue Add = DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(1), N1); in visitSUB()
4051 return DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), Add); in visitSUB()
4058 N1.getOperand(0).getScalarValueSizeInBits() == 1 && in visitSUB()
4061 SDValue SExt = DAG.getNode(ISD::SIGN_EXTEND, DL, VT, N1.getOperand(0)); in visitSUB()
4068 SDValue X0 = N0.getOperand(0), X1 = N0.getOperand(1); in visitSUB()
4069 SDValue S0 = N1.getOperand(0); in visitSUB()
4071 if (ConstantSDNode *C = isConstOrConstSplat(N1.getOperand(1))) in visitSUB()
4089 VTSDNode *TN = cast<VTSDNode>(N1.getOperand(1)); in visitSUB()
4091 SDValue ZExt = DAG.getNode(ISD::AND, DL, VT, N1.getOperand(0), in visitSUB()
4113 SDValue ShAmt = N1.getOperand(1); in visitSUB()
4117 SDValue SRA = DAG.getNode(ISD::SRA, DL, VT, N1.getOperand(0), ShAmt); in visitSUB()
4126 ConstantSDNode *ShlC = isConstOrConstSplat(N1.getOperand(1)); in visitSUB()
4132 if (N0.getOpcode() == ISD::USUBO_CARRY && isNullConstant(N0.getOperand(1)) && in visitSUB()
4135 N0.getOperand(0), N1, N0.getOperand(2)); in visitSUB()
4164 if ((N0.getOperand(0) != N1.getOperand(0) || in visitSUB()
4165 N0.getOperand(1) != N1.getOperand(1)) && in visitSUB()
4166 (N0.getOperand(0) != N1.getOperand(1) || in visitSUB()
4167 N0.getOperand(1) != N1.getOperand(0))) in visitSUB()
4171 return DAG.getNode(Abd, DL, VT, N0.getOperand(0), N0.getOperand(1)); in visitSUB()
4183 SDValue N0 = N->getOperand(0); in visitSUBSAT()
4184 SDValue N1 = N->getOperand(1); in visitSUBSAT()
4223 SDValue N0 = N->getOperand(0); in visitSUBC()
4224 SDValue N1 = N->getOperand(1); in visitSUBC()
4251 SDValue N0 = N->getOperand(0); in visitSUBO()
4252 SDValue N1 = N->getOperand(1); in visitSUBO()
4295 SDValue N0 = N->getOperand(0); in visitSUBE()
4296 SDValue N1 = N->getOperand(1); in visitSUBE()
4297 SDValue CarryIn = N->getOperand(2); in visitSUBE()
4307 SDValue N0 = N->getOperand(0); in visitUSUBO_CARRY()
4308 SDValue N1 = N->getOperand(1); in visitUSUBO_CARRY()
4309 SDValue CarryIn = N->getOperand(2); in visitUSUBO_CARRY()
4322 SDValue N0 = N->getOperand(0); in visitSSUBO_CARRY()
4323 SDValue N1 = N->getOperand(1); in visitSSUBO_CARRY()
4324 SDValue CarryIn = N->getOperand(2); in visitSSUBO_CARRY()
4339 SDValue N0 = N->getOperand(0); in visitMULFIX()
4340 SDValue N1 = N->getOperand(1); in visitMULFIX()
4341 SDValue Scale = N->getOperand(2); in visitMULFIX()
4361 SDValue N0 = N->getOperand(0); in visitMUL()
4362 SDValue N1 = N->getOperand(1); in visitMUL()
4503 SDValue N01 = N0.getOperand(1); in visitMUL()
4505 return DAG.getNode(ISD::MUL, DL, VT, N0.getOperand(0), C3); in visitMUL()
4515 isConstantOrConstantVector(N0.getOperand(1)) && N0->hasOneUse()) { in visitMUL()
4518 isConstantOrConstantVector(N1.getOperand(1)) && in visitMUL()
4524 SDValue Mul = DAG.getNode(ISD::MUL, DL, VT, Sh.getOperand(0), Y); in visitMUL()
4525 return DAG.getNode(ISD::SHL, DL, VT, Mul, Sh.getOperand(1)); in visitMUL()
4532 DAG.isConstantIntBuildVectorOrConstantInt(N0.getOperand(1)) && in visitMUL()
4536 DAG.getNode(ISD::MUL, SDLoc(N0), VT, N0.getOperand(0), N1), in visitMUL()
4537 DAG.getNode(ISD::MUL, SDLoc(N1), VT, N0.getOperand(1), N1)); in visitMUL()
4575 EVT LegalSVT = N1.getOperand(0).getValueType(); in visitMUL()
4656 SDValue Op0 = Node->getOperand(0); in useDivRem()
4657 SDValue Op1 = Node->getOperand(1); in useDivRem()
4668 User->getOperand(0) == Op0 && in useDivRem()
4669 User->getOperand(1) == Op1) { in useDivRem()
4691 SDValue N0 = N->getOperand(0); in simplifyDivRem()
4692 SDValue N1 = N->getOperand(1); in simplifyDivRem()
4737 SDValue N0 = N->getOperand(0); in visitSDIV()
4738 SDValue N1 = N->getOperand(1); in visitSDIV()
4885 SDValue N0 = N->getOperand(0); in visitUDIV()
4886 SDValue N1 = N->getOperand(1); in visitUDIV()
4957 SDValue N10 = N1.getOperand(0); in visitUDIVLike()
4962 EVT ADDVT = N1.getOperand(1).getValueType(); in visitUDIVLike()
4965 SDValue Add = DAG.getNode(ISD::ADD, DL, ADDVT, N1.getOperand(1), Trunc); in visitUDIVLike()
4995 SDValue N0 = N->getOperand(0); in visitREM()
4996 SDValue N1 = N->getOperand(1); in visitREM()
5040 DAG.isKnownToBeAPowerOfTwo(N1.getOperand(0))) { in visitREM()
5088 SDValue N0 = N->getOperand(0); in visitMULHS()
5089 SDValue N1 = N->getOperand(1); in visitMULHS()
5148 SDValue N0 = N->getOperand(0); in visitMULHU()
5149 SDValue N1 = N->getOperand(1); in visitMULHU()
5226 SDValue N0 = N->getOperand(0); in visitAVG()
5227 SDValue N1 = N->getOperand(1); in visitAVG()
5270 SDValue N0 = N->getOperand(0); in visitABD()
5271 SDValue N1 = N->getOperand(1); in visitABD()
5363 SDValue N0 = N->getOperand(0); in visitSMUL_LOHI()
5364 SDValue N1 = N->getOperand(1); in visitSMUL_LOHI()
5405 SDValue N0 = N->getOperand(0); in visitUMUL_LOHI()
5406 SDValue N1 = N->getOperand(1); in visitUMUL_LOHI()
5456 SDValue N0 = N->getOperand(0); in visitMULO()
5457 SDValue N1 = N->getOperand(1); in visitMULO()
5524 if (N0 != N2 && (N2.getOpcode() != ISD::TRUNCATE || N0 != N2.getOperand(0))) in isSaturatingMinMax()
5548 EVT FPVT = N0.getOperand(0).getValueType().getScalarType(); in isSaturatingMinMax()
5568 N00 = N02 = N0.getOperand(0); in isSaturatingMinMax()
5569 N01 = N03 = N0.getOperand(1); in isSaturatingMinMax()
5573 N00 = N0.getOperand(0); in isSaturatingMinMax()
5574 N01 = N0.getOperand(1); in isSaturatingMinMax()
5575 N02 = N0.getOperand(2); in isSaturatingMinMax()
5576 N03 = N0.getOperand(3); in isSaturatingMinMax()
5577 N0CC = cast<CondCodeSDNode>(N0.getOperand(4))->get(); in isSaturatingMinMax()
5581 if (N0.getOperand(0).getOpcode() != ISD::SETCC) in isSaturatingMinMax()
5583 N00 = N0.getOperand(0).getOperand(0); in isSaturatingMinMax()
5584 N01 = N0.getOperand(0).getOperand(1); in isSaturatingMinMax()
5585 N02 = N0.getOperand(1); in isSaturatingMinMax()
5586 N03 = N0.getOperand(2); in isSaturatingMinMax()
5587 N0CC = cast<CondCodeSDNode>(N0.getOperand(0).getOperand(2))->get(); in isSaturatingMinMax()
5628 EVT FPVT = Fp.getOperand(0).getValueType(); in PerformMinMaxFpToSatCombine()
5637 SDValue Sat = DAG.getNode(NewOpc, DL, NewVT, Fp.getOperand(0), in PerformMinMaxFpToSatCombine()
5649 (N2.getOpcode() != ISD::TRUNCATE || N0 != N2.getOperand(0))) || in PerformUMinFpToSatCombine()
5663 EVT FPVT = N0.getOperand(0).getValueType(); in PerformUMinFpToSatCombine()
5673 DAG.getNode(ISD::FP_TO_UINT_SAT, SDLoc(N0), NewVT, N0.getOperand(0), in PerformUMinFpToSatCombine()
5679 SDValue N0 = N->getOperand(0); in visitIMINMAX()
5680 SDValue N1 = N->getOperand(1); in visitIMINMAX()
5757 SDValue N0 = N->getOperand(0), N1 = N->getOperand(1); in hoistLogicOpWithSameOpcodeHands()
5772 SDValue X = N0.getOperand(0); in hoistLogicOpWithSameOpcodeHands()
5773 SDValue Y = N1.getOperand(0); in hoistLogicOpWithSameOpcodeHands()
5778 N0.getOperand(1) == N1.getOperand(1))) { in hoistLogicOpWithSameOpcodeHands()
5800 return DAG.getNode(HandOpcode, DL, VT, Logic, N0.getOperand(1)); in hoistLogicOpWithSameOpcodeHands()
5830 N0.getOperand(1) == N1.getOperand(1)) { in hoistLogicOpWithSameOpcodeHands()
5835 return DAG.getNode(HandOpcode, DL, VT, Logic, N0.getOperand(1)); in hoistLogicOpWithSameOpcodeHands()
5851 N0.getOperand(2) == N1.getOperand(2)) { in hoistLogicOpWithSameOpcodeHands()
5854 SDValue X1 = N0.getOperand(1); in hoistLogicOpWithSameOpcodeHands()
5855 SDValue Y1 = N1.getOperand(1); in hoistLogicOpWithSameOpcodeHands()
5856 SDValue S = N0.getOperand(2); in hoistLogicOpWithSameOpcodeHands()
5908 SDValue ShOp = N0.getOperand(1); in hoistLogicOpWithSameOpcodeHands()
5913 if (N0.getOperand(1) == N1.getOperand(1) && ShOp.getNode()) { in hoistLogicOpWithSameOpcodeHands()
5915 N0.getOperand(0), N1.getOperand(0)); in hoistLogicOpWithSameOpcodeHands()
5921 ShOp = N0.getOperand(0); in hoistLogicOpWithSameOpcodeHands()
5926 if (N0.getOperand(0) == N1.getOperand(0) && ShOp.getNode()) { in hoistLogicOpWithSameOpcodeHands()
5927 SDValue Logic = DAG.getNode(LogicOpcode, DL, VT, N0.getOperand(1), in hoistLogicOpWithSameOpcodeHands()
5928 N1.getOperand(1)); in hoistLogicOpWithSameOpcodeHands()
6154 SDValue LHS = LogicOp->getOperand(0); in foldAndOrOfSETCC()
6155 SDValue RHS = LogicOp->getOperand(1); in foldAndOrOfSETCC()
6164 SDValue LHS0 = LHS->getOperand(0); in foldAndOrOfSETCC()
6165 SDValue RHS0 = RHS->getOperand(0); in foldAndOrOfSETCC()
6166 SDValue LHS1 = LHS->getOperand(1); in foldAndOrOfSETCC()
6167 SDValue RHS1 = RHS->getOperand(1); in foldAndOrOfSETCC()
6172 ISD::CondCode CCL = cast<CondCodeSDNode>(LHS.getOperand(2))->get(); in foldAndOrOfSETCC()
6173 ISD::CondCode CCR = cast<CondCodeSDNode>(RHS.getOperand(2))->get(); in foldAndOrOfSETCC()
6284 DAG.getConstant(C, DL, OpVT), LHS.getOperand(2)); in foldAndOrOfSETCC()
6314 DAG.getConstant(0, DL, OpVT), LHS.getOperand(2)); in foldAndOrOfSETCC()
6322 DAG.getConstant(0, DL, OpVT), LHS.getOperand(2)); in foldAndOrOfSETCC()
6348 if (!isOneConstant(T.getOperand(1))) in combineSelectAsExtAnd()
6355 return DAG.getNode(ISD::AND, DL, OpVT, CondMask, T.getOperand(0)); in combineSelectAsExtAnd()
6381 if (ConstantSDNode *ADDI = dyn_cast<ConstantSDNode>(N0.getOperand(1))) { in visitANDLike()
6382 if (ConstantSDNode *SRLI = dyn_cast<ConstantSDNode>(N1.getOperand(1))) { in visitANDLike()
6393 if (DAG.MaskedValueIsZero(N0.getOperand(1), Mask)) { in visitANDLike()
6399 N0.getOperand(0), DAG.getConstant(ADDC, DL, VT)); in visitANDLike()
6585 cast<VTSDNode>(Op.getOperand(1))->getVT() : in SearchForAndLoads()
6586 Op.getOperand(0).getValueType(); in SearchForAndLoads()
6628 auto *Mask = dyn_cast<ConstantSDNode>(N->getOperand(1)); in BackwardsPropagateMask()
6636 if (isa<LoadSDNode>(N->getOperand(0))) in BackwardsPropagateMask()
6647 SDValue MaskOp = N->getOperand(1); in BackwardsPropagateMask()
6663 SDValue Op0 = LogicN->getOperand(0); in BackwardsPropagateMask()
6664 SDValue Op1 = LogicN->getOperand(1); in BackwardsPropagateMask()
6694 DAG.ReplaceAllUsesWith(N, N->getOperand(0).getNode()); in BackwardsPropagateMask()
6708 SDValue N0 = N->getOperand(0); in unfoldExtremeBitClearingToShifts()
6709 SDValue N1 = N->getOperand(1); in unfoldExtremeBitClearingToShifts()
6729 if (!isAllOnesConstant(M->getOperand(0))) in unfoldExtremeBitClearingToShifts()
6731 Y = M->getOperand(1); in unfoldExtremeBitClearingToShifts()
6761 SDValue And0 = And->getOperand(0), And1 = And->getOperand(1); in combineShiftAnd1ToBitTest()
6763 And0 = And0.getOperand(0); in combineShiftAnd1ToBitTest()
6774 Src = Src.getOperand(0); in combineShiftAnd1ToBitTest()
6780 Src = Src.getOperand(0); in combineShiftAnd1ToBitTest()
6795 SDValue ShiftAmt = Src.getOperand(1); in combineShiftAnd1ToBitTest()
6801 Src = Src.getOperand(0); in combineShiftAnd1ToBitTest()
6808 Src = Src.getOperand(0); in combineShiftAnd1ToBitTest()
6832 SDValue N0 = N->getOperand(0); in foldAndToUsubsat()
6833 SDValue N1 = N->getOperand(1); in foldAndToUsubsat()
6845 N0.getOperand(0) != N1.getOperand(0)) in foldAndToUsubsat()
6849 ConstantSDNode *XorC = isConstOrConstSplat(N0.getOperand(1), true); in foldAndToUsubsat()
6850 ConstantSDNode *SraC = isConstOrConstSplat(N1.getOperand(1), true); in foldAndToUsubsat()
6859 return DAG.getNode(ISD::USUBSAT, DL, VT, N0.getOperand(0), SignMask); in foldAndToUsubsat()
6886 SDValue X1 = ShiftOp.getOperand(0); in foldLogicOfShifts()
6887 SDValue Y = ShiftOp.getOperand(1); in foldLogicOfShifts()
6889 if (LogicOp.getOperand(0).getOpcode() == ShiftOpcode && in foldLogicOfShifts()
6890 LogicOp.getOperand(0).getOperand(1) == Y) { in foldLogicOfShifts()
6891 X0 = LogicOp.getOperand(0).getOperand(0); in foldLogicOfShifts()
6892 Z = LogicOp.getOperand(1); in foldLogicOfShifts()
6893 } else if (LogicOp.getOperand(1).getOpcode() == ShiftOpcode && in foldLogicOfShifts()
6894 LogicOp.getOperand(1).getOperand(1) == Y) { in foldLogicOfShifts()
6895 X0 = LogicOp.getOperand(1).getOperand(0); in foldLogicOfShifts()
6896 Z = LogicOp.getOperand(0); in foldLogicOfShifts()
6931 SDValue R0 = RightHand.getOperand(0); in foldLogicTreeOfShifts()
6932 SDValue R1 = RightHand.getOperand(1); in foldLogicTreeOfShifts()
6946 SDValue N0 = N->getOperand(0); in visitAND()
6947 SDValue N1 = N->getOperand(1); in visitAND()
7041 ISD::matchBinaryPredicate(N0.getOperand(1), N1, MatchSubset)) in visitAND()
7045 SDValue N0Op0 = N0.getOperand(0); in visitAND()
7070 SDValue N0Op0 = N0.getOperand(0); in visitAND()
7074 DAG.isConstantIntBuildVectorOrConstantInt(N0Op0.getOperand(1)) && in visitAND()
7079 DAG.getNode(ExtOpc, DL, VT, N0Op0.getOperand(1))); in visitAND()
7081 DAG.getNode(ExtOpc, DL, VT, N0Op0.getOperand(0)), in visitAND()
7093 N0.getValueSizeInBits() == N0.getOperand(0).getScalarValueSizeInBits() && in visitAND()
7094 N0.getOperand(0).getOpcode() == ISD::LOAD && in visitAND()
7095 N0.getOperand(0).getResNo() == 0) || in visitAND()
7098 N0 : N0.getOperand(0) ); in visitAND()
7197 ISD::isExtOpcode(N0.getOperand(0).getOpcode())) { in visitAND()
7198 SDValue Ext = N0.getOperand(0); in visitAND()
7200 SDValue Extendee = Ext->getOperand(0); in visitAND()
7211 N0.getOperand(1)); in visitAND()
7273 if (isNullOrNullSplat(N0.getOperand(0))) { in visitAND()
7274 SDValue SubRHS = N0.getOperand(1); in visitAND()
7276 SubRHS.getOperand(0).getScalarValueSizeInBits() == 1) in visitAND()
7279 SubRHS.getOperand(0).getScalarValueSizeInBits() == 1) in visitAND()
7280 return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), VT, SubRHS.getOperand(0)); in visitAND()
7315 if (SDValue BSwap = MatchBSwapHWordLow(N0.getNode(), N0.getOperand(0), in visitAND()
7316 N0.getOperand(1), false)) in visitAND()
7341 LHS.getOperand(0).getValueType().getFixedSizeInBits())) in visitAND()
7349 return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), VT, N0.getOperand(0)); in visitAND()
7379 if (N0.getOpcode() == ISD::AND && N0.getOperand(0).getOpcode() == ISD::SRL) in MatchBSwapHWordLow()
7381 if (N1.getOpcode() == ISD::AND && N1.getOperand(0).getOpcode() == ISD::SHL) in MatchBSwapHWordLow()
7386 ConstantSDNode *N01C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in MatchBSwapHWordLow()
7392 N0 = N0.getOperand(0); in MatchBSwapHWordLow()
7399 ConstantSDNode *N11C = dyn_cast<ConstantSDNode>(N1.getOperand(1)); in MatchBSwapHWordLow()
7402 N1 = N1.getOperand(0); in MatchBSwapHWordLow()
7413 ConstantSDNode *N01C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in MatchBSwapHWordLow()
7414 ConstantSDNode *N11C = dyn_cast<ConstantSDNode>(N1.getOperand(1)); in MatchBSwapHWordLow()
7421 SDValue N00 = N0->getOperand(0); in MatchBSwapHWordLow()
7425 ConstantSDNode *N001C = dyn_cast<ConstantSDNode>(N00.getOperand(1)); in MatchBSwapHWordLow()
7428 N00 = N00.getOperand(0); in MatchBSwapHWordLow()
7432 SDValue N10 = N1->getOperand(0); in MatchBSwapHWordLow()
7436 ConstantSDNode *N101C = dyn_cast<ConstantSDNode>(N10.getOperand(1)); in MatchBSwapHWordLow()
7442 N10 = N10.getOperand(0); in MatchBSwapHWordLow()
7495 SDValue N0 = N.getOperand(0); in isBSwapHWordElement()
7503 N1C = dyn_cast<ConstantSDNode>(N.getOperand(1)); in isBSwapHWordElement()
7505 N1C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in isBSwapHWordElement()
7534 ConstantSDNode *C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in isBSwapHWordElement()
7542 ConstantSDNode *C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in isBSwapHWordElement()
7551 ConstantSDNode *C = dyn_cast<ConstantSDNode>(N.getOperand(1)); in isBSwapHWordElement()
7559 ConstantSDNode *C = dyn_cast<ConstantSDNode>(N.getOperand(1)); in isBSwapHWordElement()
7567 Parts[MaskByteOffset] = N0.getOperand(0).getNode(); in isBSwapHWordElement()
7574 return isBSwapHWordElement(N.getOperand(0), Parts) && in isBSwapHWordPair()
7575 isBSwapHWordElement(N.getOperand(1), Parts); in isBSwapHWordPair()
7577 if (N.getOpcode() == ISD::SRL && N.getOperand(0).getOpcode() == ISD::BSWAP) { in isBSwapHWordPair()
7578 ConstantSDNode *C = isConstOrConstSplat(N.getOperand(1)); in isBSwapHWordPair()
7581 Parts[0] = Parts[1] = N.getOperand(0).getOperand(0).getNode(); in isBSwapHWordPair()
7604 ConstantSDNode *Mask0 = isConstOrConstSplat(N0.getOperand(1)); in matchBSwapHWordOrAndAnd()
7605 ConstantSDNode *Mask1 = isConstOrConstSplat(N1.getOperand(1)); in matchBSwapHWordOrAndAnd()
7611 SDValue Shift0 = N0.getOperand(0); in matchBSwapHWordOrAndAnd()
7612 SDValue Shift1 = N1.getOperand(0); in matchBSwapHWordOrAndAnd()
7615 ConstantSDNode *ShiftAmt0 = isConstOrConstSplat(Shift0.getOperand(1)); in matchBSwapHWordOrAndAnd()
7616 ConstantSDNode *ShiftAmt1 = isConstOrConstSplat(Shift1.getOperand(1)); in matchBSwapHWordOrAndAnd()
7621 if (Shift0.getOperand(0) != Shift1.getOperand(0)) in matchBSwapHWordOrAndAnd()
7625 SDValue BSwap = DAG.getNode(ISD::BSWAP, DL, VT, Shift0.getOperand(0)); in matchBSwapHWordOrAndAnd()
7670 SDValue N00 = N0.getOperand(0); in MatchBSwapHWord()
7671 SDValue N01 = N0.getOperand(1); in MatchBSwapHWord()
7719 getAsNonOpaqueConstant(N0.getOperand(1))) { in visitORLike()
7721 getAsNonOpaqueConstant(N1.getOperand(1))) { in visitORLike()
7727 if (DAG.MaskedValueIsZero(N0.getOperand(0), RHSMask&~LHSMask) && in visitORLike()
7728 DAG.MaskedValueIsZero(N1.getOperand(0), LHSMask&~RHSMask)) { in visitORLike()
7730 N0.getOperand(0), N1.getOperand(0)); in visitORLike()
7741 N0.getOperand(0) == N1.getOperand(0) && in visitORLike()
7745 N0.getOperand(1), N1.getOperand(1)); in visitORLike()
7746 return DAG.getNode(ISD::AND, DL, VT, N0.getOperand(0), X); in visitORLike()
7759 return V->getOperand(0); in visitORCommutative()
7766 SDValue N00 = N0Resized.getOperand(0); in visitORCommutative()
7767 SDValue N01 = N0Resized.getOperand(1); in visitORCommutative()
7794 SDValue N00 = N0.getOperand(0); in visitORCommutative()
7795 SDValue N01 = N0.getOperand(1); in visitORCommutative()
7802 SDValue N10 = N1.getOperand(0); in visitORCommutative()
7803 SDValue N11 = N1.getOperand(1); in visitORCommutative()
7814 return V->getOperand(0); in visitORCommutative()
7820 N0.getOperand(0) == N1.getOperand(0) && in visitORCommutative()
7821 peekThroughZext(N0.getOperand(2)) == peekThroughZext(N1.getOperand(1))) in visitORCommutative()
7826 N0.getOperand(1) == N1.getOperand(0) && in visitORCommutative()
7827 peekThroughZext(N0.getOperand(2)) == peekThroughZext(N1.getOperand(1))) in visitORCommutative()
7834 SDValue N0 = N->getOperand(0); in visitOR()
7835 SDValue N1 = N->getOperand(1); in visitOR()
7870 bool ZeroN00 = ISD::isBuildVectorAllZeros(N0.getOperand(0).getNode()); in visitOR()
7871 bool ZeroN01 = ISD::isBuildVectorAllZeros(N0.getOperand(1).getNode()); in visitOR()
7872 bool ZeroN10 = ISD::isBuildVectorAllZeros(N1.getOperand(0).getNode()); in visitOR()
7873 bool ZeroN11 = ISD::isBuildVectorAllZeros(N1.getOperand(1).getNode()); in visitOR()
7911 SDValue NewLHS = ZeroN00 ? N0.getOperand(1) : N0.getOperand(0); in visitOR()
7912 SDValue NewRHS = ZeroN10 ? N1.getOperand(1) : N1.getOperand(0); in visitOR()
7970 ISD::matchBinaryPredicate(N0.getOperand(1), N1, MatchIntersect, true)) { in visitOR()
7972 {N1, N0.getOperand(1)})) { in visitOR()
7973 SDValue IOR = DAG.getNode(ISD::OR, SDLoc(N0), VT, N0.getOperand(0), N1); in visitOR()
8018 DAG.isConstantIntBuildVectorOrConstantInt(Op.getOperand(1))) { in stripConstantMask()
8019 Mask = Op.getOperand(1); in stripConstantMask()
8020 return Op.getOperand(0); in stripConstantMask()
8070 SDValue OppShiftLHS = OppShift.getOperand(0); in extractShiftForRotate()
8074 ConstantSDNode *OppShiftCst = isConstOrConstSplat(OppShift.getOperand(1)); in extractShiftForRotate()
8080 ExtractFrom.getOperand(0) == ExtractFrom.getOperand(1) && in extractShiftForRotate()
8081 ExtractFrom.getOperand(0) == OppShiftLHS && in extractShiftForRotate()
8110 OppShiftLHS.getOperand(0) != ExtractFrom.getOperand(0) || in extractShiftForRotate()
8115 ConstantSDNode *OppLHSCst = isConstOrConstSplat(OppShiftLHS.getOperand(1)); in extractShiftForRotate()
8118 isConstOrConstSplat(ExtractFrom.getOperand(1)); in extractShiftForRotate()
8160 EVT ShiftVT = OppShift.getOperand(1).getValueType(); in extractShiftForRotate()
8234 ConstantSDNode *NegC = isConstOrConstSplat(Neg.getOperand(0)); in matchRotateSub()
8237 SDValue NegOp1 = Neg.getOperand(1); in matchRotateSub()
8267 (NegOp1.getOpcode() == ISD::TRUNCATE && Pos == NegOp1.getOperand(0))) in matchRotateSub()
8279 else if (Pos.getOpcode() == ISD::ADD && Pos.getOperand(0) == NegOp1) { in matchRotateSub()
8280 if (ConstantSDNode *PosC = isConstOrConstSplat(Pos.getOperand(1))) in matchRotateSub()
8354 ConstantSDNode *Cst = isConstOrConstSplat(Op.getOperand(1)); in MatchFunnelPosNeg()
8362 InnerPos == InnerNeg.getOperand(0) && in MatchFunnelPosNeg()
8364 return DAG.getNode(ISD::FSHL, DL, VT, N0, N1.getOperand(0), Pos); in MatchFunnelPosNeg()
8371 InnerNeg == InnerPos.getOperand(0) && in MatchFunnelPosNeg()
8373 return DAG.getNode(ISD::FSHR, DL, VT, N0.getOperand(0), N1, Neg); in MatchFunnelPosNeg()
8379 if (N0.getOpcode() == ISD::ADD && N0.getOperand(0) == N0.getOperand(1) && in MatchFunnelPosNeg()
8381 InnerNeg == InnerPos.getOperand(0) && in MatchFunnelPosNeg()
8383 return DAG.getNode(ISD::FSHR, DL, VT, N0.getOperand(0), N1, Neg); in MatchFunnelPosNeg()
8419 LHS.getOperand(0).getValueType() == RHS.getOperand(0).getValueType()) { in MatchRotate()
8421 if (SDValue Rot = MatchRotate(LHS.getOperand(0), RHS.getOperand(0), DL)) { in MatchRotate()
8479 SDValue LHSShiftArg = LHSShift.getOperand(0); in MatchRotate()
8480 SDValue LHSShiftAmt = LHSShift.getOperand(1); in MatchRotate()
8481 SDValue RHSShiftArg = RHSShift.getOperand(0); in MatchRotate()
8482 SDValue RHSShiftAmt = RHSShift.getOperand(1); in MatchRotate()
8523 if (CommonOp == Or.getOperand(0)) { in MatchRotate()
8525 Y = Or.getOperand(1); in MatchRotate()
8528 if (CommonOp == Or.getOperand(1)) { in MatchRotate()
8530 Y = Or.getOperand(0); in MatchRotate()
8598 LExtOp0 = LHSShiftAmt.getOperand(0); in MatchRotate()
8599 RExtOp0 = RHSShiftAmt.getOperand(0); in MatchRotate()
8704 calculateByteProvider(Op->getOperand(0), Index, Depth + 1, VectorIndex); in calculateByteProvider()
8708 calculateByteProvider(Op->getOperand(1), Index, Depth + 1, VectorIndex); in calculateByteProvider()
8719 auto ShiftOp = dyn_cast<ConstantSDNode>(Op->getOperand(1)); in calculateByteProvider()
8734 : calculateByteProvider(Op->getOperand(0), Index - ByteShift, in calculateByteProvider()
8740 SDValue NarrowOp = Op->getOperand(0); in calculateByteProvider()
8755 return calculateByteProvider(Op->getOperand(0), ByteWidth - Index - 1, in calculateByteProvider()
8758 auto OffsetOp = dyn_cast<ConstantSDNode>(Op->getOperand(1)); in calculateByteProvider()
8764 SDValue NarrowOp = Op->getOperand(0); in calculateByteProvider()
8781 return calculateByteProvider(Op->getOperand(0), Index, Depth + 1, in calculateByteProvider()
8849 return stripTruncAndExt(Value.getOperand(0)); in stripTruncAndExt()
8942 SDValue WideVal = Trunc.getOperand(0); in mergeTruncStores()
8944 isa<ConstantSDNode>(WideVal.getOperand(1))) { in mergeTruncStores()
8956 WideVal = WideVal.getOperand(0); in mergeTruncStores()
9295 if (isAllOnesOrAllOnesSplat(N->getOperand(1))) in unfoldMaskedMerge()
9306 SDValue Xor = And.getOperand(XorIdx); in unfoldMaskedMerge()
9309 SDValue Xor0 = Xor.getOperand(0); in unfoldMaskedMerge()
9310 SDValue Xor1 = Xor.getOperand(1); in unfoldMaskedMerge()
9320 M = And.getOperand(XorIdx ? 0 : 1); in unfoldMaskedMerge()
9324 SDValue N0 = N->getOperand(0); in unfoldMaskedMerge()
9325 SDValue N1 = N->getOperand(1); in unfoldMaskedMerge()
9359 SDValue NotM = M.getOperand(0); in unfoldMaskedMerge()
9375 SDValue N0 = N->getOperand(0); in visitXOR()
9376 SDValue N1 = N->getOperand(1); in visitXOR()
9452 return DAG.getSelectCC(SDLoc(N0), LHS, RHS, N0.getOperand(2), in visitXOR()
9453 N0.getOperand(3), NotCC); in visitXOR()
9461 N0.getOperand(0), N0Opcode == ISD::STRICT_FSETCCS); in visitXOR()
9475 isSetCCEquivalent(N0.getOperand(0), LHS, RHS, CC)){ in visitXOR()
9476 SDValue V = N0.getOperand(0); in visitXOR()
9487 SDValue N00 = N0.getOperand(0), N01 = N0.getOperand(1); in visitXOR()
9499 SDValue N00 = N0.getOperand(0), N01 = N0.getOperand(1); in visitXOR()
9513 isNullConstant(N0.getOperand(0))) { in visitXOR()
9514 return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(1), in visitXOR()
9520 isAllOnesOrAllOnesSplat(N0.getOperand(1))) { in visitXOR()
9521 return DAG.getNegative(N0.getOperand(0), DL, VT); in visitXOR()
9525 if (N0Opcode == ISD::AND && N0.hasOneUse() && N0->getOperand(1) == N1) { in visitXOR()
9526 SDValue X = N0.getOperand(0); in visitXOR()
9537 SDValue A0 = A.getOperand(0), A1 = A.getOperand(1); in visitXOR()
9538 SDValue S0 = S.getOperand(0); in visitXOR()
9540 if (ConstantSDNode *C = isConstOrConstSplat(S.getOperand(1))) in visitXOR()
9569 isAllOnesConstant(N1) && isOneConstant(N0.getOperand(0))) { in visitXOR()
9571 N0.getOperand(1)); in visitXOR()
9606 SDValue LogicOp = Shift->getOperand(0); in combineShiftOfShiftedLogic()
9617 SDValue C1 = Shift->getOperand(1); in combineShiftOfShiftedLogic()
9626 ConstantSDNode *ShiftCNode = isConstOrConstSplat(V.getOperand(1)); in combineShiftOfShiftedLogic()
9631 ShiftOp = V.getOperand(0); in combineShiftOfShiftedLogic()
9656 if (matchFirstShift(LogicOp.getOperand(0), X, C0Val)) in combineShiftOfShiftedLogic()
9657 Y = LogicOp.getOperand(1); in combineShiftOfShiftedLogic()
9658 else if (matchFirstShift(LogicOp.getOperand(1), X, C0Val)) in combineShiftOfShiftedLogic()
9659 Y = LogicOp.getOperand(0); in combineShiftOfShiftedLogic()
9666 EVT ShiftAmtVT = Shift->getOperand(1).getValueType(); in combineShiftOfShiftedLogic()
9680 assert(isConstOrConstSplat(N->getOperand(1)) && "Expected constant operand"); in visitShiftByConstant()
9683 if (isBitwiseNot(N->getOperand(0))) in visitShiftByConstant()
9687 SDValue LHS = N->getOperand(0); in visitShiftByConstant()
9715 SDValue BinOpLHSVal = LHS.getOperand(0); in visitShiftByConstant()
9719 isa<ConstantSDNode>(BinOpLHSVal.getOperand(1)); in visitShiftByConstant()
9733 N->getOpcode(), DL, VT, {LHS.getOperand(1), N->getOperand(1)})) { in visitShiftByConstant()
9734 SDValue NewShift = DAG.getNode(N->getOpcode(), DL, VT, LHS.getOperand(0), in visitShiftByConstant()
9735 N->getOperand(1)); in visitShiftByConstant()
9744 assert(N->getOperand(0).getOpcode() == ISD::AND); in distributeTruncateThroughAnd()
9748 if (N->hasOneUse() && N->getOperand(0).hasOneUse() && in distributeTruncateThroughAnd()
9750 SDValue N01 = N->getOperand(0).getOperand(1); in distributeTruncateThroughAnd()
9753 SDValue N00 = N->getOperand(0).getOperand(0); in distributeTruncateThroughAnd()
9767 SDValue N0 = N->getOperand(0); in visitRotate()
9768 SDValue N1 = N->getOperand(1); in visitRotate()
9809 N1.getOperand(0).getOpcode() == ISD::AND) { in visitRotate()
9820 SDNode *C2 = DAG.isConstantIntBuildVectorOrConstantInt(N0.getOperand(1)); in visitRotate()
9829 {N0.getOperand(1), BitsizeC}); in visitRotate()
9837 return DAG.getNode(N->getOpcode(), dl, VT, N0->getOperand(0), in visitRotate()
9846 SDValue N0 = N->getOperand(0); in visitSHL()
9847 SDValue N1 = N->getOperand(1); in visitSHL()
9869 SDValue N00 = N0->getOperand(0); in visitSHL()
9870 SDValue N01 = N0->getOperand(1); in visitSHL()
9874 TLI.getBooleanContents(N00.getOperand(0).getValueType()) == in visitSHL()
9893 N1.getOperand(0).getOpcode() == ISD::AND) { in visitSHL()
9907 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchOutOfRange)) in visitSHL()
9917 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchInRange)) { in visitSHL()
9919 SDValue Sum = DAG.getNode(ISD::ADD, DL, ShiftVT, N1, N0.getOperand(1)); in visitSHL()
9920 return DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0), Sum); in visitSHL()
9932 N0.getOperand(0).getOpcode() == ISD::SHL) { in visitSHL()
9933 SDValue N0Op0 = N0.getOperand(0); in visitSHL()
9934 SDValue InnerShiftAmt = N0Op0.getOperand(1); in visitSHL()
9963 SDValue Ext = DAG.getNode(N0.getOpcode(), DL, VT, N0Op0.getOperand(0)); in visitSHL()
9974 N0.getOperand(0).getOpcode() == ISD::SRL) { in visitSHL()
9975 SDValue N0Op0 = N0.getOperand(0); in visitSHL()
9976 SDValue InnerShiftAmt = N0Op0.getOperand(1); in visitSHL()
9988 EVT InnerShiftAmtVT = N0Op0.getOperand(1).getValueType(); in visitSHL()
10010 if (ISD::matchBinaryPredicate(N0.getOperand(1), N1, MatchShiftAmount, in visitSHL()
10013 SDValue N01 = DAG.getZExtOrTrunc(N0.getOperand(1), DL, ShiftVT); in visitSHL()
10015 return DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0), Diff); in visitSHL()
10017 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchShiftAmount, in visitSHL()
10020 SDValue N01 = DAG.getZExtOrTrunc(N0.getOperand(1), DL, ShiftVT); in visitSHL()
10022 return DAG.getNode(N0.getOpcode(), DL, VT, N0.getOperand(0), Diff); in visitSHL()
10031 (N0.getOperand(1) == N1 || N0.hasOneUse()) && in visitSHL()
10033 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchShiftAmount, in visitSHL()
10036 SDValue N01 = DAG.getZExtOrTrunc(N0.getOperand(1), DL, ShiftVT); in visitSHL()
10041 SDValue Shift = DAG.getNode(ISD::SRL, DL, VT, N0.getOperand(0), Diff); in visitSHL()
10044 if (ISD::matchBinaryPredicate(N0.getOperand(1), N1, MatchShiftAmount, in visitSHL()
10047 SDValue N01 = DAG.getZExtOrTrunc(N0.getOperand(1), DL, ShiftVT); in visitSHL()
10051 SDValue Shift = DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0), Diff); in visitSHL()
10058 if (N0.getOpcode() == ISD::SRA && N1 == N0.getOperand(1) && in visitSHL()
10063 return DAG.getNode(ISD::AND, DL, VT, N0.getOperand(0), HiBitsMask); in visitSHL()
10072 SDValue N01 = N0.getOperand(1); in visitSHL()
10075 SDValue Shl0 = DAG.getNode(ISD::SHL, SDLoc(N0), VT, N0.getOperand(0), N1); in visitSHL()
10089 N0.getOperand(0).getOpcode() == ISD::ADD && in visitSHL()
10090 N0.getOperand(0)->getFlags().hasNoSignedWrap() && N0->hasOneUse() && in visitSHL()
10091 N0.getOperand(0)->hasOneUse() && in visitSHL()
10093 SDValue Add = N0.getOperand(0); in visitSHL()
10096 {Add.getOperand(1)})) { in visitSHL()
10099 SDValue ExtX = DAG.getNode(N0.getOpcode(), DL, VT, Add.getOperand(0)); in visitSHL()
10108 SDValue N01 = N0.getOperand(1); in visitSHL()
10111 return DAG.getNode(ISD::MUL, SDLoc(N), VT, N0.getOperand(0), Shl); in visitSHL()
10154 ConstantSDNode *ShiftAmtSrc = isConstOrConstSplat(N->getOperand(1)); in combineShiftToMULH()
10161 SDValue ShiftOperand = N->getOperand(0); in combineShiftToMULH()
10166 SDValue LeftOp = ShiftOperand.getOperand(0); in combineShiftToMULH()
10167 SDValue RightOp = ShiftOperand.getOperand(1); in combineShiftToMULH()
10175 EVT NarrowVT = LeftOp.getOperand(0).getValueType(); in combineShiftToMULH()
10183 ConstantSDNode *UShiftAmtSrc = isConstOrConstSplat(U->getOperand(1)); in combineShiftToMULH()
10214 if (NarrowVT != RightOp.getOperand(0).getValueType()) in combineShiftToMULH()
10216 MulhRightOp = RightOp.getOperand(0); in combineShiftToMULH()
10254 DAG.getNode(MulhOpcode, DL, NarrowVT, LeftOp.getOperand(0), MulhRightOp); in combineShiftToMULH()
10266 SDValue N0 = N->getOperand(0); in foldBitOrderCrossLogicOp()
10270 SDValue OldLHS = N0.getOperand(0); in foldBitOrderCrossLogicOp()
10271 SDValue OldRHS = N0.getOperand(1); in foldBitOrderCrossLogicOp()
10276 return DAG.getNode(N0.getOpcode(), DL, VT, OldLHS.getOperand(0), in foldBitOrderCrossLogicOp()
10277 OldRHS.getOperand(0)); in foldBitOrderCrossLogicOp()
10282 return DAG.getNode(N0.getOpcode(), DL, VT, OldLHS.getOperand(0), in foldBitOrderCrossLogicOp()
10289 OldRHS.getOperand(0)); in foldBitOrderCrossLogicOp()
10296 SDValue N0 = N->getOperand(0); in visitSRA()
10297 SDValue N1 = N->getOperand(1); in visitSRA()
10342 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), SumOfShifts)) { in visitSRA()
10353 return DAG.getNode(ISD::SRA, DL, VT, N0.getOperand(0), ShiftValue); in visitSRA()
10364 const ConstantSDNode *N01C = isConstOrConstSplat(N0.getOperand(1)); in visitSRA()
10386 getShiftAmountTy(N0.getOperand(0).getValueType())); in visitSRA()
10388 N0.getOperand(0), Amt); in visitSRA()
10405 SDValue Shl = N0.getOperand(IsAdd ? 0 : 1); in visitSRA()
10406 if (Shl.getOpcode() == ISD::SHL && Shl.getOperand(1) == N1 && in visitSRA()
10410 isConstOrConstSplat(N0.getOperand(IsAdd ? 1 : 0))) { in visitSRA()
10426 SDValue Trunc = DAG.getZExtOrTrunc(Shl.getOperand(0), DL, TruncVT); in visitSRA()
10444 N1.getOperand(0).getOpcode() == ISD::AND) { in visitSRA()
10454 (N0.getOperand(0).getOpcode() == ISD::SRL || in visitSRA()
10455 N0.getOperand(0).getOpcode() == ISD::SRA) && in visitSRA()
10456 N0.getOperand(0).hasOneUse() && in visitSRA()
10457 N0.getOperand(0).getOperand(1).hasOneUse() && N1C) { in visitSRA()
10458 SDValue N0Op0 = N0.getOperand(0); in visitSRA()
10459 if (ConstantSDNode *LargeShift = isConstOrConstSplat(N0Op0.getOperand(1))) { in visitSRA()
10469 DAG.getNode(ISD::SRA, DL, LargeVT, N0Op0.getOperand(0), Amt); in visitSRA()
10500 SDValue N0 = N->getOperand(0); in visitSRL()
10501 SDValue N1 = N->getOperand(1); in visitSRL()
10536 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchOutOfRange)) in visitSRL()
10546 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchInRange)) { in visitSRL()
10548 SDValue Sum = DAG.getNode(ISD::ADD, DL, ShiftVT, N1, N0.getOperand(1)); in visitSRL()
10549 return DAG.getNode(ISD::SRL, DL, VT, N0.getOperand(0), Sum); in visitSRL()
10554 N0.getOperand(0).getOpcode() == ISD::SRL) { in visitSRL()
10555 SDValue InnerShift = N0.getOperand(0); in visitSRL()
10557 if (auto *N001C = isConstOrConstSplat(InnerShift.getOperand(1))) { in visitSRL()
10561 EVT ShiftAmtVT = InnerShift.getOperand(1).getValueType(); in visitSRL()
10571 InnerShift.getOperand(0), NewShiftAmt); in visitSRL()
10581 InnerShift.getOperand(0), NewShiftAmt); in visitSRL()
10594 (N0.getOperand(1) == N1 || N0->hasOneUse()) && in visitSRL()
10603 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchShiftAmount, in visitSRL()
10607 SDValue N01 = DAG.getZExtOrTrunc(N0.getOperand(1), DL, ShiftVT); in visitSRL()
10612 SDValue Shift = DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0), Diff); in visitSRL()
10615 if (ISD::matchBinaryPredicate(N0.getOperand(1), N1, MatchShiftAmount, in visitSRL()
10619 SDValue N01 = DAG.getZExtOrTrunc(N0.getOperand(1), DL, ShiftVT); in visitSRL()
10623 SDValue Shift = DAG.getNode(ISD::SRL, DL, VT, N0.getOperand(0), Diff); in visitSRL()
10632 EVT SmallVT = N0.getOperand(0).getValueType(); in visitSRL()
10641 N0.getOperand(0), in visitSRL()
10657 return DAG.getNode(ISD::SRL, SDLoc(N), VT, N0.getOperand(0), N1); in visitSRL()
10665 KnownBits Known = DAG.computeKnownBits(N0.getOperand(0)); in visitSRL()
10683 SDValue Op = N0.getOperand(0); in visitSRL()
10701 N1.getOperand(0).getOpcode() == ISD::AND) { in visitSRL()
10765 SDValue N0 = N->getOperand(0); in visitFunnelShift()
10766 SDValue N1 = N->getOperand(1); in visitFunnelShift()
10767 SDValue N2 = N->getOperand(2); in visitFunnelShift()
10878 SDValue N0 = N->getOperand(0); in visitSHLSAT()
10879 SDValue N1 = N->getOperand(1); in visitSHLSAT()
10916 N = N->getOperand(0).getNode(); in foldABSToABD()
10922 SDValue AbsOp1 = N->getOperand(0); in foldABSToABD()
10929 Op0 = AbsOp1.getOperand(0); in foldABSToABD()
10930 Op1 = AbsOp1.getOperand(1); in foldABSToABD()
10950 VT0 = cast<VTSDNode>(Op0.getOperand(1))->getVT(); in foldABSToABD()
10951 VT1 = cast<VTSDNode>(Op1.getOperand(1))->getVT(); in foldABSToABD()
10953 VT0 = Op0.getOperand(0).getValueType(); in foldABSToABD()
10954 VT1 = Op1.getOperand(0).getValueType(); in foldABSToABD()
10981 SDValue N0 = N->getOperand(0); in visitABS()
11000 EVT ExtVT = cast<VTSDNode>(N0.getOperand(1))->getVT(); in visitABS()
11008 DAG.getNode(ISD::TRUNCATE, DL, ExtVT, N0.getOperand(0)))); in visitABS()
11016 SDValue N0 = N->getOperand(0); in visitBSWAP()
11025 return N0.getOperand(0); in visitBSWAP()
11032 SDValue BSwap = DAG.getNode(ISD::BSWAP, DL, VT, N0.getOperand(0)); in visitBSWAP()
11040 auto *ShAmt = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in visitBSWAP()
11047 SDValue Res = N0.getOperand(0); in visitBSWAP()
11063 auto *ShAmt = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in visitBSWAP()
11066 SDValue NewSwap = DAG.getNode(ISD::BSWAP, DL, VT, N0.getOperand(0)); in visitBSWAP()
11068 return DAG.getNode(InverseShift, DL, VT, NewSwap, N0.getOperand(1)); in visitBSWAP()
11079 SDValue N0 = N->getOperand(0); in visitBITREVERSE()
11088 return N0.getOperand(0); in visitBITREVERSE()
11093 SDValue N0 = N->getOperand(0); in visitCTLZ()
11110 SDValue N0 = N->getOperand(0); in visitCTLZ_ZERO_UNDEF()
11122 SDValue N0 = N->getOperand(0); in visitCTTZ()
11139 SDValue N0 = N->getOperand(0); in visitCTTZ_ZERO_UNDEF()
11151 SDValue N0 = N->getOperand(0); in visitCTPOP()
11263 SDValue Cond = N->getOperand(0); in foldSelectOfConstantsUsingSra()
11264 SDValue C1 = N->getOperand(1); in foldSelectOfConstantsUsingSra()
11265 SDValue C2 = N->getOperand(2); in foldSelectOfConstantsUsingSra()
11271 VT != Cond.getOperand(0).getValueType()) in foldSelectOfConstantsUsingSra()
11276 SDValue X = Cond.getOperand(0); in foldSelectOfConstantsUsingSra()
11277 SDValue CondC = Cond.getOperand(1); in foldSelectOfConstantsUsingSra()
11278 ISD::CondCode CC = cast<CondCodeSDNode>(Cond.getOperand(2))->get(); in foldSelectOfConstantsUsingSra()
11307 ISD::CondCode CC = cast<CondCodeSDNode>(Cond.getOperand(2))->get(); in shouldConvertSelectOfConstantsToMath()
11308 if (CC == ISD::SETLT && isNullOrNullSplat(Cond.getOperand(1))) in shouldConvertSelectOfConstantsToMath()
11310 if (CC == ISD::SETGT && isAllOnesOrAllOnesSplat(Cond.getOperand(1))) in shouldConvertSelectOfConstantsToMath()
11317 SDValue Cond = N->getOperand(0); in foldSelectOfConstants()
11318 SDValue N1 = N->getOperand(1); in foldSelectOfConstants()
11319 SDValue N2 = N->getOperand(2); in foldSelectOfConstants()
11438 SDValue Cond = N->getOperand(0); in foldBoolSelectToLogic()
11439 SDValue T = N->getOperand(1), F = N->getOperand(2); in foldBoolSelectToLogic()
11470 SDValue N0 = N->getOperand(0); in foldVSelectToSignBitSplatMask()
11471 SDValue N1 = N->getOperand(1); in foldVSelectToSignBitSplatMask()
11472 SDValue N2 = N->getOperand(2); in foldVSelectToSignBitSplatMask()
11477 SDValue Cond0 = N0.getOperand(0); in foldVSelectToSignBitSplatMask()
11478 SDValue Cond1 = N0.getOperand(1); in foldVSelectToSignBitSplatMask()
11479 ISD::CondCode CC = cast<CondCodeSDNode>(N0.getOperand(2))->get(); in foldVSelectToSignBitSplatMask()
11528 SDValue N0 = N->getOperand(0); in visitSELECT()
11529 SDValue N1 = N->getOperand(1); in visitSELECT()
11530 SDValue N2 = N->getOperand(2); in visitSELECT()
11570 SDValue Cond0 = N0->getOperand(0); in visitSELECT()
11571 SDValue Cond1 = N0->getOperand(1); in visitSELECT()
11583 SDValue Cond0 = N0->getOperand(0); in visitSELECT()
11584 SDValue Cond1 = N0->getOperand(1); in visitSELECT()
11597 SDValue N1_0 = N1->getOperand(0); in visitSELECT()
11598 SDValue N1_1 = N1->getOperand(1); in visitSELECT()
11599 SDValue N1_2 = N1->getOperand(2); in visitSELECT()
11616 SDValue N2_0 = N2->getOperand(0); in visitSELECT()
11617 SDValue N2_1 = N2->getOperand(1); in visitSELECT()
11618 SDValue N2_2 = N2->getOperand(2); in visitSELECT()
11636 SDValue Cond0 = N0.getOperand(0), Cond1 = N0.getOperand(1); in visitSELECT()
11637 ISD::CondCode CC = cast<CondCodeSDNode>(N0.getOperand(2))->get(); in visitSELECT()
11655 N2.getOpcode() == ISD::ADD && Cond0 == N2.getOperand(0)) { in visitSELECT()
11656 auto *C = dyn_cast<ConstantSDNode>(N2.getOperand(1)); in visitSELECT()
11672 SDValue UAO = DAG.getNode(ISD::UADDO, DL, VTs, Cond0, N2.getOperand(1)); in visitSELECT()
11684 N2, N0.getOperand(2)); in visitSELECT()
11707 SDValue Cond = N->getOperand(0); in ConvertSelectToConcatVector()
11708 SDValue LHS = N->getOperand(1); in ConvertSelectToConcatVector()
11709 SDValue RHS = N->getOperand(2); in ConvertSelectToConcatVector()
11728 if (Cond->getOperand(i)->isUndef()) in ConvertSelectToConcatVector()
11732 BottomHalf = cast<ConstantSDNode>(Cond.getOperand(i)); in ConvertSelectToConcatVector()
11733 else if (Cond->getOperand(i).getNode() != BottomHalf) in ConvertSelectToConcatVector()
11740 if (Cond->getOperand(i)->isUndef()) in ConvertSelectToConcatVector()
11744 TopHalf = cast<ConstantSDNode>(Cond.getOperand(i)); in ConvertSelectToConcatVector()
11745 else if (Cond->getOperand(i).getNode() != TopHalf) in ConvertSelectToConcatVector()
11754 BottomHalf->isZero() ? RHS->getOperand(0) : LHS->getOperand(0), in ConvertSelectToConcatVector()
11755 TopHalf->isZero() ? RHS->getOperand(1) : LHS->getOperand(1)); in ConvertSelectToConcatVector()
11781 if (SDValue SplatVal = DAG.getSplatValue(Index.getOperand(0)); in refineUniformBase()
11784 Index = Index.getOperand(1); in refineUniformBase()
11787 if (SDValue SplatVal = DAG.getSplatValue(Index.getOperand(1)); in refineUniformBase()
11790 Index = Index.getOperand(0); in refineUniformBase()
11805 Index = Index.getOperand(0); in refineIndexType()
11818 Index = Index.getOperand(0); in refineIndexType()
11957 TLI.canCombineTruncStore(Value.getOperand(0).getValueType(), in visitMSTORE()
11960 Value.getOperand(0).getValueType()); in visitMSTORE()
11961 return DAG.getMaskedStore(Chain, SDLoc(N), Value.getOperand(0), Ptr, in visitMSTORE()
12091 SDValue Cond = N->getOperand(0); in foldVSelectOfConstants()
12092 SDValue N1 = N->getOperand(1); in foldVSelectOfConstants()
12093 SDValue N2 = N->getOperand(2); in foldVSelectOfConstants()
12108 SDValue N1Elt = N1.getOperand(i); in foldVSelectOfConstants()
12109 SDValue N2Elt = N2.getOperand(i); in foldVSelectOfConstants()
12154 SDValue N0 = N->getOperand(0); in visitVSELECT()
12155 SDValue N1 = N->getOperand(1); in visitVSELECT()
12156 SDValue N2 = N->getOperand(2); in visitVSELECT()
12176 SDValue LHS = N0.getOperand(0), RHS = N0.getOperand(1); in visitVSELECT()
12177 ISD::CondCode CC = cast<CondCodeSDNode>(N0.getOperand(2))->get(); in visitVSELECT()
12183 N1 == LHS && N2.getOpcode() == ISD::SUB && N1 == N2.getOperand(1)) in visitVSELECT()
12184 isAbs = ISD::isBuildVectorAllZeros(N2.getOperand(0).getNode()); in visitVSELECT()
12186 N2 == LHS && N1.getOpcode() == ISD::SUB && N2 == N1.getOperand(1)) in visitVSELECT()
12187 isAbs = ISD::isBuildVectorAllZeros(N1.getOperand(0).getNode()); in visitVSELECT()
12254 N1.getOperand(0) == N2.getOperand(1) && in visitVSELECT()
12255 N1.getOperand(1) == N2.getOperand(0)) { in visitVSELECT()
12264 if (LHS == N1.getOperand(0) && RHS == N1.getOperand(1)) in visitVSELECT()
12271 if (RHS == N1.getOperand(0) && LHS == N1.getOperand(1) ) in visitVSELECT()
12295 SDValue OpLHS = Other.getOperand(0), OpRHS = Other.getOperand(1); in visitVSELECT()
12345 Other.getOperand(0).getOpcode() == ISD::SUB && in visitVSELECT()
12347 SDValue OpLHS = Other.getOperand(0).getOperand(0); in visitVSELECT()
12348 SDValue OpRHS = Other.getOperand(0).getOperand(1); in visitVSELECT()
12357 SDValue OpLHS = Other.getOperand(0), OpRHS = Other.getOperand(1); in visitVSELECT()
12442 SDValue N0 = N->getOperand(0); in visitSELECT_CC()
12443 SDValue N1 = N->getOperand(1); in visitSELECT_CC()
12444 SDValue N2 = N->getOperand(2); in visitSELECT_CC()
12445 SDValue N3 = N->getOperand(3); in visitSELECT_CC()
12446 SDValue N4 = N->getOperand(4); in visitSELECT_CC()
12476 ISD::SELECT_CC, SDLoc(N), N2.getValueType(), SCC.getOperand(0), in visitSELECT_CC()
12477 SCC.getOperand(1), N2, N3, SCC.getOperand(2)); in visitSELECT_CC()
12498 ISD::CondCode Cond = cast<CondCodeSDNode>(N->getOperand(2))->get(); in visitSETCC()
12500 SDValue N0 = N->getOperand(0), N1 = N->getOperand(1); in visitSETCC()
12536 A.getOperand(0) == B.getOperand(0); in visitSETCC()
12540 B.getOperand(0) == A; in visitSETCC()
12575 IsRotate ? std::nullopt : GetAPIntValue(AndOrOp.getOperand(1)); in visitSETCC()
12577 GetAPIntValue(ShiftOrRotate.getOperand(1)); in visitSETCC()
12602 DAG.getNode(NewShiftOpc, DL, OpVT, ShiftOrRotate.getOperand(0), in visitSETCC()
12603 ShiftOrRotate.getOperand(1)); in visitSETCC()
12614 DAG.getNode(ISD::AND, DL, OpVT, ShiftOrRotate.getOperand(0), in visitSETCC()
12617 NewAndOrOp = ShiftOrRotate.getOperand(0); in visitSETCC()
12629 SDValue LHS = N->getOperand(0); in visitSETCCCARRY()
12630 SDValue RHS = N->getOperand(1); in visitSETCCCARRY()
12631 SDValue Carry = N->getOperand(2); in visitSETCCCARRY()
12632 SDValue Cond = N->getOperand(3); in visitSETCCCARRY()
12679 SDValue N0 = N->getOperand(0); in tryToFoldExtendSelectLoad()
12691 SDValue Op1 = N0->getOperand(1); in tryToFoldExtendSelectLoad()
12692 SDValue Op2 = N0->getOperand(2); in tryToFoldExtendSelectLoad()
12714 return DAG.getSelect(DL, VT, N0->getOperand(0), Ext1, Ext2); in tryToFoldExtendSelectLoad()
12726 SDValue N0 = N->getOperand(0); in tryToFoldExtendOfConstant()
12743 SDValue Op1 = N0->getOperand(1); in tryToFoldExtendOfConstant()
12744 SDValue Op2 = N0->getOperand(2); in tryToFoldExtendOfConstant()
12759 return DAG.getSelect(DL, VT, N0->getOperand(0), in tryToFoldExtendOfConstant()
12780 SDValue Op = N0.getOperand(i); in tryToFoldExtendOfConstant()
12821 ISD::CondCode CC = cast<CondCodeSDNode>(User->getOperand(2))->get(); in ExtendUsesToFormExtLoad()
12827 SDValue UseOp = User->getOperand(i); in ExtendUsesToFormExtLoad()
12874 SDValue SOp = SetCC->getOperand(j); in ExtendSetCCUses()
12881 Ops.push_back(SetCC->getOperand(2)); in ExtendSetCCUses()
12888 SDValue N0 = N->getOperand(0); in CombineExtLoad()
12990 EVT OrigVT = N->getOperand(0).getValueType(); in CombineZExtLogicopShiftLoad()
12995 SDValue N0 = N->getOperand(0); in CombineZExtLogicopShiftLoad()
12997 N0.getOperand(1).getOpcode() != ISD::Constant || in CombineZExtLogicopShiftLoad()
13002 SDValue N1 = N0->getOperand(0); in CombineZExtLogicopShiftLoad()
13004 N1.getOperand(1).getOpcode() != ISD::Constant || in CombineZExtLogicopShiftLoad()
13009 if (!isa<LoadSDNode>(N1.getOperand(0))) in CombineZExtLogicopShiftLoad()
13011 LoadSDNode *Load = cast<LoadSDNode>(N1.getOperand(0)); in CombineZExtLogicopShiftLoad()
13027 if (!ExtendUsesToFormExtLoad(VT, N1.getNode(), N1.getOperand(0), in CombineZExtLogicopShiftLoad()
13038 N1.getOperand(1)); in CombineZExtLogicopShiftLoad()
13045 ExtendSetCCUses(SetCCs, N1.getOperand(0), ExtLoad, ISD::ZERO_EXTEND); in CombineZExtLogicopShiftLoad()
13079 SDValue VSel = Cast->getOperand(0); in matchVSelectOpSizesWithSetCC()
13081 VSel.getOperand(0).getOpcode() != ISD::SETCC) in matchVSelectOpSizesWithSetCC()
13085 SDValue SetCC = VSel.getOperand(0); in matchVSelectOpSizesWithSetCC()
13086 EVT SetCCVT = getSetCCResultType(SetCC.getOperand(0).getValueType()); in matchVSelectOpSizesWithSetCC()
13091 SDValue A = VSel.getOperand(1); in matchVSelectOpSizesWithSetCC()
13092 SDValue B = VSel.getOperand(2); in matchVSelectOpSizesWithSetCC()
13097 CastA = DAG.getNode(CastOpcode, DL, VT, A, Cast->getOperand(1)); in matchVSelectOpSizesWithSetCC()
13098 CastB = DAG.getNode(CastOpcode, DL, VT, B, Cast->getOperand(1)); in matchVSelectOpSizesWithSetCC()
13215 SDValue SetCC = N->getOperand(0); in foldExtendedSignBitTest()
13220 SDValue X = SetCC.getOperand(0); in foldExtendedSignBitTest()
13221 SDValue Ones = SetCC.getOperand(1); in foldExtendedSignBitTest()
13222 ISD::CondCode CC = cast<CondCodeSDNode>(SetCC.getOperand(2))->get(); in foldExtendedSignBitTest()
13247 SDValue N0 = N->getOperand(0); in foldSextSetcc()
13251 SDValue N00 = N0.getOperand(0); in foldSextSetcc()
13252 SDValue N01 = N0.getOperand(1); in foldSextSetcc()
13253 ISD::CondCode CC = cast<CondCodeSDNode>(N0.getOperand(2))->get(); in foldSextSetcc()
13372 SDValue N0 = N->getOperand(0); in visitSIGN_EXTEND()
13390 return DAG.getNode(ISD::SIGN_EXTEND, DL, VT, N0.getOperand(0)); in visitSIGN_EXTEND()
13397 N0.getOperand(0)); in visitSIGN_EXTEND()
13401 SDValue N00 = N0.getOperand(0); in visitSIGN_EXTEND()
13402 EVT ExtVT = cast<VTSDNode>(N0->getOperand(1))->getVT(); in visitSIGN_EXTEND()
13414 SDNode *oye = N0.getOperand(0).getNode(); in visitSIGN_EXTEND()
13425 SDValue Op = N0.getOperand(0); in visitSIGN_EXTEND()
13484 isa<LoadSDNode>(N0.getOperand(0)) && in visitSIGN_EXTEND()
13485 N0.getOperand(1).getOpcode() == ISD::Constant && in visitSIGN_EXTEND()
13487 LoadSDNode *LN00 = cast<LoadSDNode>(N0.getOperand(0)); in visitSIGN_EXTEND()
13492 bool DoXform = ExtendUsesToFormExtLoad(VT, N0.getNode(), N0.getOperand(0), in visitSIGN_EXTEND()
13502 ExtendSetCCUses(SetCCs, N0.getOperand(0), ExtLoad, ISD::SIGN_EXTEND); in visitSIGN_EXTEND()
13545 isNullOrNullSplat(N0.getOperand(0)) && in visitSIGN_EXTEND()
13546 N0.getOperand(1).getOpcode() == ISD::ZERO_EXTEND && in visitSIGN_EXTEND()
13548 SDValue Zext = DAG.getZExtOrTrunc(N0.getOperand(1).getOperand(0), DL, VT); in visitSIGN_EXTEND()
13554 isAllOnesOrAllOnesSplat(N0.getOperand(1)) && in visitSIGN_EXTEND()
13555 N0.getOperand(0).getOpcode() == ISD::ZERO_EXTEND && in visitSIGN_EXTEND()
13557 SDValue Zext = DAG.getZExtOrTrunc(N0.getOperand(0).getOperand(0), DL, VT); in visitSIGN_EXTEND()
13580 SDValue Zext = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, N0.getOperand(0)); in visitSIGN_EXTEND()
13597 SDValue CtPop = Extend->getOperand(0); in widenCtPop()
13609 SDValue NewZext = DAG.getZExtOrTrunc(CtPop.getOperand(0), DL, VT); in widenCtPop()
13622 SDValue Abs = Extend->getOperand(0); in widenAbs()
13635 DAG.getNode(ISD::SIGN_EXTEND, SDLoc(Abs), LegalVT, Abs.getOperand(0)); in widenAbs()
13641 SDValue N0 = N->getOperand(0); in visitZERO_EXTEND()
13659 return DAG.getNode(ISD::ZERO_EXTEND, DL, VT, N0.getOperand(0)); in visitZERO_EXTEND()
13666 N0.getOperand(0)); in visitZERO_EXTEND()
13694 SDNode *oye = N0.getOperand(0).getNode(); in visitZERO_EXTEND()
13703 EVT SrcVT = N0.getOperand(0).getValueType(); in visitZERO_EXTEND()
13711 SDValue Op = N0.getOperand(0); in visitZERO_EXTEND()
13722 SDValue Op = DAG.getAnyExtOrTrunc(N0.getOperand(0), DL, VT); in visitZERO_EXTEND()
13735 N0.getOperand(0).getOpcode() == ISD::TRUNCATE && in visitZERO_EXTEND()
13736 N0.getOperand(1).getOpcode() == ISD::Constant && in visitZERO_EXTEND()
13737 (!TLI.isTruncateFree(N0.getOperand(0).getOperand(0), N0.getValueType()) || in visitZERO_EXTEND()
13739 SDValue X = N0.getOperand(0).getOperand(0); in visitZERO_EXTEND()
13767 isa<LoadSDNode>(N0.getOperand(0)) && in visitZERO_EXTEND()
13768 N0.getOperand(1).getOpcode() == ISD::Constant && in visitZERO_EXTEND()
13770 LoadSDNode *LN00 = cast<LoadSDNode>(N0.getOperand(0)); in visitZERO_EXTEND()
13778 auto *AndC = cast<ConstantSDNode>(N0.getOperand(1)); in visitZERO_EXTEND()
13786 DoXform = ExtendUsesToFormExtLoad(VT, N0.getNode(), N0.getOperand(0), in visitZERO_EXTEND()
13796 ExtendSetCCUses(SetCCs, N0.getOperand(0), ExtLoad, ISD::ZERO_EXTEND); in visitZERO_EXTEND()
13838 EVT N00VT = N0.getOperand(0).getValueType(); in visitZERO_EXTEND()
13849 SDValue VSetCC = DAG.getNode(ISD::SETCC, DL, VT, N0.getOperand(0), in visitZERO_EXTEND()
13850 N0.getOperand(1), N0.getOperand(2)); in visitZERO_EXTEND()
13859 DAG.getNode(ISD::SETCC, DL, MatchingVectorType, N0.getOperand(0), in visitZERO_EXTEND()
13860 N0.getOperand(1), N0.getOperand(2)); in visitZERO_EXTEND()
13867 EVT N00VT = N0.getOperand(0).getValueType(); in visitZERO_EXTEND()
13869 DL, N0.getOperand(0), N0.getOperand(1), in visitZERO_EXTEND()
13872 cast<CondCodeSDNode>(N0.getOperand(2))->get(), true)) in visitZERO_EXTEND()
13879 SDValue ShVal = N0.getOperand(0); in visitZERO_EXTEND()
13880 SDValue ShAmt = N0.getOperand(1); in visitZERO_EXTEND()
13888 ShVal.getOperand(0).getValueSizeInBits(); in visitZERO_EXTEND()
13919 SDValue N0 = N->getOperand(0); in visitANY_EXTEND()
13935 return DAG.getNode(N0.getOpcode(), SDLoc(N), VT, N0.getOperand(0)); in visitANY_EXTEND()
13943 return DAG.getNode(N0.getOpcode(), SDLoc(N), VT, N0.getOperand(0)); in visitANY_EXTEND()
13949 SDNode *oye = N0.getOperand(0).getNode(); in visitANY_EXTEND()
13961 return DAG.getAnyExtOrTrunc(N0.getOperand(0), SDLoc(N), VT); in visitANY_EXTEND()
13966 N0.getOperand(0).getOpcode() == ISD::TRUNCATE && in visitANY_EXTEND()
13967 N0.getOperand(1).getOpcode() == ISD::Constant && in visitANY_EXTEND()
13968 !TLI.isTruncateFree(N0.getOperand(0).getOperand(0), N0.getValueType())) { in visitANY_EXTEND()
13970 SDValue X = DAG.getAnyExtOrTrunc(N0.getOperand(0).getOperand(0), DL, VT); in visitANY_EXTEND()
13971 SDValue Y = DAG.getNode(ISD::ANY_EXTEND, DL, VT, N0.getOperand(1)); in visitANY_EXTEND()
14043 EVT N00VT = N0.getOperand(0).getValueType(); in visitANY_EXTEND()
14053 return DAG.getSetCC(SDLoc(N), VT, N0.getOperand(0), in visitANY_EXTEND()
14054 N0.getOperand(1), in visitANY_EXTEND()
14055 cast<CondCodeSDNode>(N0.getOperand(2))->get()); in visitANY_EXTEND()
14062 DAG.getSetCC(SDLoc(N), MatchingVectorType, N0.getOperand(0), in visitANY_EXTEND()
14063 N0.getOperand(1), in visitANY_EXTEND()
14064 cast<CondCodeSDNode>(N0.getOperand(2))->get()); in visitANY_EXTEND()
14071 DL, N0.getOperand(0), N0.getOperand(1), DAG.getConstant(1, DL, VT), in visitANY_EXTEND()
14073 cast<CondCodeSDNode>(N0.getOperand(2))->get(), true)) in visitANY_EXTEND()
14088 SDValue N0 = N->getOperand(0); in visitAssertExt()
14089 SDValue N1 = N->getOperand(1); in visitAssertExt()
14094 AssertVT == cast<VTSDNode>(N0.getOperand(1))->getVT()) in visitAssertExt()
14098 N0.getOperand(0).getOpcode() == Opcode) { in visitAssertExt()
14105 SDValue BigA = N0.getOperand(0); in visitAssertExt()
14106 EVT BigA_AssertVT = cast<VTSDNode>(BigA.getOperand(1))->getVT(); in visitAssertExt()
14110 BigA.getOperand(0), MinAssertVTVal); in visitAssertExt()
14118 N0.getOperand(0).getOpcode() == ISD::AssertSext && in visitAssertExt()
14120 SDValue BigA = N0.getOperand(0); in visitAssertExt()
14121 EVT BigA_AssertVT = cast<VTSDNode>(BigA.getOperand(1))->getVT(); in visitAssertExt()
14125 BigA.getOperand(0), N1); in visitAssertExt()
14137 SDValue N0 = N->getOperand(0); in visitAssertAlign()
14142 return DAG.getAssertAlign(DL, N0.getOperand(0), in visitAssertAlign()
14154 SDValue LHS = N0.getOperand(0); in visitAssertAlign()
14155 SDValue RHS = N0.getOperand(1); in visitAssertAlign()
14179 SDValue N0 = N->getOperand(0); in reduceLoadWidth()
14200 ExtVT = cast<VTSDNode>(N->getOperand(1))->getVT(); in reduceLoadWidth()
14209 auto *N1C = dyn_cast<ConstantSDNode>(N->getOperand(1)); in reduceLoadWidth()
14231 auto AndC = dyn_cast<ConstantSDNode>(N->getOperand(1)); in reduceLoadWidth()
14266 auto *LN = dyn_cast<LoadSDNode>(SRL.getOperand(0)); in reduceLoadWidth()
14267 auto *SRL1C = dyn_cast<ConstantSDNode>(SRL.getOperand(1)); in reduceLoadWidth()
14303 isa<ConstantSDNode>(Mask->getOperand(1))) { in reduceLoadWidth()
14315 N0 = SRL.getOperand(0); in reduceLoadWidth()
14326 if (ConstantSDNode *N01 = dyn_cast<ConstantSDNode>(N0.getOperand(1))) { in reduceLoadWidth()
14328 N0 = N0.getOperand(0); in reduceLoadWidth()
14412 SDValue N0 = N->getOperand(0); in visitSIGN_EXTEND_INREG()
14413 SDValue N1 = N->getOperand(1); in visitSIGN_EXTEND_INREG()
14433 ExtVT.bitsLT(cast<VTSDNode>(N0.getOperand(1))->getVT())) in visitSIGN_EXTEND_INREG()
14434 return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT, N0.getOperand(0), in visitSIGN_EXTEND_INREG()
14442 SDValue N00 = N0.getOperand(0); in visitSIGN_EXTEND_INREG()
14454 SDValue N00 = N0.getOperand(0); in visitSIGN_EXTEND_INREG()
14471 SDValue N00 = N0.getOperand(0); in visitSIGN_EXTEND_INREG()
14495 if (auto *ShAmt = dyn_cast<ConstantSDNode>(N0.getOperand(1))) in visitSIGN_EXTEND_INREG()
14499 unsigned InSignBits = DAG.ComputeNumSignBits(N0.getOperand(0)); in visitSIGN_EXTEND_INREG()
14501 return DAG.getNode(ISD::SRA, SDLoc(N), VT, N0.getOperand(0), in visitSIGN_EXTEND_INREG()
14502 N0.getOperand(1)); in visitSIGN_EXTEND_INREG()
14580 if (SDValue BSwap = MatchBSwapHWordLow(N0.getNode(), N0.getOperand(0), in visitSIGN_EXTEND_INREG()
14581 N0.getOperand(1), false)) in visitSIGN_EXTEND_INREG()
14590 ISD::isExtOpcode(N0.getOperand(0).getOpcode())) { in visitSIGN_EXTEND_INREG()
14591 SDValue InnerExt = N0.getOperand(0); in visitSIGN_EXTEND_INREG()
14593 SDValue Extendee = InnerExt->getOperand(0); in visitSIGN_EXTEND_INREG()
14601 N0.getOperand(1)); in visitSIGN_EXTEND_INREG()
14615 SDValue Src = N->getOperand(0); in foldExtendVectorInregToExtendOfSubvector()
14631 Src = Src.getOperand(0); in foldExtendVectorInregToExtendOfSubvector()
14642 SDValue N0 = N->getOperand(0); in visitEXTEND_VECTOR_INREG()
14667 SDValue N0 = N->getOperand(0); in visitTRUNCATE()
14678 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0.getOperand(0)); in visitTRUNCATE()
14689 if (N0.getOperand(0).getValueType().bitsLT(VT)) in visitTRUNCATE()
14690 return DAG.getNode(N0.getOpcode(), SDLoc(N), VT, N0.getOperand(0)); in visitTRUNCATE()
14692 if (N0.getOperand(0).getValueType().bitsGT(VT)) in visitTRUNCATE()
14693 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0.getOperand(0)); in visitTRUNCATE()
14696 return N0.getOperand(0); in visitTRUNCATE()
14703 SDValue X = N0.getOperand(0); in visitTRUNCATE()
14704 SDValue ExtVal = N0.getOperand(1); in visitTRUNCATE()
14728 EVT VecTy = N0.getOperand(0).getValueType(); in visitTRUNCATE()
14739 SDValue EltNo = N0->getOperand(1); in visitTRUNCATE()
14746 DAG.getBitcast(NVT, N0.getOperand(0)), in visitTRUNCATE()
14756 SDValue Cond = N0.getOperand(0); in visitTRUNCATE()
14757 SDValue TruncOp0 = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(1)); in visitTRUNCATE()
14758 SDValue TruncOp1 = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(2)); in visitTRUNCATE()
14767 SDValue Amt = N0.getOperand(1); in visitTRUNCATE()
14774 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(0)); in visitTRUNCATE()
14812 VT, DL, DAG.getNode(ISD::TRUNCATE, DL, SVT, N0->getOperand(0))); in visitTRUNCATE()
14821 N0.getOperand(0).getOpcode() == ISD::BUILD_VECTOR && in visitTRUNCATE()
14822 N0.getOperand(0).hasOneUse()) { in visitTRUNCATE()
14823 SDValue BuildVect = N0.getOperand(0); in visitTRUNCATE()
14839 Opnds.push_back(BuildVect.getOperand(i)); in visitTRUNCATE()
14874 SDValue X = N0.getOperand(i); in visitTRUNCATE()
14913 SDValue VecSrc = N0.getOperand(0); in visitTRUNCATE()
14935 SDValue N00 = N0.getOperand(0); in visitTRUNCATE()
14939 if (N00.getOperand(0)->getValueType(0).getVectorElementType() == in visitTRUNCATE()
14941 return DAG.getNode(ISD::EXTRACT_SUBVECTOR, SDLoc(N0->getOperand(0)), VT, in visitTRUNCATE()
14942 N00.getOperand(0), N0.getOperand(1)); in visitTRUNCATE()
14961 (isConstantOrConstantVector(N0.getOperand(0), true) || in visitTRUNCATE()
14962 isConstantOrConstantVector(N0.getOperand(1), true))) { in visitTRUNCATE()
14968 SDValue NarrowL = DAG.getNode(ISD::TRUNCATE, DL, VT, N0.getOperand(0)); in visitTRUNCATE()
14969 SDValue NarrowR = DAG.getNode(ISD::TRUNCATE, DL, VT, N0.getOperand(1)); in visitTRUNCATE()
14985 SDValue X = DAG.getNode(ISD::TRUNCATE, DL, VT, N0.getOperand(0)); in visitTRUNCATE()
14986 SDValue Y = DAG.getNode(ISD::TRUNCATE, DL, VT, N0.getOperand(1)); in visitTRUNCATE()
14988 return DAG.getNode(N0.getOpcode(), DL, VTs, X, Y, N0.getOperand(2)); in visitTRUNCATE()
14996 N0.getOperand(0).getOpcode() == ISD::ZERO_EXTEND && in visitTRUNCATE()
14997 N0.getOperand(0).getOperand(0).getScalarValueSizeInBits() <= in visitTRUNCATE()
15000 return getTruncatedUSUBSAT(VT, SrcVT, N0.getOperand(0), N0.getOperand(1), in visitTRUNCATE()
15010 SDValue Elt = N->getOperand(i); in getBuildPairElt()
15013 return Elt.getOperand(Elt.getResNo()).getNode(); in getBuildPairElt()
15059 SDValue N0 = N->getOperand(0); in foldBitcastedFPLogic()
15096 if (Op.getOpcode() == ISD::BITCAST && Op.getOperand(0).getValueType() == VT) in foldBitcastedFPLogic()
15106 SDValue LogicOp0 = N0.getOperand(0); in foldBitcastedFPLogic()
15107 ConstantSDNode *LogicOp1 = isConstOrConstSplat(N0.getOperand(1), true); in foldBitcastedFPLogic()
15122 SDValue N0 = N->getOperand(0); in visitBITCAST()
15161 return DAG.getBitcast(VT, N0.getOperand(0)); in visitBITCAST()
15166 !TLI.isTypeLegal(N0.getOperand(0).getValueType())) { in visitBITCAST()
15169 V.getOperand(0).getValueType() == VT) || in visitBITCAST()
15173 if (IsFreeBitcast(N0.getOperand(0)) && IsFreeBitcast(N0.getOperand(1))) in visitBITCAST()
15175 DAG.getBitcast(VT, N0.getOperand(0)), in visitBITCAST()
15176 DAG.getBitcast(VT, N0.getOperand(1))); in visitBITCAST()
15223 SDValue NewConv = DAG.getBitcast(VT, N0.getOperand(0)); in visitBITCAST()
15271 isa<ConstantFPSDNode>(N0.getOperand(0)) && VT.isInteger() && in visitBITCAST()
15273 unsigned OrigXWidth = N0.getOperand(1).getValueSizeInBits(); in visitBITCAST()
15276 SDValue X = DAG.getBitcast(IntXVT, N0.getOperand(1)); in visitBITCAST()
15299 SDValue Cst = DAG.getBitcast(VT, N0.getOperand(0)); in visitBITCAST()
15301 SDValue X = DAG.getBitcast(VT, N0.getOperand(1)); in visitBITCAST()
15324 SDValue Cst = DAG.getBitcast(VT, N0.getOperand(0)); in visitBITCAST()
15352 Op.getOperand(0).getValueType() == VT) in visitBITCAST()
15353 return SDValue(Op.getOperand(0)); in visitBITCAST()
15362 SDValue SV0 = PeekThroughBitcast(N0->getOperand(0)); in visitBITCAST()
15363 SDValue SV1 = PeekThroughBitcast(N0->getOperand(1)); in visitBITCAST()
15389 SDValue N0 = N->getOperand(0); in visitFREEZE()
15437 FrozenMaybePoisonOperand.getOperand(0) == FrozenMaybePoisonOperand) { in visitFREEZE()
15451 N0 = N->getOperand(0); in visitFREEZE()
15562 SDValue N0 = N->getOperand(0); in visitFADDForFMACombine()
15563 SDValue N1 = N->getOperand(1); in visitFADDForFMACombine()
15627 return matcher.getNode(PreferredFusedOpcode, SL, VT, N0.getOperand(0), in visitFADDForFMACombine()
15628 N0.getOperand(1), N1); in visitFADDForFMACombine()
15634 return matcher.getNode(PreferredFusedOpcode, SL, VT, N1.getOperand(0), in visitFADDForFMACombine()
15635 N1.getOperand(1), N0); in visitFADDForFMACombine()
15658 SDValue FMul = TmpFMA->getOperand(2); in visitFADDForFMACombine()
15660 SDValue C = FMul.getOperand(0); in visitFADDForFMACombine()
15661 SDValue D = FMul.getOperand(1); in visitFADDForFMACombine()
15669 TmpFMA = TmpFMA->getOperand(2); in visitFADDForFMACombine()
15677 SDValue N00 = N0.getOperand(0); in visitFADDForFMACombine()
15683 matcher.getNode(ISD::FP_EXTEND, SL, VT, N00.getOperand(0)), in visitFADDForFMACombine()
15684 matcher.getNode(ISD::FP_EXTEND, SL, VT, N00.getOperand(1)), N1); in visitFADDForFMACombine()
15691 SDValue N10 = N1.getOperand(0); in visitFADDForFMACombine()
15697 matcher.getNode(ISD::FP_EXTEND, SL, VT, N10.getOperand(0)), in visitFADDForFMACombine()
15698 matcher.getNode(ISD::FP_EXTEND, SL, VT, N10.getOperand(1)), N0); in visitFADDForFMACombine()
15715 SDValue N02 = N0.getOperand(2); in visitFADDForFMACombine()
15717 SDValue N020 = N02.getOperand(0); in visitFADDForFMACombine()
15721 return FoldFAddFMAFPExtFMul(N0.getOperand(0), N0.getOperand(1), in visitFADDForFMACombine()
15722 N020.getOperand(0), N020.getOperand(1), in visitFADDForFMACombine()
15744 SDValue N00 = N0.getOperand(0); in visitFADDForFMACombine()
15746 SDValue N002 = N00.getOperand(2); in visitFADDForFMACombine()
15750 return FoldFAddFPExtFMAFMul(N00.getOperand(0), N00.getOperand(1), in visitFADDForFMACombine()
15751 N002.getOperand(0), N002.getOperand(1), in visitFADDForFMACombine()
15760 SDValue N12 = N1.getOperand(2); in visitFADDForFMACombine()
15762 SDValue N120 = N12.getOperand(0); in visitFADDForFMACombine()
15766 return FoldFAddFMAFPExtFMul(N1.getOperand(0), N1.getOperand(1), in visitFADDForFMACombine()
15767 N120.getOperand(0), N120.getOperand(1), in visitFADDForFMACombine()
15779 SDValue N10 = N1.getOperand(0); in visitFADDForFMACombine()
15781 SDValue N102 = N10.getOperand(2); in visitFADDForFMACombine()
15785 return FoldFAddFPExtFMAFMul(N10.getOperand(0), N10.getOperand(1), in visitFADDForFMACombine()
15786 N102.getOperand(0), N102.getOperand(1), in visitFADDForFMACombine()
15799 SDValue N0 = N->getOperand(0); in visitFSUBForFMACombine()
15800 SDValue N1 = N->getOperand(1); in visitFSUBForFMACombine()
15849 return matcher.getNode(PreferredFusedOpcode, SL, VT, XY.getOperand(0), in visitFSUBForFMACombine()
15850 XY.getOperand(1), in visitFSUBForFMACombine()
15862 matcher.getNode(ISD::FNEG, SL, VT, YZ.getOperand(0)), in visitFSUBForFMACombine()
15863 YZ.getOperand(1), X); in visitFSUBForFMACombine()
15888 if (matcher.match(N0, ISD::FNEG) && isContractableFMUL(N0.getOperand(0)) && in visitFSUBForFMACombine()
15889 (Aggressive || (N0->hasOneUse() && N0.getOperand(0).hasOneUse()))) { in visitFSUBForFMACombine()
15890 SDValue N00 = N0.getOperand(0).getOperand(0); in visitFSUBForFMACombine()
15891 SDValue N01 = N0.getOperand(0).getOperand(1); in visitFSUBForFMACombine()
15902 SDValue N00 = N0.getOperand(0); in visitFSUBForFMACombine()
15908 matcher.getNode(ISD::FP_EXTEND, SL, VT, N00.getOperand(0)), in visitFSUBForFMACombine()
15909 matcher.getNode(ISD::FP_EXTEND, SL, VT, N00.getOperand(1)), in visitFSUBForFMACombine()
15918 SDValue N10 = N1.getOperand(0); in visitFSUBForFMACombine()
15926 matcher.getNode(ISD::FP_EXTEND, SL, VT, N10.getOperand(0))), in visitFSUBForFMACombine()
15927 matcher.getNode(ISD::FP_EXTEND, SL, VT, N10.getOperand(1)), N0); in visitFSUBForFMACombine()
15938 SDValue N00 = N0.getOperand(0); in visitFSUBForFMACombine()
15940 SDValue N000 = N00.getOperand(0); in visitFSUBForFMACombine()
15948 matcher.getNode(ISD::FP_EXTEND, SL, VT, N000.getOperand(0)), in visitFSUBForFMACombine()
15949 matcher.getNode(ISD::FP_EXTEND, SL, VT, N000.getOperand(1)), in visitFSUBForFMACombine()
15962 SDValue N00 = N0.getOperand(0); in visitFSUBForFMACombine()
15964 SDValue N000 = N00.getOperand(0); in visitFSUBForFMACombine()
15972 matcher.getNode(ISD::FP_EXTEND, SL, VT, N000.getOperand(0)), in visitFSUBForFMACombine()
15973 matcher.getNode(ISD::FP_EXTEND, SL, VT, N000.getOperand(1)), in visitFSUBForFMACombine()
15998 isContractableAndReassociableFMUL(N0.getOperand(2)) && in visitFSUBForFMACombine()
15999 N0->hasOneUse() && N0.getOperand(2)->hasOneUse()) { in visitFSUBForFMACombine()
16001 PreferredFusedOpcode, SL, VT, N0.getOperand(0), N0.getOperand(1), in visitFSUBForFMACombine()
16003 N0.getOperand(2).getOperand(0), in visitFSUBForFMACombine()
16004 N0.getOperand(2).getOperand(1), in visitFSUBForFMACombine()
16011 isContractableAndReassociableFMUL(N1.getOperand(2)) && in visitFSUBForFMACombine()
16013 SDValue N20 = N1.getOperand(2).getOperand(0); in visitFSUBForFMACombine()
16014 SDValue N21 = N1.getOperand(2).getOperand(1); in visitFSUBForFMACombine()
16017 matcher.getNode(ISD::FNEG, SL, VT, N1.getOperand(0)), in visitFSUBForFMACombine()
16018 N1.getOperand(1), in visitFSUBForFMACombine()
16026 SDValue N02 = N0.getOperand(2); in visitFSUBForFMACombine()
16028 SDValue N020 = N02.getOperand(0); in visitFSUBForFMACombine()
16033 PreferredFusedOpcode, SL, VT, N0.getOperand(0), N0.getOperand(1), in visitFSUBForFMACombine()
16036 matcher.getNode(ISD::FP_EXTEND, SL, VT, N020.getOperand(0)), in visitFSUBForFMACombine()
16037 matcher.getNode(ISD::FP_EXTEND, SL, VT, N020.getOperand(1)), in visitFSUBForFMACombine()
16050 SDValue N00 = N0.getOperand(0); in visitFSUBForFMACombine()
16052 SDValue N002 = N00.getOperand(2); in visitFSUBForFMACombine()
16058 matcher.getNode(ISD::FP_EXTEND, SL, VT, N00.getOperand(0)), in visitFSUBForFMACombine()
16059 matcher.getNode(ISD::FP_EXTEND, SL, VT, N00.getOperand(1)), in visitFSUBForFMACombine()
16062 matcher.getNode(ISD::FP_EXTEND, SL, VT, N002.getOperand(0)), in visitFSUBForFMACombine()
16063 matcher.getNode(ISD::FP_EXTEND, SL, VT, N002.getOperand(1)), in visitFSUBForFMACombine()
16071 if (isFusedOp(N1) && matcher.match(N1.getOperand(2), ISD::FP_EXTEND) && in visitFSUBForFMACombine()
16073 SDValue N120 = N1.getOperand(2).getOperand(0); in visitFSUBForFMACombine()
16077 SDValue N1200 = N120.getOperand(0); in visitFSUBForFMACombine()
16078 SDValue N1201 = N120.getOperand(1); in visitFSUBForFMACombine()
16081 matcher.getNode(ISD::FNEG, SL, VT, N1.getOperand(0)), in visitFSUBForFMACombine()
16082 N1.getOperand(1), in visitFSUBForFMACombine()
16097 if (matcher.match(N1, ISD::FP_EXTEND) && isFusedOp(N1.getOperand(0))) { in visitFSUBForFMACombine()
16098 SDValue CvtSrc = N1.getOperand(0); in visitFSUBForFMACombine()
16099 SDValue N100 = CvtSrc.getOperand(0); in visitFSUBForFMACombine()
16100 SDValue N101 = CvtSrc.getOperand(1); in visitFSUBForFMACombine()
16101 SDValue N102 = CvtSrc.getOperand(2); in visitFSUBForFMACombine()
16105 SDValue N1020 = N102.getOperand(0); in visitFSUBForFMACombine()
16106 SDValue N1021 = N102.getOperand(1); in visitFSUBForFMACombine()
16128 SDValue N0 = N->getOperand(0); in visitFMULForFMADistributiveCombine()
16129 SDValue N1 = N->getOperand(1); in visitFMULForFMADistributiveCombine()
16166 if (auto *C = isConstOrConstSplatFP(X.getOperand(1), true)) { in visitFMULForFMADistributiveCombine()
16168 return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, in visitFMULForFMADistributiveCombine()
16171 return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, in visitFMULForFMADistributiveCombine()
16189 if (auto *C0 = isConstOrConstSplatFP(X.getOperand(0), true)) { in visitFMULForFMADistributiveCombine()
16192 DAG.getNode(ISD::FNEG, SL, VT, X.getOperand(1)), Y, in visitFMULForFMADistributiveCombine()
16196 DAG.getNode(ISD::FNEG, SL, VT, X.getOperand(1)), Y, in visitFMULForFMADistributiveCombine()
16199 if (auto *C1 = isConstOrConstSplatFP(X.getOperand(1), true)) { in visitFMULForFMADistributiveCombine()
16201 return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, in visitFMULForFMADistributiveCombine()
16204 return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, in visitFMULForFMADistributiveCombine()
16232 SDValue N0 = N->getOperand(0); in visitFADD()
16233 SDValue N1 = N->getOperand(1); in visitFADD()
16282 auto *C = isConstOrConstSplatFP(FMul.getOperand(1), true); in visitFADD()
16288 SDValue B = N0.getOperand(0); in visitFADD()
16294 SDValue B = N1.getOperand(0); in visitFADD()
16306 if (N0.getOpcode() == ISD::FNEG && N0.getOperand(0) == N1) in visitFADD()
16310 if (N1.getOpcode() == ISD::FNEG && N1.getOperand(0) == N0) in visitFADD()
16322 DAG.isConstantFPBuildVectorOrConstantFP(N0.getOperand(1))) { in visitFADD()
16323 SDValue NewC = DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(1), N1); in visitFADD()
16324 return DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(0), NewC); in visitFADD()
16333 DAG.isConstantFPBuildVectorOrConstantFP(N0.getOperand(0)); in visitFADD()
16335 DAG.isConstantFPBuildVectorOrConstantFP(N0.getOperand(1)); in visitFADD()
16338 if (CFP01 && !CFP00 && N0.getOperand(0) == N1) { in visitFADD()
16339 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(1), in visitFADD()
16346 N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
16347 N0.getOperand(0) == N1.getOperand(0)) { in visitFADD()
16348 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(1), in visitFADD()
16350 return DAG.getNode(ISD::FMUL, DL, VT, N0.getOperand(0), NewCFP); in visitFADD()
16356 DAG.isConstantFPBuildVectorOrConstantFP(N1.getOperand(0)); in visitFADD()
16358 DAG.isConstantFPBuildVectorOrConstantFP(N1.getOperand(1)); in visitFADD()
16361 if (CFP11 && !CFP10 && N1.getOperand(0) == N0) { in visitFADD()
16362 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N1.getOperand(1), in visitFADD()
16369 N0.getOperand(0) == N0.getOperand(1) && in visitFADD()
16370 N1.getOperand(0) == N0.getOperand(0)) { in visitFADD()
16371 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N1.getOperand(1), in visitFADD()
16373 return DAG.getNode(ISD::FMUL, DL, VT, N1.getOperand(0), NewCFP); in visitFADD()
16379 DAG.isConstantFPBuildVectorOrConstantFP(N0.getOperand(0)); in visitFADD()
16381 if (!CFP00 && N0.getOperand(0) == N0.getOperand(1) && in visitFADD()
16382 (N0.getOperand(0) == N1)) { in visitFADD()
16390 DAG.isConstantFPBuildVectorOrConstantFP(N1.getOperand(0)); in visitFADD()
16392 if (!CFP10 && N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
16393 N1.getOperand(0) == N0) { in visitFADD()
16401 N0.getOperand(0) == N0.getOperand(1) && in visitFADD()
16402 N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
16403 N0.getOperand(0) == N1.getOperand(0)) { in visitFADD()
16404 return DAG.getNode(ISD::FMUL, DL, VT, N0.getOperand(0), in visitFADD()
16425 SDValue Chain = N->getOperand(0); in visitSTRICT_FADD()
16426 SDValue N0 = N->getOperand(1); in visitSTRICT_FADD()
16427 SDValue N1 = N->getOperand(2); in visitSTRICT_FADD()
16452 SDValue N0 = N->getOperand(0); in visitFSUB()
16453 SDValue N1 = N->getOperand(1); in visitFSUB()
16514 if (N0 == N1->getOperand(0)) in visitFSUB()
16515 return DAG.getNode(ISD::FNEG, DL, VT, N1->getOperand(1)); in visitFSUB()
16517 if (N0 == N1->getOperand(1)) in visitFSUB()
16518 return DAG.getNode(ISD::FNEG, DL, VT, N1->getOperand(0)); in visitFSUB()
16559 ConstOp = peekThroughBitcasts(N->getOperand(ConstOpIdx)); in combineFMulOrFDivWithIntPow2()
16560 Pow2Op = N->getOperand(1 - ConstOpIdx); in combineFMulOrFDivWithIntPow2()
16566 Pow2Op = Pow2Op.getOperand(0); in combineFMulOrFDivWithIntPow2()
16642 SDValue N0 = N->getOperand(0); in visitFMUL()
16643 SDValue N1 = N->getOperand(1); in visitFMUL()
16675 SDValue N00 = N0.getOperand(0); in visitFMUL()
16676 SDValue N01 = N0.getOperand(1); in visitFMUL()
16689 N0.getOperand(0) == N0.getOperand(1)) { in visitFMUL()
16692 return DAG.getNode(ISD::FMUL, DL, VT, N0.getOperand(0), MulConsts); in visitFMUL()
16738 SDValue Cond = Select.getOperand(0); in visitFMUL()
16739 auto TrueOpnd = dyn_cast<ConstantFPSDNode>(Select.getOperand(1)); in visitFMUL()
16740 auto FalseOpnd = dyn_cast<ConstantFPSDNode>(Select.getOperand(2)); in visitFMUL()
16743 Cond.getOpcode() == ISD::SETCC && Cond.getOperand(0) == X && in visitFMUL()
16744 isa<ConstantFPSDNode>(Cond.getOperand(1)) && in visitFMUL()
16745 cast<ConstantFPSDNode>(Cond.getOperand(1))->isExactlyValue(0.0)) { in visitFMUL()
16746 ISD::CondCode CC = cast<CondCodeSDNode>(Cond.getOperand(2))->get(); in visitFMUL()
16790 SDValue N0 = N->getOperand(0); in visitFMA()
16791 SDValue N1 = N->getOperand(1); in visitFMA()
16792 SDValue N2 = N->getOperand(2); in visitFMA()
16849 if (matcher.match(N2, ISD::FMUL) && N0 == N2.getOperand(0) && in visitFMA()
16851 DAG.isConstantFPBuildVectorOrConstantFP(N2.getOperand(1))) { in visitFMA()
16854 matcher.getNode(ISD::FADD, DL, VT, N1, N2.getOperand(1))); in visitFMA()
16860 DAG.isConstantFPBuildVectorOrConstantFP(N0.getOperand(1))) { in visitFMA()
16862 ISD::FMA, DL, VT, N0.getOperand(0), in visitFMA()
16863 matcher.getNode(ISD::FMUL, DL, VT, N1, N0.getOperand(1)), N2); in visitFMA()
16885 return matcher.getNode(ISD::FMA, DL, VT, N0.getOperand(0), in visitFMA()
16900 if (N1CFP && matcher.match(N2, ISD::FNEG) && N2.getOperand(0) == N0) { in visitFMA()
16917 SDValue N0 = N->getOperand(0); in visitFMAD()
16918 SDValue N1 = N->getOperand(1); in visitFMAD()
16919 SDValue N2 = N->getOperand(2); in visitFMAD()
16948 SDValue N0 = N->getOperand(0), N1 = N->getOperand(1); in combineRepeatedFPDivisors()
16971 if (U->getOpcode() == ISD::FDIV && U->getOperand(1) == N1) { in combineRepeatedFPDivisors()
16973 if (U->getOperand(1).getOpcode() == ISD::FSQRT && in combineRepeatedFPDivisors()
16974 U->getOperand(0) == U->getOperand(1).getOperand(0) && in combineRepeatedFPDivisors()
16997 SDValue Dividend = U->getOperand(0); in combineRepeatedFPDivisors()
17012 SDValue N0 = N->getOperand(0); in visitFDIV()
17013 SDValue N1 = N->getOperand(1); in visitFDIV()
17061 if (SDValue RV = buildRsqrtEstimate(N1.getOperand(0), Flags)) in visitFDIV()
17064 N1.getOperand(0).getOpcode() == ISD::FSQRT) { in visitFDIV()
17066 buildRsqrtEstimate(N1.getOperand(0).getOperand(0), Flags)) { in visitFDIV()
17072 N1.getOperand(0).getOpcode() == ISD::FSQRT) { in visitFDIV()
17074 buildRsqrtEstimate(N1.getOperand(0).getOperand(0), Flags)) { in visitFDIV()
17075 RV = DAG.getNode(ISD::FP_ROUND, SDLoc(N1), VT, RV, N1.getOperand(1)); in visitFDIV()
17083 if (N1.getOperand(0).getOpcode() == ISD::FSQRT) { in visitFDIV()
17084 Sqrt = N1.getOperand(0); in visitFDIV()
17085 Y = N1.getOperand(1); in visitFDIV()
17086 } else if (N1.getOperand(1).getOpcode() == ISD::FSQRT) { in visitFDIV()
17087 Sqrt = N1.getOperand(1); in visitFDIV()
17088 Y = N1.getOperand(0); in visitFDIV()
17097 A = Y.getOperand(0); in visitFDIV()
17098 else if (Y == Sqrt.getOperand(0)) in visitFDIV()
17105 DAG.getNode(ISD::FMUL, DL, VT, AA, Sqrt.getOperand(0)); in visitFDIV()
17116 if (SDValue Rsqrt = buildRsqrtEstimate(Sqrt.getOperand(0), Flags)) { in visitFDIV()
17133 if (N1.getOpcode() == ISD::FSQRT && N0 == N1.getOperand(0)) in visitFDIV()
17159 SDValue N0 = N->getOperand(0); in visitFREM()
17160 SDValue N1 = N->getOperand(1); in visitFREM()
17188 SDValue N0 = N->getOperand(0); in visitFSQRT()
17219 SDValue N1 = N->getOperand(1); in CanCombineFCOPYSIGN_EXTEND_ROUND()
17224 EVT N1Op0VT = N1->getOperand(0).getValueType(); in CanCombineFCOPYSIGN_EXTEND_ROUND()
17229 SDValue N0 = N->getOperand(0); in visitFCOPYSIGN()
17230 SDValue N1 = N->getOperand(1); in visitFCOPYSIGN()
17238 if (ConstantFPSDNode *N1C = isConstOrConstSplatFP(N->getOperand(1))) { in visitFCOPYSIGN()
17257 return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, N0.getOperand(0), N1); in visitFCOPYSIGN()
17265 return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, N0, N1.getOperand(1)); in visitFCOPYSIGN()
17270 return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, N0, N1.getOperand(0)); in visitFCOPYSIGN()
17276 ConstantFPSDNode *ExponentC = isConstOrConstSplatFP(N->getOperand(1)); in visitFPOW()
17306 return DAG.getNode(ISD::FCBRT, SDLoc(N), VT, N->getOperand(0)); in visitFPOW()
17341 SDValue Sqrt = DAG.getNode(ISD::FSQRT, DL, VT, N->getOperand(0)); in visitFPOW()
17367 SDValue N0 = N->getOperand(0); in foldFPToIntToFP()
17369 N0.getOperand(0).getValueType() == VT) in foldFPToIntToFP()
17370 return DAG.getNode(ISD::FTRUNC, SDLoc(N), VT, N0.getOperand(0)); in foldFPToIntToFP()
17373 N0.getOperand(0).getValueType() == VT) in foldFPToIntToFP()
17374 return DAG.getNode(ISD::FTRUNC, SDLoc(N), VT, N0.getOperand(0)); in foldFPToIntToFP()
17380 SDValue N0 = N->getOperand(0); in visitSINT_TO_FP()
17417 N0.getOperand(0).getOpcode() == ISD::SETCC && !VT.isVector() && in visitSINT_TO_FP()
17420 return DAG.getSelect(DL, VT, N0.getOperand(0), in visitSINT_TO_FP()
17432 SDValue N0 = N->getOperand(0); in visitUINT_TO_FP()
17472 SDValue N0 = N->getOperand(0); in FoldIntToFPToInt()
17478 SDValue Src = N0.getOperand(0); in FoldIntToFPToInt()
17513 SDValue N0 = N->getOperand(0); in visitFP_TO_SINT()
17528 SDValue N0 = N->getOperand(0); in visitFP_TO_UINT()
17543 SDValue N0 = N->getOperand(0); in visitXRINT()
17558 SDValue N0 = N->getOperand(0); in visitFP_ROUND()
17559 SDValue N1 = N->getOperand(1); in visitFP_ROUND()
17568 if (N0.getOpcode() == ISD::FP_EXTEND && VT == N0.getOperand(0).getValueType()) in visitFP_ROUND()
17569 return N0.getOperand(0); in visitFP_ROUND()
17587 if (N0.getOperand(0).getValueType() == MVT::f80 && VT == MVT::f16) in visitFP_ROUND()
17598 ISD::FP_ROUND, DL, VT, N0.getOperand(0), in visitFP_ROUND()
17612 N0.getOperand(0), N1); in visitFP_ROUND()
17615 Tmp, N0.getOperand(1)); in visitFP_ROUND()
17625 SDValue N0 = N->getOperand(0); in visitFP_EXTEND()
17644 return DAG.getNode(ISD::FP16_TO_FP, SDLoc(N), VT, N0.getOperand(0)); in visitFP_EXTEND()
17650 SDValue In = N0.getOperand(0); in visitFP_EXTEND()
17654 In, N0.getOperand(1)); in visitFP_EXTEND()
17682 SDValue N0 = N->getOperand(0); in visitFCEIL()
17693 SDValue N0 = N->getOperand(0); in visitFTRUNC()
17718 SDValue N0 = N->getOperand(0); in visitFFREXP()
17727 SDValue N0 = N->getOperand(0); in visitFFLOOR()
17738 SDValue N0 = N->getOperand(0); in visitFNEG()
17757 return DAG.getNode(ISD::FSUB, SDLoc(N), VT, N0.getOperand(1), in visitFNEG()
17758 N0.getOperand(0)); in visitFNEG()
17768 SDValue N0 = N->getOperand(0); in visitFMinMax()
17769 SDValue N1 = N->getOperand(1); in visitFMinMax()
17794 return PropagatesNaN ? N->getOperand(1) : N->getOperand(0); in visitFMinMax()
17804 return N->getOperand(1); in visitFMinMax()
17811 return N->getOperand(0); in visitFMinMax()
17826 SDValue N0 = N->getOperand(0); in visitFABS()
17835 return N->getOperand(0); in visitFABS()
17840 return DAG.getNode(ISD::FABS, SDLoc(N), VT, N0.getOperand(0)); in visitFABS()
17849 SDValue Chain = N->getOperand(0); in visitBRCOND()
17850 SDValue N1 = N->getOperand(1); in visitBRCOND()
17851 SDValue N2 = N->getOperand(2); in visitBRCOND()
17857 N1->getOperand(0), N2); in visitBRCOND()
17871 SDValue S0 = N1->getOperand(0), S1 = N1->getOperand(1); in visitBRCOND()
17872 ISD::CondCode Cond = cast<CondCodeSDNode>(N1->getOperand(2))->get(); in visitBRCOND()
17892 S0 = S0->getOperand(0); in visitBRCOND()
17898 S1 = S1->getOperand(0); in visitBRCOND()
17919 N1.getOperand(0).getValueType())) { in visitBRCOND()
17921 Chain, N1.getOperand(2), in visitBRCOND()
17922 N1.getOperand(0), N1.getOperand(1), N2); in visitBRCOND()
17940 (N.getOperand(0).hasOneUse() && in rebuildSetCC()
17941 N.getOperand(0).getOpcode() == ISD::SRL))) { in rebuildSetCC()
17944 N = N.getOperand(0); in rebuildSetCC()
17963 SDValue Op0 = N.getOperand(0); in rebuildSetCC()
17964 SDValue Op1 = N.getOperand(1); in rebuildSetCC()
17967 SDValue AndOp1 = Op0.getOperand(1); in rebuildSetCC()
18008 SDValue Op0 = N->getOperand(0); in rebuildSetCC()
18009 SDValue Op1 = N->getOperand(1); in rebuildSetCC()
18017 Op0 = N->getOperand(0); in rebuildSetCC()
18018 Op1 = N->getOperand(1); in rebuildSetCC()
18037 CondCodeSDNode *CC = cast<CondCodeSDNode>(N->getOperand(1)); in visitBR_CC()
18038 SDValue CondLHS = N->getOperand(2), CondRHS = N->getOperand(3); in visitBR_CC()
18055 N->getOperand(0), Simp.getOperand(2), in visitBR_CC()
18056 Simp.getOperand(0), Simp.getOperand(1), in visitBR_CC()
18057 N->getOperand(4)); in visitBR_CC()
18204 SDValue Op1 = Use.getUser()->getOperand((UI.getOperandNo() + 1) & 1); in CombineToPreIndexedLoadStore()
18276 if (OtherUses[i]->getOperand(OffsetIdx).getNode() == BasePtr.getNode()) in CombineToPreIndexedLoadStore()
18278 assert(OtherUses[i]->getOperand(!OffsetIdx).getNode() == in CombineToPreIndexedLoadStore()
18292 auto *CN = cast<ConstantSDNode>(OtherUses[i]->getOperand(OffsetIdx)); in CombineToPreIndexedLoadStore()
18470 SDValue BP = LD->getOperand(1); in SplitIndexingFromLoad()
18471 SDValue Inc = LD->getOperand(2); in SplitIndexingFromLoad()
18546 SDValue Chain = LD->getOperand(0); in getUniqueStoreFeeding()
18550 Chain = Chain->getOperand(0); in getUniqueStoreFeeding()
18587 SDValue Chain = LD->getOperand(0); in ForwardStoreValueToDirectLoad()
18887 if (!TLI.isTruncateFree(LS.Inst->getOperand(0), LS.Inst->getValueType(0))) in addSliceGain()
19115 TLI.getRegClassFor(Use->getOperand(0).getValueType().getSimpleVT(), in canMergeExpensiveCrossRegisterBankCopy()
19116 Use->getOperand(0)->isDivergent()); in canMergeExpensiveCrossRegisterBankCopy()
19326 isa<ConstantSDNode>(User->getOperand(1))) { in SliceUpLoad()
19377 SliceInst = SliceInst.getOperand(0); in SliceUpLoad()
19399 !isa<ConstantSDNode>(V->getOperand(1)) || in CheckForMaskedLoad()
19400 !ISD::isNormalLoad(V->getOperand(0).getNode())) in CheckForMaskedLoad()
19404 LoadSDNode *LD = cast<LoadSDNode>(V->getOperand(0)); in CheckForMaskedLoad()
19416 uint64_t NotMask = ~cast<ConstantSDNode>(V->getOperand(1))->getSExtValue(); in CheckForMaskedLoad()
19569 MaskedLoad = CheckForMaskedLoad(Value.getOperand(0), Ptr, Chain); in ReduceLoadOpStoreWidth()
19572 Value.getOperand(1), ST,this)) in ReduceLoadOpStoreWidth()
19576 MaskedLoad = CheckForMaskedLoad(Value.getOperand(1), Ptr, Chain); in ReduceLoadOpStoreWidth()
19579 Value.getOperand(0), ST,this)) in ReduceLoadOpStoreWidth()
19586 if (Value.getOperand(1).getOpcode() != ISD::Constant) in ReduceLoadOpStoreWidth()
19589 SDValue N0 = Value.getOperand(0); in ReduceLoadOpStoreWidth()
19599 SDValue N1 = Value.getOperand(1); in ReduceLoadOpStoreWidth()
19759 SDNode *MulVar = AddNode.getOperand(0).getNode(); in isMulAddWithConstProfitable()
19762 if (Use->getOperand(0) == ConstNode) in isMulAddWithConstProfitable()
19763 OtherOp = Use->getOperand(1).getNode(); in isMulAddWithConstProfitable()
19765 OtherOp = Use->getOperand(0).getNode(); in isMulAddWithConstProfitable()
19794 DAG.isConstantIntBuildVectorOrConstantInt(OtherOp->getOperand(1)) && in isMulAddWithConstProfitable()
19795 OtherOp->getOperand(0).getNode() == MulVar) in isMulAddWithConstProfitable()
19947 SDValue Vec = Val.getOperand(0); in mergeStoresOfConstantsOrVecElts()
19948 SDValue Idx = Val.getOperand(1); in mergeStoresOfConstantsOrVecElts()
20257 Worklist.push_back(N->getOperand(j).getNode()); in checkMergeStoreCandidatesForDependencies()
20793 SDValue Val = StoreNodes[i].MemNode->getOperand(1); in tryStoreMergeOfLoads()
21011 SDValue Elt = Value.getOperand(1); in replaceStoreOfInsertLoad()
21012 SDValue Idx = Value.getOperand(2); in replaceStoreOfInsertLoad()
21018 EltVT != Value.getOperand(0).getValueType().getVectorElementType()) in replaceStoreOfInsertLoad()
21021 auto *Ld = dyn_cast<LoadSDNode>(Value.getOperand(0)); in replaceStoreOfInsertLoad()
21064 EVT SVT = Value.getOperand(0).getValueType(); in visitSTORE()
21075 return DAG.getStore(Chain, SDLoc(N), Value.getOperand(0), Ptr, in visitSTORE()
21130 Value.getOperand(0).getValueType() == ST->getMemoryVT() && in visitSTORE()
21132 return DAG.getStore(Chain, SDLoc(N), Value.getOperand(0), Ptr, in visitSTORE()
21248 TLI.canCombineTruncStore(Value.getOperand(0).getValueType(), in visitSTORE()
21250 return DAG.getTruncStore(Chain, SDLoc(N), Value.getOperand(0), in visitSTORE()
21296 const BaseIndexOffset LifetimeEndBase(N->getOperand(1), SDValue(), in visitLIFETIME_END()
21300 SmallVector<SDValue, 8> Chains = {N->getOperand(0)}; in visitLIFETIME_END()
21308 Chains.push_back(Chain.getOperand(--Nops)); in visitLIFETIME_END()
21315 Chains.push_back(Chain.getOperand(0)); in visitLIFETIME_END()
21389 SDValue Op1 = Val.getOperand(0); in splitMergedValStore()
21390 SDValue Op2 = Val.getOperand(1); in splitMergedValStore()
21398 Hi = Op1.getOperand(0); in splitMergedValStore()
21404 ConstantSDNode *ShAmt = dyn_cast<ConstantSDNode>(Op1.getOperand(1)); in splitMergedValStore()
21411 !Lo.getOperand(0).getValueType().isScalarInteger() || in splitMergedValStore()
21412 Lo.getOperand(0).getValueSizeInBits() > HalfValBitSize || in splitMergedValStore()
21414 !Hi.getOperand(0).getValueType().isScalarInteger() || in splitMergedValStore()
21415 Hi.getOperand(0).getValueSizeInBits() > HalfValBitSize) in splitMergedValStore()
21420 EVT LowTy = (Lo.getOperand(0).getOpcode() == ISD::BITCAST) in splitMergedValStore()
21421 ? Lo.getOperand(0).getValueType() in splitMergedValStore()
21423 EVT HighTy = (Hi.getOperand(0).getOpcode() == ISD::BITCAST) in splitMergedValStore()
21424 ? Hi.getOperand(0).getValueType() in splitMergedValStore()
21435 Lo = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, Lo.getOperand(0)); in splitMergedValStore()
21436 Hi = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, Hi.getOperand(0)); in splitMergedValStore()
21461 !isa<ConstantSDNode>(Elt.getOperand(1))) in mergeEltWithShuffle()
21467 SDValue InsertVal0 = Elt.getOperand(0); in mergeEltWithShuffle()
21491 int Step = ArgVal.getOperand(0).getValueType().getVectorNumElements(); in mergeEltWithShuffle()
21527 SDValue InsertVal = N->getOperand(1); in mergeInsertEltWithShuffle()
21528 SDValue Vec = N->getOperand(0); in mergeInsertEltWithShuffle()
21535 SDValue X = Vec.getOperand(0); in mergeInsertEltWithShuffle()
21536 SDValue Y = Vec.getOperand(1); in mergeInsertEltWithShuffle()
21557 SDValue InsertVal = N->getOperand(1); in combineInsertEltToShuffle()
21560 !InsertVal.getOperand(0).getValueType().isVector()) in combineInsertEltToShuffle()
21563 SDValue SubVec = InsertVal.getOperand(0); in combineInsertEltToShuffle()
21564 SDValue DestVec = N->getOperand(0); in combineInsertEltToShuffle()
21623 auto *Shuffle = dyn_cast<ShuffleVectorSDNode>(N->getOperand(0)); in combineInsertEltToLoad()
21624 SDValue Scalar = N->getOperand(1); in combineInsertEltToLoad()
21640 Scalar = Scalar.getOperand(0); in combineInsertEltToLoad()
21647 SDValue Vec = Shuffle->getOperand(0); in combineInsertEltToLoad()
21651 Vec = Vec.getOperand(0); in combineInsertEltToLoad()
21704 SDValue InVec = N->getOperand(0); in visitINSERT_VECTOR_ELT()
21705 SDValue InVal = N->getOperand(1); in visitINSERT_VECTOR_ELT()
21706 SDValue EltNo = N->getOperand(2); in visitINSERT_VECTOR_ELT()
21720 InVec == InVal.getOperand(0) && EltNo == InVal.getOperand(1)) in visitINSERT_VECTOR_ELT()
21743 InVal.getOperand(0).getValueType() == VT && in visitINSERT_VECTOR_ELT()
21744 isNullConstant(InVal.getOperand(1))) in visitINSERT_VECTOR_ELT()
21745 return InVal.getOperand(0); in visitINSERT_VECTOR_ELT()
21756 && isa<ConstantSDNode>(InVec.getOperand(2))) { in visitINSERT_VECTOR_ELT()
21761 InVec.getOperand(0), InVal, EltNo); in visitINSERT_VECTOR_ELT()
21764 VT, NewOp, InVec.getOperand(1), InVec.getOperand(2)); in visitINSERT_VECTOR_ELT()
21821 AddBuildVectorOp(Ops, CurVec.getOperand(I), I); in visitINSERT_VECTOR_ELT()
21827 AddBuildVectorOp(Ops, CurVec.getOperand(0), 0); in visitINSERT_VECTOR_ELT()
21833 if (auto *CurIdx = dyn_cast<ConstantSDNode>(CurVec.getOperand(2))) in visitINSERT_VECTOR_ELT()
21836 AddBuildVectorOp(Ops, CurVec.getOperand(1), Idx); in visitINSERT_VECTOR_ELT()
21842 CurVec = CurVec->getOperand(0); in visitINSERT_VECTOR_ELT()
21851 SDValue LHS = SVN->getOperand(0); in visitINSERT_VECTOR_ELT()
21852 SDValue RHS = SVN->getOperand(1); in visitINSERT_VECTOR_ELT()
21991 SDValue Vec = ExtElt->getOperand(0); in scalarizeExtractedBinop()
21992 SDValue Index = ExtElt->getOperand(1); in scalarizeExtractedBinop()
22005 SDValue Op0 = Vec.getOperand(0); in scalarizeExtractedBinop()
22006 SDValue Op1 = Vec.getOperand(1); in scalarizeExtractedBinop()
22045 SDValue VecOp = N->getOperand(0); in refineExtractVectorEltIntoMultipleNarrowExtractVectorElts()
22050 auto *IndexC = dyn_cast<ConstantSDNode>(N->getOperand(1)); in refineExtractVectorEltIntoMultipleNarrowExtractVectorElts()
22115 if (auto *ShAmtC = dyn_cast<ConstantSDNode>(User->getOperand(1)); in refineExtractVectorEltIntoMultipleNarrowExtractVectorElts()
22116 User->getOperand(0).getNode() == E.Producer && ShAmtC) { in refineExtractVectorEltIntoMultipleNarrowExtractVectorElts()
22187 SDValue VecOp = N->getOperand(0); in visitEXTRACT_VECTOR_ELT()
22188 SDValue Index = N->getOperand(1); in visitEXTRACT_VECTOR_ELT()
22200 Index == VecOp.getOperand(2)) { in visitEXTRACT_VECTOR_ELT()
22201 SDValue Elt = VecOp.getOperand(1); in visitEXTRACT_VECTOR_ELT()
22214 SDValue InOp = VecOp.getOperand(0); in visitEXTRACT_VECTOR_ELT()
22233 VecOp.getOperand(0), Index)); in visitEXTRACT_VECTOR_ELT()
22245 SDValue Elt = VecOp.getOperand(IndexVal); in visitEXTRACT_VECTOR_ELT()
22294 SDValue BCSrc = VecOp.getOperand(0); in visitEXTRACT_VECTOR_ELT()
22302 SDValue X = BCSrc.getOperand(0); in visitEXTRACT_VECTOR_ELT()
22338 SVInVec = VecOp.getOperand(0); in visitEXTRACT_VECTOR_ELT()
22340 SVInVec = VecOp.getOperand(1); in visitEXTRACT_VECTOR_ELT()
22345 SDValue InOp = SVInVec.getOperand(OrigElt); in visitEXTRACT_VECTOR_ELT()
22370 Use->getOperand(0) == VecOp && in visitEXTRACT_VECTOR_ELT()
22371 isa<ConstantSDNode>(Use->getOperand(1)); in visitEXTRACT_VECTOR_ELT()
22375 auto *CstElt = cast<ConstantSDNode>(Use->getOperand(1)); in visitEXTRACT_VECTOR_ELT()
22413 EVT BCVT = VecOp.getOperand(0).getValueType(); in visitEXTRACT_VECTOR_ELT()
22418 VecOp = VecOp.getOperand(0); in visitEXTRACT_VECTOR_ELT()
22444 VecOp.getOperand(0).getValueType() == ExtVT && in visitEXTRACT_VECTOR_ELT()
22445 ISD::isNormalLoad(VecOp.getOperand(0).getNode())) { in visitEXTRACT_VECTOR_ELT()
22450 LN0 = cast<LoadSDNode>(VecOp.getOperand(0)); in visitEXTRACT_VECTOR_ELT()
22468 VecOp = (Idx < (int)NumElts) ? VecOp.getOperand(0) : VecOp.getOperand(1); in visitEXTRACT_VECTOR_ELT()
22475 VecOp = VecOp.getOperand(0); in visitEXTRACT_VECTOR_ELT()
22486 VecOp.getOperand(0).getValueType().getVectorElementType()))) { in visitEXTRACT_VECTOR_ELT()
22496 EVT ConcatVT = VecOp.getOperand(0).getValueType(); in visitEXTRACT_VECTOR_ELT()
22501 SDValue ConcatOp = VecOp.getOperand(Elt / ConcatNumElts); in visitEXTRACT_VECTOR_ELT()
22544 SDValue In = N->getOperand(i); in reduceBuildVecExtToExtBuildVec()
22558 EVT InTy = In.getOperand(0).getValueType(); in reduceBuildVecExtToExtBuildVec()
22604 SDValue Cast = N->getOperand(i); in reduceBuildVecExtToExtBuildVec()
22612 In = Cast->getOperand(0); in reduceBuildVecExtToExtBuildVec()
22670 return Op.getOperand(0); in reduceBuildVecTruncToBitCast()
22677 SDValue In = PeekThroughBitcast(N->getOperand(i)); in reduceBuildVecTruncToBitCast()
22684 In = PeekThroughBitcast(In.getOperand(0)); in reduceBuildVecTruncToBitCast()
22695 SDValue part = PeekThroughBitcast(In.getOperand(0)); in reduceBuildVecTruncToBitCast()
22704 SDValue ShiftAmtVal = In.getOperand(1); in reduceBuildVecTruncToBitCast()
22842 unsigned ExtIndex = N->getOperand(i).getConstantOperandVal(1); in createBuildVecShuffle()
22873 SDValue Op = BV->getOperand(i); in reduceBuildVecToShuffleWithZero()
22892 SDValue Zext = BV->getOperand(ZextElt); in reduceBuildVecToShuffleWithZero()
22894 Zext.getOperand(0).getOpcode() != ISD::EXTRACT_VECTOR_ELT || in reduceBuildVecToShuffleWithZero()
22895 !isa<ConstantSDNode>(Zext.getOperand(0).getOperand(1)) || in reduceBuildVecToShuffleWithZero()
22901 SDValue Extract = Zext.getOperand(0); in reduceBuildVecToShuffleWithZero()
22905 Extract.getOperand(0).getValueSizeInBits() != VT.getSizeInBits()) in reduceBuildVecToShuffleWithZero()
22931 EVT VecVT = Extract.getOperand(0).getValueType(); in reduceBuildVecToShuffleWithZero()
22934 SDValue Shuf = TLI.buildLegalVectorShuffle(VecVT, DL, Extract.getOperand(0), in reduceBuildVecToShuffleWithZero()
22982 SDValue Op = N->getOperand(i); in reduceBuildVecToShuffle()
22999 !isa<ConstantSDNode>(Op.getOperand(1))) in reduceBuildVecToShuffle()
23001 SDValue ExtractedFromVec = Op.getOperand(0); in reduceBuildVecToShuffle()
23046 unsigned Index = N->getOperand(i).getConstantOperandVal(1); in reduceBuildVecToShuffle()
23174 L.use_empty() && L.getOperand(1).isUndef() && in reduceBuildVecToShuffle()
23175 L.getOperand(0).getValueType() == L.getValueType(); in reduceBuildVecToShuffle()
23178 L = L.getOperand(0); in reduceBuildVecToShuffle()
23183 R.use_empty() && R.getOperand(1).isUndef() && in reduceBuildVecToShuffle()
23184 R.getOperand(0).getValueType() == R.getValueType(); in reduceBuildVecToShuffle()
23187 R = R.getOperand(0); in reduceBuildVecToShuffle()
23220 SDValue Op0 = N->getOperand(0); in convertBuildVecZextToZext()
23225 Op.getOperand(0).getOpcode() == ISD::EXTRACT_VECTOR_ELT && in convertBuildVecZextToZext()
23226 Op0.getOperand(0).getOperand(0) == Op.getOperand(0).getOperand(0)) in convertBuildVecZextToZext()
23227 if (auto *C = dyn_cast<ConstantSDNode>(Op.getOperand(0).getOperand(1))) in convertBuildVecZextToZext()
23241 SDValue In = Op0.getOperand(0).getOperand(0); in convertBuildVecZextToZext()
23251 if ((Offset + i) != checkElem(N->getOperand(i))) in convertBuildVecZextToZext()
23257 Op0.getOperand(0).getOperand(1)); in convertBuildVecZextToZext()
23279 EVT OpVT = N->getOperand(0).getValueType(); in convertBuildVecZextToBuildVecWithZeros()
23317 Op.getOperand(0).getValueSizeInBits().getFixedValue(); in convertBuildVecZextToBuildVecWithZeros()
23418 SDValue Op0 = N->getOperand(0); in visitBUILD_VECTOR()
23421 (Op0.getOperand(0) == Op.getOperand(0))) in visitBUILD_VECTOR()
23422 if (auto CNode = dyn_cast<ConstantSDNode>(Op.getOperand(1))) in visitBUILD_VECTOR()
23429 if (Offset + i != checkElem(N->getOperand(i))) { in visitBUILD_VECTOR()
23436 (Op0.getOperand(0).getValueType() == N->getValueType(0))) in visitBUILD_VECTOR()
23437 return Op0.getOperand(0); in visitBUILD_VECTOR()
23442 Op0.getOperand(0), Op0.getOperand(1)); in visitBUILD_VECTOR()
23473 EVT OpVT = N->getOperand(0).getValueType(); in combineConcatVectorOfScalars()
23491 !Op.getOperand(0).getValueType().isVector()) in combineConcatVectorOfScalars()
23492 Ops.push_back(Op.getOperand(0)); in combineConcatVectorOfScalars()
23548 SubVT = Op.getOperand(0).getValueType(); in combineConcatVectorOfConcatVectors()
23554 if (SubVT != Op.getOperand(0).getValueType()) in combineConcatVectorOfConcatVectors()
23576 EVT OpVT = N->getOperand(0).getValueType(); in combineConcatVectorOfExtracts()
23601 SDValue ExtVec = Op.getOperand(0); in combineConcatVectorOfExtracts()
23649 unsigned CastOpcode = N->getOperand(0).getOpcode(); in combineConcatVectorOfCasts()
23666 EVT SrcVT = N->getOperand(0).getOperand(0).getValueType(); in combineConcatVectorOfCasts()
23675 Op.getOperand(0).getValueType() != SrcVT) in combineConcatVectorOfCasts()
23677 SrcOps.push_back(Op.getOperand(0)); in combineConcatVectorOfCasts()
23718 EVT OpVT = N->getOperand(0).getValueType(); in combineConcatVectorOfShuffleAndItsOperands()
23740 CurSVN && CurSVN->getOperand(1).isUndef() && N->isOnlyUserOf(CurSVN) && in combineConcatVectorOfShuffleAndItsOperands()
23757 assert(SVN->getOperand(1).isUndef() && "Expected unary shuffle!"); in combineConcatVectorOfShuffleAndItsOperands()
23780 if (Op == SVN->getOperand(0)) { in combineConcatVectorOfShuffleAndItsOperands()
23784 if (Op == SVN->getOperand(1)) { in combineConcatVectorOfShuffleAndItsOperands()
23817 return N->getOperand(0); in visitCONCAT_VECTORS()
23827 SDValue In = N->getOperand(0); in visitCONCAT_VECTORS()
23852 if (SVT == Scalar.getOperand(0).getValueType()) in visitCONCAT_VECTORS()
23853 Scalar = Scalar.getOperand(0); in visitCONCAT_VECTORS()
23863 TLI.isTypeLegal(Scalar->getOperand(0).getValueType())) in visitCONCAT_VECTORS()
23864 Scalar = Scalar->getOperand(0); in visitCONCAT_VECTORS()
23906 EVT OpSVT = Op.getOperand(0).getValueType(); in visitCONCAT_VECTORS()
23927 DAG.getNode(ISD::TRUNCATE, SDLoc(N), MinVT, Op.getOperand(i))); in visitCONCAT_VECTORS()
23967 N->getOperand(0).getValueType().getVectorMinNumElements(); in visitCONCAT_VECTORS()
23970 SDValue Op = N->getOperand(i); in visitCONCAT_VECTORS()
23981 if (Op.getOperand(0) != SingleSource) in visitCONCAT_VECTORS()
23984 SingleSource = Op.getOperand(0); in visitCONCAT_VECTORS()
24009 V.getOperand(1).getValueType() == SubVT && V.getOperand(2) == Index) { in getSubVectorSrc()
24010 return V.getOperand(1); in getSubVectorSrc()
24014 V.getOperand(0).getValueType() == SubVT && in getSubVectorSrc()
24017 return V.getOperand(SubIdx); in getSubVectorSrc()
24026 SDValue BinOp = Extract->getOperand(0); in narrowInsertExtractVectorBinOp()
24032 SDValue Bop0 = BinOp.getOperand(0), Bop1 = BinOp.getOperand(1); in narrowInsertExtractVectorBinOp()
24036 SDValue Index = Extract->getOperand(1); in narrowInsertExtractVectorBinOp()
24068 auto *ExtractIndexC = dyn_cast<ConstantSDNode>(Extract->getOperand(1)); in narrowExtractedVectorBinOp()
24075 SDValue BinOp = peekThroughBitcasts(Extract->getOperand(0)); in narrowExtractedVectorBinOp()
24084 auto *C = isConstOrConstSplatFP(BinOp.getOperand(0), /*AllowUndefs*/ true); in narrowExtractedVectorBinOp()
24129 BinOp.hasOneUse() && Extract->getOperand(0)->hasOneUse()) { in narrowExtractedVectorBinOp()
24134 BinOp.getOperand(0), NewExtIndex); in narrowExtractedVectorBinOp()
24136 BinOp.getOperand(1), NewExtIndex); in narrowExtractedVectorBinOp()
24159 return V.getOperand(ConcatOpNum); in narrowExtractedVectorBinOp()
24162 SDValue SubVecL = GetSubVector(peekThroughBitcasts(BinOp.getOperand(0))); in narrowExtractedVectorBinOp()
24163 SDValue SubVecR = GetSubVector(peekThroughBitcasts(BinOp.getOperand(1))); in narrowExtractedVectorBinOp()
24175 BinOp.getOperand(0), IndexC); in narrowExtractedVectorBinOp()
24179 BinOp.getOperand(1), IndexC); in narrowExtractedVectorBinOp()
24196 auto *Ld = dyn_cast<LoadSDNode>(Extract->getOperand(0)); in narrowExtractedVectorLoad()
24263 SDValue N0 = N->getOperand(0); in foldExtractSubvectorFromShuffleVector()
24329 SDValue Op = WideShuffleVector->getOperand(WideShufOpIdx); in foldExtractSubvectorFromShuffleVector()
24405 SDValue V = N->getOperand(0); in visitEXTRACT_SUBVECTOR()
24419 if (TLI.isExtractSubvectorCheap(NVT, V.getOperand(0).getValueType(), in visitEXTRACT_SUBVECTOR()
24422 return DAG.getNode(ISD::EXTRACT_SUBVECTOR, SDLoc(N), NVT, V.getOperand(0), in visitEXTRACT_SUBVECTOR()
24423 V.getOperand(1)); in visitEXTRACT_SUBVECTOR()
24429 if (DAG.isConstantValueOfAnyType(V.getOperand(0)) || V.hasOneUse()) in visitEXTRACT_SUBVECTOR()
24431 return DAG.getSplatVector(NVT, SDLoc(N), V.getOperand(0)); in visitEXTRACT_SUBVECTOR()
24436 V.getOperand(0).getValueType().isVector() && in visitEXTRACT_SUBVECTOR()
24438 SDValue SrcOp = V.getOperand(0); in visitEXTRACT_SUBVECTOR()
24451 V.getOperand(0), NewIndex); in visitEXTRACT_SUBVECTOR()
24470 V.getOperand(0), NewIndex); in visitEXTRACT_SUBVECTOR()
24478 V.getOperand(0), NewIndex); in visitEXTRACT_SUBVECTOR()
24488 EVT ConcatSrcVT = V.getOperand(0).getValueType(); in visitEXTRACT_SUBVECTOR()
24501 return V.getOperand(ConcatOpIdx); in visitEXTRACT_SUBVECTOR()
24518 V.getOperand(ConcatOpIdx), NewIndexC); in visitEXTRACT_SUBVECTOR()
24547 SDValue Src = V->getOperand(IdxVal); in visitEXTRACT_SUBVECTOR()
24564 EVT SmallVT = V.getOperand(1).getValueType(); in visitEXTRACT_SUBVECTOR()
24579 return DAG.getBitcast(NVT, V.getOperand(1)); in visitEXTRACT_SUBVECTOR()
24583 DAG.getBitcast(N->getOperand(0).getValueType(), V.getOperand(0)), in visitEXTRACT_SUBVECTOR()
24584 N->getOperand(1)); in visitEXTRACT_SUBVECTOR()
24602 SDValue N0 = Shuf->getOperand(0), N1 = Shuf->getOperand(1); in foldShuffleOfConcatUndefs()
24605 !N0.getOperand(1).isUndef() || !N1.getOperand(1).isUndef()) in foldShuffleOfConcatUndefs()
24639 SDValue X = N0.getOperand(0), Y = N1.getOperand(0); in foldShuffleOfConcatUndefs()
24652 SDValue N0 = N->getOperand(0); in partitionShuffleOfConcats()
24653 SDValue N1 = N->getOperand(1); in partitionShuffleOfConcats()
24658 EVT ConcatVT = N0.getOperand(0).getValueType(); in partitionShuffleOfConcats()
24670 N0 = DAG.getVectorShuffle(ConcatVT, SDLoc(N), N0.getOperand(0), in partitionShuffleOfConcats()
24671 N0.getOperand(1), in partitionShuffleOfConcats()
24703 Ops.push_back(N0.getOperand(OpIdx)); in partitionShuffleOfConcats()
24705 Ops.push_back(N1.getOperand(OpIdx - N0.getNumOperands())); in partitionShuffleOfConcats()
24732 SDValue N0 = SVN->getOperand(0); in combineShuffleOfScalars()
24733 SDValue N1 = SVN->getOperand(1); in combineShuffleOfScalars()
24769 Op = S.getOperand(Idx); in combineShuffleOfScalars()
24771 SDValue Op0 = S.getOperand(0); in combineShuffleOfScalars()
24873 SDValue N0 = SVN->getOperand(0); in combineShuffleToAnyExtendVectorInreg()
24994 SDValue Op = SVN->getOperand(!Commuted ? 0 : 1); in combineShuffleToZeroExtendVectorInReg()
25021 SDValue N0 = peekThroughBitcasts(SVN->getOperand(0)); in combineTruncationShuffle()
25027 SDValue N00 = N0.getOperand(0); in combineTruncationShuffle()
25076 if (!Shuf->getOperand(1).isUndef()) in combineShuffleOfSplatVal()
25092 if (DAG.isSplatValue(Shuf->getOperand(0), DemandedElts, UndefElts)) { in combineShuffleOfSplatVal()
25114 return DAG.getVectorShuffle(VT, SDLoc(Shuf), Shuf->getOperand(0), in combineShuffleOfSplatVal()
25115 Shuf->getOperand(1), SplatMask); in combineShuffleOfSplatVal()
25122 if (DAG.isSplatValue(Shuf->getOperand(0), /*AllowUndefs*/ false)) in combineShuffleOfSplatVal()
25123 return Shuf->getOperand(0); in combineShuffleOfSplatVal()
25125 auto *Splat = dyn_cast<ShuffleVectorSDNode>(Shuf->getOperand(0)); in combineShuffleOfSplatVal()
25158 return Shuf->getOperand(0); in combineShuffleOfSplatVal()
25167 Splat->getOperand(0), Splat->getOperand(1), in combineShuffleOfSplatVal()
25177 SDValue Op0 = SVN->getOperand(0); in combineShuffleOfBitcast()
25178 SDValue Op1 = SVN->getOperand(1); in combineShuffleOfBitcast()
25182 EVT InVT = Op0.getOperand(0).getValueType(); in combineShuffleOfBitcast()
25185 Op1.getOperand(0).getValueType() != InVT))) in combineShuffleOfBitcast()
25187 if (isAnyConstantBuildVector(Op0.getOperand(0)) && in combineShuffleOfBitcast()
25188 (Op1.isUndef() || isAnyConstantBuildVector(Op1.getOperand(0)))) in combineShuffleOfBitcast()
25212 Op0 = Op0.getOperand(0); in combineShuffleOfBitcast()
25213 Op1 = Op1.isUndef() ? DAG.getUNDEF(InVT) : Op1.getOperand(0); in combineShuffleOfBitcast()
25222 if (!OuterShuf->getOperand(1).isUndef()) in formSplatFromShuffles()
25224 auto *InnerShuf = dyn_cast<ShuffleVectorSDNode>(OuterShuf->getOperand(0)); in formSplatFromShuffles()
25225 if (!InnerShuf || !InnerShuf->getOperand(1).isUndef()) in formSplatFromShuffles()
25265 return DAG.getVectorShuffle(VT, SDLoc(OuterShuf), InnerShuf->getOperand(0), in formSplatFromShuffles()
25266 InnerShuf->getOperand(1), CombinedMask); in formSplatFromShuffles()
25303 SDValue Op0 = Shuf->getOperand(0); in replaceShuffleOfInsert()
25304 SDValue Op1 = Shuf->getOperand(1); in replaceShuffleOfInsert()
25327 auto *InsIndexC = dyn_cast<ConstantSDNode>(Op0.getOperand(2)); in replaceShuffleOfInsert()
25343 Op1, Op0.getOperand(1), NewInsIndex); in replaceShuffleOfInsert()
25352 auto *Shuf0 = dyn_cast<ShuffleVectorSDNode>(Shuf->getOperand(0)); in simplifyShuffleOfShuffle()
25353 if (!Shuf0 || !Shuf->getOperand(1).isUndef()) in simplifyShuffleOfShuffle()
25371 return Shuf->getOperand(0); in simplifyShuffleOfShuffle()
25378 SDValue N0 = N->getOperand(0); in visitVECTOR_SHUFFLE()
25379 SDValue N1 = N->getOperand(1); in visitVECTOR_SHUFFLE()
25432 SDValue L = N0.getOperand(0), R = N0.getOperand(1); in visitVECTOR_SHUFFLE()
25450 return DAG.getSplatBuildVector(VT, SDLoc(N), N0.getOperand(0)); in visitVECTOR_SHUFFLE()
25453 if (auto *Idx = dyn_cast<ConstantSDNode>(N0.getOperand(2))) in visitVECTOR_SHUFFLE()
25455 return DAG.getSplatBuildVector(VT, SDLoc(N), N0.getOperand(1)); in visitVECTOR_SHUFFLE()
25459 if (N0.getOpcode() == ISD::BITCAST && N0.getOperand(0).hasOneUse() && in visitVECTOR_SHUFFLE()
25461 (N0.getOperand(0).getOpcode() == ISD::SCALAR_TO_VECTOR || in visitVECTOR_SHUFFLE()
25462 N0.getOperand(0).getOpcode() == ISD::BUILD_VECTOR)) { in visitVECTOR_SHUFFLE()
25463 EVT N00VT = N0.getOperand(0).getValueType(); in visitVECTOR_SHUFFLE()
25468 SDValue Op = DAG.getZExtOrTrunc(N0.getOperand(0).getOperand(0), in visitVECTOR_SHUFFLE()
25480 SDValue ConvInput = V->getOperand(0); in visitVECTOR_SHUFFLE()
25492 if (!V->getOperand(i).isUndef()) { in visitVECTOR_SHUFFLE()
25493 Base = V->getOperand(i); in visitVECTOR_SHUFFLE()
25501 if (V->getOperand(i) != Base) { in visitVECTOR_SHUFFLE()
25511 SDValue Splatted = V->getOperand(SplatIndex); in visitVECTOR_SHUFFLE()
25545 N0.getOperand(0).getValueType() == N1.getOperand(0).getValueType()))) { in visitVECTOR_SHUFFLE()
25555 N0.getOperand(0) == N0.getOperand(1)) { in visitVECTOR_SHUFFLE()
25567 SDValue UndefVec = DAG.getUNDEF(N0.getOperand(0).getValueType()); in visitVECTOR_SHUFFLE()
25569 N0.getOperand(0), UndefVec); in visitVECTOR_SHUFFLE()
25583 EVT SubVT = RHS.getOperand(0).getValueType(); in visitVECTOR_SHUFFLE()
25620 RHS.getOperand(SubVec), in visitVECTOR_SHUFFLE()
25734 SDValue SV0 = BC0->getOperand(0); in visitVECTOR_SHUFFLE()
25735 SDValue SV1 = BC0->getOperand(1); in visitVECTOR_SHUFFLE()
25796 CurrentVec = (Idx < (int)NumElts) ? OtherSVN->getOperand(0) in visitVECTOR_SHUFFLE()
25797 : OtherSVN->getOperand(1); in visitVECTOR_SHUFFLE()
25836 ? CurrentSVN->getOperand(0) in visitVECTOR_SHUFFLE()
25837 : CurrentSVN->getOperand(1); in visitVECTOR_SHUFFLE()
25884 assert(N1->getOperand(0).getValueType() == VT && in visitVECTOR_SHUFFLE()
25887 SDValue SV0 = N1->getOperand(0); in visitVECTOR_SHUFFLE()
25888 SDValue SV1 = N1->getOperand(1); in visitVECTOR_SHUFFLE()
25913 if (N->getOperand(i).getOpcode() == ISD::VECTOR_SHUFFLE && in visitVECTOR_SHUFFLE()
25914 N->isOnlyUserOf(N->getOperand(i).getNode())) { in visitVECTOR_SHUFFLE()
25917 auto *OtherSV = cast<ShuffleVectorSDNode>(N->getOperand(i)); in visitVECTOR_SHUFFLE()
25918 assert(OtherSV->getOperand(0).getValueType() == VT && in visitVECTOR_SHUFFLE()
25923 if (MergeInnerShuffle(i != 0, SVN, OtherSV, N->getOperand(1 - i), TLI, in visitVECTOR_SHUFFLE()
25945 SDValue Op00 = N0.getOperand(0); in visitVECTOR_SHUFFLE()
25946 SDValue Op01 = N0.getOperand(1); in visitVECTOR_SHUFFLE()
25947 SDValue Op10 = N1.isUndef() ? N1 : N1.getOperand(0); in visitVECTOR_SHUFFLE()
25948 SDValue Op11 = N1.isUndef() ? N1 : N1.getOperand(1); in visitVECTOR_SHUFFLE()
26038 SDValue Scalar = N->getOperand(0); in visitSCALAR_TO_VECTOR()
26043 Scalar.getOperand(0).getValueType() == VecEltVT && in visitSCALAR_TO_VECTOR()
26044 Scalar.getOperand(1).getValueType() == VecEltVT && in visitSCALAR_TO_VECTOR()
26045 Scalar->isOnlyUserOf(Scalar.getOperand(0).getNode()) && in visitSCALAR_TO_VECTOR()
26046 Scalar->isOnlyUserOf(Scalar.getOperand(1).getNode()) && in visitSCALAR_TO_VECTOR()
26054 SDValue EE = Scalar.getOperand(i); in visitSCALAR_TO_VECTOR()
26055 auto *C = dyn_cast<ConstantSDNode>(Scalar.getOperand(i ? 0 : 1)); in visitSCALAR_TO_VECTOR()
26057 EE.getOperand(0).getValueType() == VT && in visitSCALAR_TO_VECTOR()
26058 isa<ConstantSDNode>(EE.getOperand(1))) { in visitSCALAR_TO_VECTOR()
26064 SDValue V[] = {EE.getOperand(0), in visitSCALAR_TO_VECTOR()
26077 !Scalar.getOperand(0).getValueType().isFixedLengthVector()) in visitSCALAR_TO_VECTOR()
26087 auto *ExtIndexC = dyn_cast<ConstantSDNode>(Scalar.getOperand(1)); in visitSCALAR_TO_VECTOR()
26091 SDValue SrcVec = Scalar.getOperand(0); in visitSCALAR_TO_VECTOR()
26123 SDValue N0 = N->getOperand(0); in visitINSERT_SUBVECTOR()
26124 SDValue N1 = N->getOperand(1); in visitINSERT_SUBVECTOR()
26125 SDValue N2 = N->getOperand(2); in visitINSERT_SUBVECTOR()
26136 N1.getOperand(1) == N2) { in visitINSERT_SUBVECTOR()
26137 EVT SrcVT = N1.getOperand(0).getValueType(); in visitINSERT_SUBVECTOR()
26139 return N1.getOperand(0); in visitINSERT_SUBVECTOR()
26146 VT, N0, N1.getOperand(0), N2); in visitINSERT_SUBVECTOR()
26149 VT, N1.getOperand(0), N2); in visitINSERT_SUBVECTOR()
26156 if (DAG.isConstantValueOfAnyType(N1.getOperand(0)) || N1.hasOneUse()) in visitINSERT_SUBVECTOR()
26157 return DAG.getNode(ISD::SPLAT_VECTOR, SDLoc(N), VT, N1.getOperand(0)); in visitINSERT_SUBVECTOR()
26164 N1.getOperand(0).getOpcode() == ISD::EXTRACT_SUBVECTOR && in visitINSERT_SUBVECTOR()
26165 N1.getOperand(0).getOperand(1) == N2 && in visitINSERT_SUBVECTOR()
26166 N1.getOperand(0).getOperand(0).getValueType().getVectorElementCount() == in visitINSERT_SUBVECTOR()
26168 N1.getOperand(0).getOperand(0).getValueType().getSizeInBits() == in visitINSERT_SUBVECTOR()
26170 return DAG.getBitcast(VT, N1.getOperand(0).getOperand(0)); in visitINSERT_SUBVECTOR()
26178 SDValue CN0 = N0.getOperand(0); in visitINSERT_SUBVECTOR()
26179 SDValue CN1 = N1.getOperand(0); in visitINSERT_SUBVECTOR()
26195 N0.getOperand(1).getValueType() == N1.getValueType() && in visitINSERT_SUBVECTOR()
26196 N0.getOperand(2) == N2) in visitINSERT_SUBVECTOR()
26197 return DAG.getNode(ISD::INSERT_SUBVECTOR, SDLoc(N), VT, N0.getOperand(0), in visitINSERT_SUBVECTOR()
26204 N1.getOperand(0).isUndef() && isNullConstant(N1.getOperand(2)) && in visitINSERT_SUBVECTOR()
26207 N1.getOperand(1), N2); in visitINSERT_SUBVECTOR()
26251 N1.getValueType() == N0.getOperand(1).getValueType()) { in visitINSERT_SUBVECTOR()
26256 N0.getOperand(0), N1, N2); in visitINSERT_SUBVECTOR()
26259 VT, NewOp, N0.getOperand(1), N0.getOperand(2)); in visitINSERT_SUBVECTOR()
26266 N0.getOperand(0).getValueType() == N1.getValueType() && in visitINSERT_SUBVECTOR()
26267 N0.getOperand(0).getValueType().isScalableVector() == in visitINSERT_SUBVECTOR()
26283 SDValue N0 = N->getOperand(0); in visitFP_TO_FP16()
26287 return N0->getOperand(0); in visitFP_TO_FP16()
26296 SDValue N0 = N->getOperand(0); in visitFP16_TO_FP()
26301 ConstantSDNode *AndConst = getAsNonOpaqueConstant(N0.getOperand(1)); in visitFP16_TO_FP()
26303 return DAG.getNode(Op, SDLoc(N), N->getValueType(0), N0.getOperand(0)); in visitFP16_TO_FP()
26311 SDValue N0 = N->getOperand(0); in visitFP_TO_BF16()
26315 return N0->getOperand(0); in visitFP_TO_BF16()
26326 SDValue N0 = N->getOperand(0); in visitVECREDUCE()
26355 TLI.isTypeLegal(N0.getOperand(1).getValueType())) { in visitVECREDUCE()
26356 SDValue Vec = N0.getOperand(0); in visitVECREDUCE()
26357 SDValue Subvec = N0.getOperand(1); in visitVECREDUCE()
26359 (N0.getOperand(0).isUndef() || isNullOrNullSplat(Vec))) || in visitVECREDUCE()
26361 (N0.getOperand(0).isUndef() || isAllOnesOrAllOnesSplat(Vec)))) in visitVECREDUCE()
26402 AreAllEltsDisabled |= isNullConstant(N->getOperand(*EVLIdx)); in visitVPOp()
26405 ISD::isConstantSplatVectorAllZeros(N->getOperand(*MaskIdx).getNode()); in visitVPOp()
26434 return N->getOperand(0); in visitVPOp()
26440 SDValue Chain = N->getOperand(0); in visitGET_FPENV_MEM()
26441 SDValue Ptr = N->getOperand(1); in visitGET_FPENV_MEM()
26491 SDValue Chain = N->getOperand(0); in visitSET_FPENV_MEM()
26492 SDValue Ptr = N->getOperand(1); in visitSET_FPENV_MEM()
26538 SDValue LHS = N->getOperand(0); in XformToShuffleWithZero()
26539 SDValue RHS = peekThroughBitcasts(N->getOperand(1)); in XformToShuffleWithZero()
26564 SDValue Elt = RHS.getOperand(EltIdx); in XformToShuffleWithZero()
26623 SDValue N0 = N->getOperand(0); in scalarizeBinOpOfSplats()
26624 SDValue N1 = N->getOperand(1); in scalarizeBinOpOfSplats()
26675 SDValue N0 = N->getOperand(0); in SimplifyVCastOp()
26706 SDValue LHS = N->getOperand(0); in SimplifyVBinOp()
26707 SDValue RHS = N->getOperand(1); in SimplifyVBinOp()
26722 LHS.getOperand(1).isUndef() && RHS.getOperand(1).isUndef() && in SimplifyVBinOp()
26724 SDValue NewBinOp = DAG.getNode(Opcode, DL, VT, LHS.getOperand(0), in SimplifyVBinOp()
26725 RHS.getOperand(0), Flags); in SimplifyVBinOp()
26726 SDValue UndefV = LHS.getOperand(1); in SimplifyVBinOp()
26737 Shuf0->hasOneUse() && Shuf0->getOperand(1).isUndef() && in SimplifyVBinOp()
26738 Shuf0->getOperand(0).getOpcode() != ISD::INSERT_VECTOR_ELT) { in SimplifyVBinOp()
26740 SDValue X = Shuf0->getOperand(0); in SimplifyVBinOp()
26746 Shuf1->hasOneUse() && Shuf1->getOperand(1).isUndef() && in SimplifyVBinOp()
26747 Shuf1->getOperand(0).getOpcode() != ISD::INSERT_VECTOR_ELT) { in SimplifyVBinOp()
26749 SDValue X = Shuf1->getOperand(0); in SimplifyVBinOp()
26760 if (LHS.getOpcode() == ISD::INSERT_SUBVECTOR && LHS.getOperand(0).isUndef() && in SimplifyVBinOp()
26761 RHS.getOpcode() == ISD::INSERT_SUBVECTOR && RHS.getOperand(0).isUndef() && in SimplifyVBinOp()
26762 LHS.getOperand(2) == RHS.getOperand(2) && in SimplifyVBinOp()
26764 SDValue X = LHS.getOperand(1); in SimplifyVBinOp()
26765 SDValue Y = RHS.getOperand(1); in SimplifyVBinOp()
26766 SDValue Z = LHS.getOperand(2); in SimplifyVBinOp()
26795 EVT NarrowVT = LHS.getOperand(0).getValueType(); in SimplifyVBinOp()
26796 if (NarrowVT == RHS.getOperand(0).getValueType() && in SimplifyVBinOp()
26802 ConcatOps.push_back(DAG.getNode(Opcode, DL, NarrowVT, LHS.getOperand(i), in SimplifyVBinOp()
26803 RHS.getOperand(i))); in SimplifyVBinOp()
26821 SDValue SCC = SimplifySelectCC(DL, N0.getOperand(0), N0.getOperand(1), N1, N2, in SimplifySelect()
26822 cast<CondCodeSDNode>(N0.getOperand(2))->get()); in SimplifySelect()
26834 SCC.getOperand(0), SCC.getOperand(1), in SimplifySelect()
26835 SCC.getOperand(4), Flags); in SimplifySelect()
26838 SCC.getOperand(2), SCC.getOperand(3)); in SimplifySelect()
26866 CC = cast<CondCodeSDNode>(TheSelect->getOperand(4))->get(); in SimplifySelectOps()
26867 CmpLHS = TheSelect->getOperand(0); in SimplifySelectOps()
26868 Zero = isConstOrConstSplatFP(TheSelect->getOperand(1)); in SimplifySelectOps()
26871 SDValue Cmp = TheSelect->getOperand(0); in SimplifySelectOps()
26873 CC = cast<CondCodeSDNode>(Cmp.getOperand(2))->get(); in SimplifySelectOps()
26874 CmpLHS = Cmp.getOperand(0); in SimplifySelectOps()
26875 Zero = isConstOrConstSplatFP(Cmp.getOperand(1)); in SimplifySelectOps()
26879 Sqrt.getOperand(0) == CmpLHS && (CC == ISD::SETOLT || in SimplifySelectOps()
26888 if (TheSelect->getOperand(0).getValueType().isVector()) return false; in SimplifySelectOps()
26905 if (LHS.getOperand(0) != RHS.getOperand(0) || in SimplifySelectOps()
26964 SDNode *CondNode = TheSelect->getOperand(0).getNode(); in SimplifySelectOps()
26975 TheSelect->getOperand(0), LLD->getBasePtr(), in SimplifySelectOps()
26984 SDNode *CondLHS = TheSelect->getOperand(0).getNode(); in SimplifySelectOps()
26985 SDNode *CondRHS = TheSelect->getOperand(1).getNode(); in SimplifySelectOps()
26997 TheSelect->getOperand(0), in SimplifySelectOps()
26998 TheSelect->getOperand(1), in SimplifySelectOps()
27000 TheSelect->getOperand(4)); in SimplifySelectOps()
27115 SDValue N0 = N->getOperand(0); in foldSelectOfBinops()
27116 SDValue N1 = N->getOperand(1); in foldSelectOfBinops()
27117 SDValue N2 = N->getOperand(2); in foldSelectOfBinops()
27138 if (N1.getOperand(1) == N2.getOperand(1)) { in foldSelectOfBinops()
27139 SDValue N10 = N1.getOperand(0); in foldSelectOfBinops()
27140 SDValue N20 = N2.getOperand(0); in foldSelectOfBinops()
27142 SDValue NewBinOp = DAG.getNode(BinOpc, DL, OpVTs, NewSel, N1.getOperand(1)); in foldSelectOfBinops()
27150 if (N1.getOperand(0) == N2.getOperand(0)) { in foldSelectOfBinops()
27151 SDValue N11 = N1.getOperand(1); in foldSelectOfBinops()
27152 SDValue N21 = N2.getOperand(1); in foldSelectOfBinops()
27157 DAG.getNode(BinOpc, DL, OpVTs, N1.getOperand(0), NewSel); in foldSelectOfBinops()
27170 SDValue N0 = N->getOperand(0); in foldSignChangeInBitcast()
27178 SDValue Int = N0.getOperand(0); in foldSignChangeInBitcast()
27305 SDValue AndLHS = N0->getOperand(0); in SimplifySelectCC()
27306 auto *ConstAndRHS = dyn_cast<ConstantSDNode>(N0->getOperand(1)); in SimplifySelectCC()
27395 N0 == Count.getOperand(0) && in SimplifySelectCC()
27402 N0 == Count.getOperand(0) && in SimplifySelectCC()
27463 ConstantSDNode *C = isConstOrConstSplat(N->getOperand(1)); in BuildSDIVPow2()
27504 ConstantSDNode *C = isConstOrConstSplat(N->getOperand(1)); in BuildSREMPow2()
27542 V = V.getOperand(0); in takeInexpensiveLog2()
27599 Op->getFlags().hasNoSignedWrap() || isOneConstant(Op.getOperand(0))) in takeInexpensiveLog2()
27600 if (SDValue LogX = takeInexpensiveLog2(DAG, DL, VT, Op.getOperand(0), in takeInexpensiveLog2()
27603 CastToVT(VT, Op.getOperand(1))); in takeInexpensiveLog2()
27609 if (SDValue LogX = takeInexpensiveLog2(DAG, DL, VT, Op.getOperand(1), in takeInexpensiveLog2()
27611 if (SDValue LogY = takeInexpensiveLog2(DAG, DL, VT, Op.getOperand(2), in takeInexpensiveLog2()
27613 return DAG.getSelect(DL, VT, Op.getOperand(0), LogX, LogY); in takeInexpensiveLog2()
27623 takeInexpensiveLog2(DAG, DL, VT, Op.getOperand(0), Depth + 1, in takeInexpensiveLog2()
27626 takeInexpensiveLog2(DAG, DL, VT, Op.getOperand(1), Depth + 1, in takeInexpensiveLog2()
27889 LN->getOperand(1), in mayAlias()
28024 C = C.getOperand(0); in GatherAllAliases()
28033 C = C.getOperand(0); in GatherAllAliases()
28042 C = C.getOperand(0); in GatherAllAliases()
28084 Chains.push_back(Chain.getOperand(--n)); in GatherAllAliases()
28221 S, BetterChain, S->getOperand(1), S->getOperand(2), S->getOperand(3))); in parallelizeChainedStores()
28243 return ST->getOperand(0) != NewChain; in parallelizeChainedStores()