Lines Matching refs:getOperand
709 TLI.isFPExtFree(VT, Op.getOperand(0).getValueType()))) in isNegatibleForFree()
735 if (char V = isNegatibleForFree(Op.getOperand(0), LegalOperations, TLI, in isNegatibleForFree()
739 return isNegatibleForFree(Op.getOperand(1), LegalOperations, TLI, Options, in isNegatibleForFree()
753 if (char V = isNegatibleForFree(Op.getOperand(0), LegalOperations, TLI, in isNegatibleForFree()
757 return isNegatibleForFree(Op.getOperand(1), LegalOperations, TLI, Options, in isNegatibleForFree()
763 return isNegatibleForFree(Op.getOperand(0), LegalOperations, TLI, Options, in isNegatibleForFree()
773 if (Op.getOpcode() == ISD::FNEG) return Op.getOperand(0); in GetNegatedExpression()
790 if (isNegatibleForFree(Op.getOperand(0), LegalOperations, in GetNegatedExpression()
793 GetNegatedExpression(Op.getOperand(0), DAG, in GetNegatedExpression()
795 Op.getOperand(1), Flags); in GetNegatedExpression()
798 GetNegatedExpression(Op.getOperand(1), DAG, in GetNegatedExpression()
800 Op.getOperand(0), Flags); in GetNegatedExpression()
803 if (ConstantFPSDNode *N0CFP = dyn_cast<ConstantFPSDNode>(Op.getOperand(0))) in GetNegatedExpression()
805 return Op.getOperand(1); in GetNegatedExpression()
809 Op.getOperand(1), Op.getOperand(0), Flags); in GetNegatedExpression()
814 if (isNegatibleForFree(Op.getOperand(0), LegalOperations, in GetNegatedExpression()
817 GetNegatedExpression(Op.getOperand(0), DAG, in GetNegatedExpression()
819 Op.getOperand(1), Flags); in GetNegatedExpression()
823 Op.getOperand(0), in GetNegatedExpression()
824 GetNegatedExpression(Op.getOperand(1), DAG, in GetNegatedExpression()
830 GetNegatedExpression(Op.getOperand(0), DAG, in GetNegatedExpression()
834 GetNegatedExpression(Op.getOperand(0), DAG, in GetNegatedExpression()
836 Op.getOperand(1)); in GetNegatedExpression()
857 LHS = N.getOperand(0); in isSetCCEquivalent()
858 RHS = N.getOperand(1); in isSetCCEquivalent()
859 CC = N.getOperand(2); in isSetCCEquivalent()
864 !TLI.isConstTrueVal(N.getOperand(2).getNode()) || in isSetCCEquivalent()
865 !TLI.isConstFalseVal(N.getOperand(3).getNode())) in isSetCCEquivalent()
872 LHS = N.getOperand(0); in isSetCCEquivalent()
873 RHS = N.getOperand(1); in isSetCCEquivalent()
874 CC = N.getOperand(4); in isSetCCEquivalent()
935 if (SDNode *L = DAG.isConstantIntBuildVectorOrConstantInt(N0.getOperand(1))) { in ReassociateOps()
939 return DAG.getNode(Opc, DL, VT, N0.getOperand(0), OpNode); in ReassociateOps()
945 SDValue OpNode = DAG.getNode(Opc, SDLoc(N0), VT, N0.getOperand(0), N1); in ReassociateOps()
949 return DAG.getNode(Opc, DL, VT, OpNode, N0.getOperand(1)); in ReassociateOps()
955 if (SDNode *R = DAG.isConstantIntBuildVectorOrConstantInt(N1.getOperand(1))) { in ReassociateOps()
959 return DAG.getNode(Opc, DL, VT, N1.getOperand(0), OpNode); in ReassociateOps()
965 SDValue OpNode = DAG.getNode(Opc, SDLoc(N0), VT, N0, N1.getOperand(0)); in ReassociateOps()
969 return DAG.getNode(Opc, DL, VT, OpNode, N1.getOperand(1)); in ReassociateOps()
1104 if (SDValue Op0 = SExtPromoteOperand(Op.getOperand(0), PVT)) in PromoteOperand()
1105 return DAG.getNode(ISD::AssertSext, DL, PVT, Op0, Op.getOperand(1)); in PromoteOperand()
1108 if (SDValue Op0 = ZExtPromoteOperand(Op.getOperand(0), PVT)) in PromoteOperand()
1109 return DAG.getNode(ISD::AssertZext, DL, PVT, Op0, Op.getOperand(1)); in PromoteOperand()
1180 SDValue N0 = Op.getOperand(0); in PromoteIntBinOp()
1184 SDValue N1 = Op.getOperand(1); in PromoteIntBinOp()
1245 SDValue N0 = Op.getOperand(0); in PromoteIntShiftOp()
1246 SDValue N1 = Op.getOperand(1); in PromoteIntShiftOp()
1263 ReplaceLoadWithPromotedLoad(Op.getOperand(0).getNode(), N0.getNode()); in PromoteIntShiftOp()
1295 return DAG.getNode(Op.getOpcode(), SDLoc(Op), VT, Op.getOperand(0)); in PromoteExtend()
1651 SDValue N0 = N->getOperand(0); in combine()
1652 SDValue N1 = N->getOperand(1); in combine()
1671 if (N->getOperand(0).getValueType() == MVT::Other) in getInputChainForNode()
1672 return N->getOperand(0); in getInputChainForNode()
1673 if (N->getOperand(NumOps-1).getValueType() == MVT::Other) in getInputChainForNode()
1674 return N->getOperand(NumOps-1); in getInputChainForNode()
1676 if (N->getOperand(i).getValueType() == MVT::Other) in getInputChainForNode()
1677 return N->getOperand(i); in getInputChainForNode()
1686 if (getInputChainForNode(N->getOperand(0).getNode()) == N->getOperand(1)) in visitTokenFactor()
1687 return N->getOperand(0); in visitTokenFactor()
1688 if (getInputChainForNode(N->getOperand(1).getNode()) == N->getOperand(0)) in visitTokenFactor()
1689 return N->getOperand(1); in visitTokenFactor()
1808 AddToWorklist(i, CurNode->getOperand(0).getNode(), CurOpNumber); in visitTokenFactor()
1857 Ops.push_back(N->getOperand(i)); in visitMERGE_VALUES()
1878 SDValue Sel = BO->getOperand(0); in foldBinOpIntoSelect()
1881 Sel = BO->getOperand(1); in foldBinOpIntoSelect()
1887 SDValue CT = Sel.getOperand(1); in foldBinOpIntoSelect()
1892 SDValue CF = Sel.getOperand(2); in foldBinOpIntoSelect()
1908 SDValue CBO = BO->getOperand(SelOpNo ^ 1); in foldBinOpIntoSelect()
1943 return DAG.getSelect(DL, VT, Sel.getOperand(0), NewCT, NewCF); in foldBinOpIntoSelect()
1954 SDValue C = IsAdd ? N->getOperand(1) : N->getOperand(0); in foldAddSubBoolOfMaskedVal()
1955 SDValue Z = IsAdd ? N->getOperand(0) : N->getOperand(1); in foldAddSubBoolOfMaskedVal()
1961 if (Z.getOperand(0).getOpcode() != ISD::SETCC || in foldAddSubBoolOfMaskedVal()
1962 Z.getOperand(0).getValueType() != MVT::i1) in foldAddSubBoolOfMaskedVal()
1966 SDValue SetCC = Z.getOperand(0); in foldAddSubBoolOfMaskedVal()
1967 ISD::CondCode CC = cast<CondCodeSDNode>(SetCC->getOperand(2))->get(); in foldAddSubBoolOfMaskedVal()
1968 if (CC != ISD::SETEQ || !isNullConstant(SetCC.getOperand(1)) || in foldAddSubBoolOfMaskedVal()
1969 SetCC.getOperand(0).getOpcode() != ISD::AND || in foldAddSubBoolOfMaskedVal()
1970 !isOneConstant(SetCC.getOperand(0).getOperand(1))) in foldAddSubBoolOfMaskedVal()
1979 SDValue LowBit = DAG.getZExtOrTrunc(SetCC.getOperand(0), DL, VT); in foldAddSubBoolOfMaskedVal()
1994 SDValue ConstantOp = IsAdd ? N->getOperand(1) : N->getOperand(0); in foldAddSubOfSignBit()
1995 SDValue ShiftOp = IsAdd ? N->getOperand(0) : N->getOperand(1); in foldAddSubOfSignBit()
2001 SDValue Not = ShiftOp.getOperand(0); in foldAddSubOfSignBit()
2007 SDValue ShAmt = ShiftOp.getOperand(1); in foldAddSubOfSignBit()
2017 SDValue NewShift = DAG.getNode(ShOpcode, DL, VT, Not.getOperand(0), ShAmt); in foldAddSubOfSignBit()
2023 SDValue N0 = N->getOperand(0); in visitADD()
2024 SDValue N1 = N->getOperand(1); in visitADD()
2063 isConstantOrConstantVector(N0.getOperand(0), /* NoOpaque */ true)) { in visitADD()
2066 DAG.getNode(ISD::ADD, DL, VT, N1, N0.getOperand(0)), in visitADD()
2067 N0.getOperand(1)); in visitADD()
2076 SDValue X = N0.getOperand(0); in visitADD()
2088 isa<FrameIndexSDNode>(N0.getOperand(0)) && in visitADD()
2089 isa<ConstantSDNode>(N0.getOperand(1)) && in visitADD()
2090 DAG.haveNoCommonBitsSet(N0.getOperand(0), N0.getOperand(1))) { in visitADD()
2091 SDValue Add0 = DAG.getNode(ISD::ADD, DL, VT, N1, N0.getOperand(1)); in visitADD()
2092 return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), Add0); in visitADD()
2104 if (N0.getOpcode() == ISD::SUB && isNullOrNullSplat(N0.getOperand(0))) in visitADD()
2105 return DAG.getNode(ISD::SUB, DL, VT, N1, N0.getOperand(1)); in visitADD()
2108 if (N1.getOpcode() == ISD::SUB && isNullOrNullSplat(N1.getOperand(0))) in visitADD()
2109 return DAG.getNode(ISD::SUB, DL, VT, N0, N1.getOperand(1)); in visitADD()
2112 if (N1.getOpcode() == ISD::SUB && N0 == N1.getOperand(1)) in visitADD()
2113 return N1.getOperand(0); in visitADD()
2116 if (N0.getOpcode() == ISD::SUB && N1 == N0.getOperand(1)) in visitADD()
2117 return N0.getOperand(0); in visitADD()
2120 if (N1.getOpcode() == ISD::SUB && N1.getOperand(1).getOpcode() == ISD::ADD && in visitADD()
2121 N0 == N1.getOperand(1).getOperand(0)) in visitADD()
2122 return DAG.getNode(ISD::SUB, DL, VT, N1.getOperand(0), in visitADD()
2123 N1.getOperand(1).getOperand(1)); in visitADD()
2126 if (N1.getOpcode() == ISD::SUB && N1.getOperand(1).getOpcode() == ISD::ADD && in visitADD()
2127 N0 == N1.getOperand(1).getOperand(1)) in visitADD()
2128 return DAG.getNode(ISD::SUB, DL, VT, N1.getOperand(0), in visitADD()
2129 N1.getOperand(1).getOperand(0)); in visitADD()
2133 N1.getOperand(0).getOpcode() == ISD::SUB && in visitADD()
2134 N0 == N1.getOperand(0).getOperand(1)) in visitADD()
2135 return DAG.getNode(N1.getOpcode(), DL, VT, N1.getOperand(0).getOperand(0), in visitADD()
2136 N1.getOperand(1)); in visitADD()
2140 SDValue N00 = N0.getOperand(0); in visitADD()
2141 SDValue N01 = N0.getOperand(1); in visitADD()
2142 SDValue N10 = N1.getOperand(0); in visitADD()
2143 SDValue N11 = N1.getOperand(1); in visitADD()
2168 N0.getOperand(0)); in visitADD()
2181 SDValue N0 = N->getOperand(0); in visitADDSAT()
2182 SDValue N1 = N->getOperand(1); in visitADDSAT()
2228 V = V.getOperand(0); in getAsCarry()
2232 if (V.getOpcode() == ISD::AND && isOneConstant(V.getOperand(1))) { in getAsCarry()
2234 V = V.getOperand(0); in getAsCarry()
2265 if (N1.getOpcode() == ISD::SHL && N1.getOperand(0).getOpcode() == ISD::SUB && in visitADDLike()
2266 isNullOrNullSplat(N1.getOperand(0).getOperand(0))) in visitADDLike()
2269 N1.getOperand(0).getOperand(1), in visitADDLike()
2270 N1.getOperand(1))); in visitADDLike()
2273 SDValue AndOp0 = N1.getOperand(0); in visitADDLike()
2279 if (NumSignBits == DestBits && isOneOrOneSplat(N1->getOperand(1))) in visitADDLike()
2285 N0.getOperand(0).getValueType() == MVT::i1 && in visitADDLike()
2287 SDValue ZExt = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, N0.getOperand(0)); in visitADDLike()
2293 VTSDNode *TN = cast<VTSDNode>(N1.getOperand(1)); in visitADDLike()
2295 SDValue ZExt = DAG.getNode(ISD::AND, DL, VT, N1.getOperand(0), in visitADDLike()
2302 if (N1.getOpcode() == ISD::ADDCARRY && isNullConstant(N1.getOperand(1)) && in visitADDLike()
2305 N0, N1.getOperand(0), N1.getOperand(2)); in visitADDLike()
2318 SDValue N0 = N->getOperand(0); in visitADDC()
2319 SDValue N1 = N->getOperand(1); in visitADDC()
2365 ConstantSDNode *Const = dyn_cast<ConstantSDNode>(V.getOperand(1)); in isBooleanFlip()
2380 SDValue N0 = N->getOperand(0); in visitUADDO()
2381 SDValue N1 = N->getOperand(1); in visitUADDO()
2413 N0.getOperand(0)); in visitUADDO()
2432 if (N1.getOpcode() == ISD::ADDCARRY && isNullConstant(N1.getOperand(1))) { in visitUADDOLike()
2433 SDValue Y = N1.getOperand(0); in visitUADDOLike()
2437 N1.getOperand(2)); in visitUADDOLike()
2450 SDValue N0 = N->getOperand(0); in visitADDE()
2451 SDValue N1 = N->getOperand(1); in visitADDE()
2452 SDValue CarryIn = N->getOperand(2); in visitADDE()
2469 SDValue N0 = N->getOperand(0); in visitADDCARRY()
2470 SDValue N1 = N->getOperand(1); in visitADDCARRY()
2471 SDValue CarryIn = N->getOperand(2); in visitADDCARRY()
2504 N0.getOperand(0), CarryIn.getOperand(0)); in visitADDCARRY()
2526 N0.getOperand(0), N0.getOperand(1), CarryIn); in visitADDCARRYLike()
2551 isNullConstant(CarryIn.getOperand(1)) && in visitADDCARRYLike()
2552 CarryIn.getOperand(0) == Y.getValue(0)) { in visitADDCARRYLike()
2554 Y.getOperand(0), Y.getOperand(1), in visitADDCARRYLike()
2555 CarryIn.getOperand(2)); in visitADDCARRYLike()
2578 SDValue N0 = N->getOperand(0); in visitSUB()
2579 SDValue N1 = N->getOperand(1); in visitSUB()
2622 ConstantSDNode *ShiftAmt = isConstOrConstSplat(N1.getOperand(1)); in visitSUB()
2626 return DAG.getNode(NewSh, DL, VT, N1.getOperand(0), N1.getOperand(1)); in visitSUB()
2650 if (N1.getOpcode() == ISD::SUB && isNullOrNullSplat(N1.getOperand(0))) in visitSUB()
2651 return DAG.getNode(ISD::ADD, DL, VT, N0, N1.getOperand(1)); in visitSUB()
2654 if (N1.getOpcode() == ISD::SUB && N0 == N1.getOperand(0)) in visitSUB()
2655 return N1.getOperand(1); in visitSUB()
2658 if (N0.getOpcode() == ISD::ADD && N0.getOperand(0) == N1) in visitSUB()
2659 return N0.getOperand(1); in visitSUB()
2662 if (N0.getOpcode() == ISD::ADD && N0.getOperand(1) == N1) in visitSUB()
2663 return N0.getOperand(0); in visitSUB()
2667 SDValue N11 = N1.getOperand(1); in visitSUB()
2671 return DAG.getNode(ISD::SUB, DL, VT, NewC, N1.getOperand(0)); in visitSUB()
2677 (N0.getOperand(1).getOpcode() == ISD::SUB || in visitSUB()
2678 N0.getOperand(1).getOpcode() == ISD::ADD) && in visitSUB()
2679 N0.getOperand(1).getOperand(0) == N1) in visitSUB()
2680 return DAG.getNode(N0.getOperand(1).getOpcode(), DL, VT, N0.getOperand(0), in visitSUB()
2681 N0.getOperand(1).getOperand(1)); in visitSUB()
2684 if (N0.getOpcode() == ISD::ADD && N0.getOperand(1).getOpcode() == ISD::ADD && in visitSUB()
2685 N0.getOperand(1).getOperand(1) == N1) in visitSUB()
2686 return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), in visitSUB()
2687 N0.getOperand(1).getOperand(0)); in visitSUB()
2690 if (N0.getOpcode() == ISD::SUB && N0.getOperand(1).getOpcode() == ISD::SUB && in visitSUB()
2691 N0.getOperand(1).getOperand(1) == N1) in visitSUB()
2692 return DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), in visitSUB()
2693 N0.getOperand(1).getOperand(0)); in visitSUB()
2698 DAG.getNode(ISD::SUB, DL, VT, N1.getOperand(1), in visitSUB()
2699 N1.getOperand(0))); in visitSUB()
2703 if (N1.getOperand(0).getOpcode() == ISD::SUB && in visitSUB()
2704 isNullOrNullSplat(N1.getOperand(0).getOperand(0))) { in visitSUB()
2706 N1.getOperand(0).getOperand(1), in visitSUB()
2707 N1.getOperand(1)); in visitSUB()
2710 if (N1.getOperand(1).getOpcode() == ISD::SUB && in visitSUB()
2711 isNullOrNullSplat(N1.getOperand(1).getOperand(0))) { in visitSUB()
2713 N1.getOperand(0), in visitSUB()
2714 N1.getOperand(1).getOperand(1)); in visitSUB()
2734 SDValue X0 = N0.getOperand(0), X1 = N0.getOperand(1); in visitSUB()
2735 SDValue S0 = N1.getOperand(0); in visitSUB()
2738 if (ConstantSDNode *C = isConstOrConstSplat(N1.getOperand(1))) in visitSUB()
2762 VTSDNode *TN = cast<VTSDNode>(N1.getOperand(1)); in visitSUB()
2764 SDValue ZExt = DAG.getNode(ISD::AND, DL, VT, N1.getOperand(0), in visitSUB()
2773 SDValue ShAmt = N1.getOperand(1); in visitSUB()
2776 SDValue SRA = DAG.getNode(ISD::SRA, DL, VT, N1.getOperand(0), ShAmt); in visitSUB()
2785 SDValue N0 = N->getOperand(0); in visitSUBSAT()
2786 SDValue N1 = N->getOperand(1); in visitSUBSAT()
2822 SDValue N0 = N->getOperand(0); in visitSUBC()
2823 SDValue N1 = N->getOperand(1); in visitSUBC()
2850 SDValue N0 = N->getOperand(0); in visitUSUBO()
2851 SDValue N1 = N->getOperand(1); in visitUSUBO()
2882 SDValue N0 = N->getOperand(0); in visitSUBE()
2883 SDValue N1 = N->getOperand(1); in visitSUBE()
2884 SDValue CarryIn = N->getOperand(2); in visitSUBE()
2894 SDValue N0 = N->getOperand(0); in visitSUBCARRY()
2895 SDValue N1 = N->getOperand(1); in visitSUBCARRY()
2896 SDValue CarryIn = N->getOperand(2); in visitSUBCARRY()
2909 SDValue N0 = N->getOperand(0); in visitMUL()
2910 SDValue N1 = N->getOperand(1); in visitMUL()
3032 isConstantOrConstantVector(N0.getOperand(1), /* NoOpaques */ true)) { in visitMUL()
3033 SDValue C3 = DAG.getNode(ISD::SHL, SDLoc(N), VT, N1, N0.getOperand(1)); in visitMUL()
3035 return DAG.getNode(ISD::MUL, SDLoc(N), VT, N0.getOperand(0), C3); in visitMUL()
3045 isConstantOrConstantVector(N0.getOperand(1)) && in visitMUL()
3049 isConstantOrConstantVector(N1.getOperand(1)) && in visitMUL()
3055 SDValue Mul = DAG.getNode(ISD::MUL, SDLoc(N), VT, Sh.getOperand(0), Y); in visitMUL()
3056 return DAG.getNode(ISD::SHL, SDLoc(N), VT, Mul, Sh.getOperand(1)); in visitMUL()
3063 DAG.isConstantIntBuildVectorOrConstantInt(N0.getOperand(1)) && in visitMUL()
3067 N0.getOperand(0), N1), in visitMUL()
3069 N0.getOperand(1), N1)); in visitMUL()
3132 SDValue Op0 = Node->getOperand(0); in useDivRem()
3133 SDValue Op1 = Node->getOperand(1); in useDivRem()
3146 User->getOperand(0) == Op0 && in useDivRem()
3147 User->getOperand(1) == Op1) { in useDivRem()
3169 SDValue N0 = N->getOperand(0); in simplifyDivRem()
3170 SDValue N1 = N->getOperand(1); in simplifyDivRem()
3215 SDValue N0 = N->getOperand(0); in visitSDIV()
3216 SDValue N1 = N->getOperand(1); in visitSDIV()
3359 SDValue N0 = N->getOperand(0); in visitUDIV()
3360 SDValue N1 = N->getOperand(1); in visitUDIV()
3433 SDValue N10 = N1.getOperand(0); in visitUDIVLike()
3439 EVT ADDVT = N1.getOperand(1).getValueType(); in visitUDIVLike()
3442 SDValue Add = DAG.getNode(ISD::ADD, DL, ADDVT, N1.getOperand(1), Trunc); in visitUDIVLike()
3461 SDValue N0 = N->getOperand(0); in visitREM()
3462 SDValue N1 = N->getOperand(1); in visitREM()
3500 DAG.isKnownToBeAPowerOfTwo(N1.getOperand(0))) { in visitREM()
3542 SDValue N0 = N->getOperand(0); in visitMULHS()
3543 SDValue N1 = N->getOperand(1); in visitMULHS()
3589 SDValue N0 = N->getOperand(0); in visitMULHU()
3590 SDValue N1 = N->getOperand(1); in visitMULHU()
3708 SDValue Lo = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N->getOperand(0)); in visitSMUL_LOHI()
3709 SDValue Hi = DAG.getNode(ISD::SIGN_EXTEND, DL, NewVT, N->getOperand(1)); in visitSMUL_LOHI()
3739 SDValue Lo = DAG.getNode(ISD::ZERO_EXTEND, DL, NewVT, N->getOperand(0)); in visitUMUL_LOHI()
3740 SDValue Hi = DAG.getNode(ISD::ZERO_EXTEND, DL, NewVT, N->getOperand(1)); in visitUMUL_LOHI()
3758 if (ConstantSDNode *C2 = dyn_cast<ConstantSDNode>(N->getOperand(1))) in visitSMULO()
3761 N->getOperand(0), N->getOperand(0)); in visitSMULO()
3768 if (ConstantSDNode *C2 = dyn_cast<ConstantSDNode>(N->getOperand(1))) in visitUMULO()
3771 N->getOperand(0), N->getOperand(0)); in visitUMULO()
3777 SDValue N0 = N->getOperand(0); in visitIMINMAX()
3778 SDValue N1 = N->getOperand(1); in visitIMINMAX()
3822 SDValue N0 = N->getOperand(0), N1 = N->getOperand(1); in hoistLogicOpWithSameOpcodeHands()
3838 SDValue X = N0.getOperand(0); in hoistLogicOpWithSameOpcodeHands()
3839 SDValue Y = N1.getOperand(0); in hoistLogicOpWithSameOpcodeHands()
3892 N0.getOperand(1) == N1.getOperand(1)) { in hoistLogicOpWithSameOpcodeHands()
3897 return DAG.getNode(HandOpcode, DL, VT, Logic, N0.getOperand(1)); in hoistLogicOpWithSameOpcodeHands()
3953 SDValue ShOp = N0.getOperand(1); in hoistLogicOpWithSameOpcodeHands()
3958 if (N0.getOperand(1) == N1.getOperand(1) && ShOp.getNode()) { in hoistLogicOpWithSameOpcodeHands()
3960 N0.getOperand(0), N1.getOperand(0)); in hoistLogicOpWithSameOpcodeHands()
3966 ShOp = N0.getOperand(0); in hoistLogicOpWithSameOpcodeHands()
3971 if (N0.getOperand(0) == N1.getOperand(0) && ShOp.getNode()) { in hoistLogicOpWithSameOpcodeHands()
3972 SDValue Logic = DAG.getNode(LogicOpcode, DL, VT, N0.getOperand(1), in hoistLogicOpWithSameOpcodeHands()
3973 N1.getOperand(1)); in hoistLogicOpWithSameOpcodeHands()
4118 if (ConstantSDNode *ADDI = dyn_cast<ConstantSDNode>(N0.getOperand(1))) { in visitANDLike()
4119 if (ConstantSDNode *SRLI = dyn_cast<ConstantSDNode>(N1.getOperand(1))) { in visitANDLike()
4131 if (DAG.MaskedValueIsZero(N0.getOperand(1), Mask)) { in visitANDLike()
4137 N0.getOperand(0), DAG.getConstant(ADDC, DL, VT)); in visitANDLike()
4153 if (ConstantSDNode *CShift = dyn_cast<ConstantSDNode>(N0.getOperand(1))) { in visitANDLike()
4185 N0.getOperand(0)); in visitANDLike()
4320 SDValue Op = N->getOperand(i); in SearchForAndLoads()
4361 cast<VTSDNode>(Op.getOperand(1))->getVT() : in SearchForAndLoads()
4362 Op.getOperand(0).getValueType(); in SearchForAndLoads()
4404 auto *Mask = dyn_cast<ConstantSDNode>(N->getOperand(1)); in BackwardsPropagateMask()
4412 if (isa<LoadSDNode>(N->getOperand(0))) in BackwardsPropagateMask()
4423 SDValue MaskOp = N->getOperand(1); in BackwardsPropagateMask()
4439 SDValue Op0 = LogicN->getOperand(0); in BackwardsPropagateMask()
4440 SDValue Op1 = LogicN->getOperand(1); in BackwardsPropagateMask()
4465 DAG.ReplaceAllUsesWith(N, N->getOperand(0).getNode()); in BackwardsPropagateMask()
4479 SDValue N0 = N->getOperand(0); in unfoldExtremeBitClearingToShifts()
4480 SDValue N1 = N->getOperand(1); in unfoldExtremeBitClearingToShifts()
4500 if (!isAllOnesConstant(M->getOperand(0))) in unfoldExtremeBitClearingToShifts()
4502 Y = M->getOperand(1); in unfoldExtremeBitClearingToShifts()
4526 SDValue N0 = N->getOperand(0); in visitAND()
4527 SDValue N1 = N->getOperand(1); in visitAND()
4591 ISD::matchBinaryPredicate(N0.getOperand(1), N1, MatchSubset)) in visitAND()
4595 SDValue N0Op0 = N0.getOperand(0); in visitAND()
4619 N0.getValueSizeInBits() == N0.getOperand(0).getScalarValueSizeInBits() && in visitAND()
4620 N0.getOperand(0).getOpcode() == ISD::LOAD && in visitAND()
4621 N0.getOperand(0).getResNo() == 0) || in visitAND()
4624 N0 : N0.getOperand(0) ); in visitAND()
4723 N0.getOperand(0).getOpcode() == ISD::LOAD))) { in visitAND()
4726 ? cast<LoadSDNode>(N0.getOperand(0)) : cast<LoadSDNode>(N0); in visitAND()
4759 if (isNullOrNullSplat(N0.getOperand(0))) { in visitAND()
4760 SDValue SubRHS = N0.getOperand(1); in visitAND()
4762 SubRHS.getOperand(0).getScalarValueSizeInBits() == 1) in visitAND()
4765 SubRHS.getOperand(0).getScalarValueSizeInBits() == 1) in visitAND()
4766 return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), VT, SubRHS.getOperand(0)); in visitAND()
4816 if (SDValue BSwap = MatchBSwapHWordLow(N0.getNode(), N0.getOperand(0), in visitAND()
4817 N0.getOperand(1), false)) in visitAND()
4842 if (N0.getOpcode() == ISD::AND && N0.getOperand(0).getOpcode() == ISD::SRL) in MatchBSwapHWordLow()
4844 if (N1.getOpcode() == ISD::AND && N1.getOperand(0).getOpcode() == ISD::SHL) in MatchBSwapHWordLow()
4849 ConstantSDNode *N01C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in MatchBSwapHWordLow()
4855 N0 = N0.getOperand(0); in MatchBSwapHWordLow()
4862 ConstantSDNode *N11C = dyn_cast<ConstantSDNode>(N1.getOperand(1)); in MatchBSwapHWordLow()
4865 N1 = N1.getOperand(0); in MatchBSwapHWordLow()
4876 ConstantSDNode *N01C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in MatchBSwapHWordLow()
4877 ConstantSDNode *N11C = dyn_cast<ConstantSDNode>(N1.getOperand(1)); in MatchBSwapHWordLow()
4884 SDValue N00 = N0->getOperand(0); in MatchBSwapHWordLow()
4888 ConstantSDNode *N001C = dyn_cast<ConstantSDNode>(N00.getOperand(1)); in MatchBSwapHWordLow()
4891 N00 = N00.getOperand(0); in MatchBSwapHWordLow()
4895 SDValue N10 = N1->getOperand(0); in MatchBSwapHWordLow()
4899 ConstantSDNode *N101C = dyn_cast<ConstantSDNode>(N10.getOperand(1)); in MatchBSwapHWordLow()
4905 N10 = N10.getOperand(0); in MatchBSwapHWordLow()
4954 SDValue N0 = N.getOperand(0); in isBSwapHWordElement()
4962 N1C = dyn_cast<ConstantSDNode>(N.getOperand(1)); in isBSwapHWordElement()
4964 N1C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in isBSwapHWordElement()
4993 ConstantSDNode *C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in isBSwapHWordElement()
5001 ConstantSDNode *C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in isBSwapHWordElement()
5010 ConstantSDNode *C = dyn_cast<ConstantSDNode>(N.getOperand(1)); in isBSwapHWordElement()
5018 ConstantSDNode *C = dyn_cast<ConstantSDNode>(N.getOperand(1)); in isBSwapHWordElement()
5026 Parts[MaskByteOffset] = N0.getOperand(0).getNode(); in isBSwapHWordElement()
5051 SDValue N00 = N0.getOperand(0); in MatchBSwapHWord()
5052 SDValue N01 = N0.getOperand(1); in MatchBSwapHWord()
5063 SDValue N10 = N1.getOperand(0); in MatchBSwapHWord()
5066 SDValue N11 = N1.getOperand(1); in MatchBSwapHWord()
5077 SDValue N000 = N00.getOperand(0); in MatchBSwapHWord()
5080 SDValue N001 = N00.getOperand(1); in MatchBSwapHWord()
5125 getAsNonOpaqueConstant(N0.getOperand(1))) { in visitORLike()
5127 getAsNonOpaqueConstant(N1.getOperand(1))) { in visitORLike()
5133 if (DAG.MaskedValueIsZero(N0.getOperand(0), RHSMask&~LHSMask) && in visitORLike()
5134 DAG.MaskedValueIsZero(N1.getOperand(0), LHSMask&~RHSMask)) { in visitORLike()
5136 N0.getOperand(0), N1.getOperand(0)); in visitORLike()
5147 N0.getOperand(0) == N1.getOperand(0) && in visitORLike()
5151 N0.getOperand(1), N1.getOperand(1)); in visitORLike()
5152 return DAG.getNode(ISD::AND, DL, VT, N0.getOperand(0), X); in visitORLike()
5159 SDValue N0 = N->getOperand(0); in visitOR()
5160 SDValue N1 = N->getOperand(1); in visitOR()
5192 bool ZeroN00 = ISD::isBuildVectorAllZeros(N0.getOperand(0).getNode()); in visitOR()
5193 bool ZeroN01 = ISD::isBuildVectorAllZeros(N0.getOperand(1).getNode()); in visitOR()
5194 bool ZeroN10 = ISD::isBuildVectorAllZeros(N1.getOperand(0).getNode()); in visitOR()
5195 bool ZeroN11 = ISD::isBuildVectorAllZeros(N1.getOperand(1).getNode()); in visitOR()
5237 SDValue NewLHS = ZeroN00 ? N0.getOperand(1) : N0.getOperand(0); in visitOR()
5238 SDValue NewRHS = ZeroN10 ? N1.getOperand(1) : N1.getOperand(0); in visitOR()
5296 ISD::matchBinaryPredicate(N0.getOperand(1), N1, MatchIntersect, true)) { in visitOR()
5298 ISD::OR, SDLoc(N1), VT, N1.getNode(), N0.getOperand(1).getNode())) { in visitOR()
5299 SDValue IOR = DAG.getNode(ISD::OR, SDLoc(N0), VT, N0.getOperand(0), N1); in visitOR()
5326 DAG.isConstantIntBuildVectorOrConstantInt(Op.getOperand(1))) { in stripConstantMask()
5327 Mask = Op.getOperand(1); in stripConstantMask()
5328 return Op.getOperand(0); in stripConstantMask()
5397 SDValue OppShiftLHS = OppShift.getOperand(0); in extractShiftForRotate()
5400 OppShiftLHS.getOperand(0) != ExtractFrom.getOperand(0) || in extractShiftForRotate()
5405 ConstantSDNode *OppShiftCst = isConstOrConstSplat(OppShift.getOperand(1)); in extractShiftForRotate()
5407 ConstantSDNode *OppLHSCst = isConstOrConstSplat(OppShiftLHS.getOperand(1)); in extractShiftForRotate()
5410 isConstOrConstSplat(ExtractFrom.getOperand(1)); in extractShiftForRotate()
5452 EVT ShiftVT = OppShift.getOperand(1).getValueType(); in extractShiftForRotate()
5502 if (ConstantSDNode *NegC = isConstOrConstSplat(Neg.getOperand(1))) { in matchRotateSub()
5503 KnownBits Known = DAG.computeKnownBits(Neg.getOperand(0)); in matchRotateSub()
5507 Neg = Neg.getOperand(0); in matchRotateSub()
5516 ConstantSDNode *NegC = isConstOrConstSplat(Neg.getOperand(0)); in matchRotateSub()
5519 SDValue NegOp1 = Neg.getOperand(1); in matchRotateSub()
5524 if (ConstantSDNode *PosC = isConstOrConstSplat(Pos.getOperand(1))) { in matchRotateSub()
5525 KnownBits Known = DAG.computeKnownBits(Pos.getOperand(0)); in matchRotateSub()
5529 Pos = Pos.getOperand(0); in matchRotateSub()
5555 else if (Pos.getOpcode() == ISD::ADD && Pos.getOperand(0) == NegOp1) { in matchRotateSub()
5556 if (ConstantSDNode *PosC = isConstOrConstSplat(Pos.getOperand(1))) in matchRotateSub()
5611 LHS.getOperand(0).getValueType() == RHS.getOperand(0).getValueType()) { in MatchRotate()
5613 if (SDNode *Rot = MatchRotate(LHS.getOperand(0), RHS.getOperand(0), DL)) { in MatchRotate()
5657 if (LHSShift.getOperand(0) != RHSShift.getOperand(0)) in MatchRotate()
5671 SDValue LHSShiftArg = LHSShift.getOperand(0); in MatchRotate()
5672 SDValue LHSShiftAmt = LHSShift.getOperand(1); in MatchRotate()
5673 SDValue RHSShiftArg = RHSShift.getOperand(0); in MatchRotate()
5674 SDValue RHSShiftAmt = RHSShift.getOperand(1); in MatchRotate()
5724 LExtOp0 = LHSShiftAmt.getOperand(0); in MatchRotate()
5725 RExtOp0 = RHSShiftAmt.getOperand(0); in MatchRotate()
5805 auto LHS = calculateByteProvider(Op->getOperand(0), Index, Depth + 1); in calculateByteProvider()
5808 auto RHS = calculateByteProvider(Op->getOperand(1), Index, Depth + 1); in calculateByteProvider()
5819 auto ShiftOp = dyn_cast<ConstantSDNode>(Op->getOperand(1)); in calculateByteProvider()
5830 : calculateByteProvider(Op->getOperand(0), Index - ByteShift, in calculateByteProvider()
5836 SDValue NarrowOp = Op->getOperand(0); in calculateByteProvider()
5849 return calculateByteProvider(Op->getOperand(0), ByteWidth - Index - 1, in calculateByteProvider()
6055 if (isAllOnesOrAllOnesSplat(N->getOperand(1))) in unfoldMaskedMerge()
6066 SDValue Xor = And.getOperand(XorIdx); in unfoldMaskedMerge()
6069 SDValue Xor0 = Xor.getOperand(0); in unfoldMaskedMerge()
6070 SDValue Xor1 = Xor.getOperand(1); in unfoldMaskedMerge()
6080 M = And.getOperand(XorIdx ? 0 : 1); in unfoldMaskedMerge()
6084 SDValue N0 = N->getOperand(0); in unfoldMaskedMerge()
6085 SDValue N1 = N->getOperand(1); in unfoldMaskedMerge()
6121 SDValue N0 = N->getOperand(0); in visitXOR()
6122 SDValue N1 = N->getOperand(1); in visitXOR()
6180 return DAG.getSelectCC(SDLoc(N0), LHS, RHS, N0.getOperand(2), in visitXOR()
6181 N0.getOperand(3), NotCC); in visitXOR()
6188 isSetCCEquivalent(N0.getOperand(0), LHS, RHS, CC)){ in visitXOR()
6189 SDValue V = N0.getOperand(0); in visitXOR()
6200 SDValue LHS = N0.getOperand(0), RHS = N0.getOperand(1); in visitXOR()
6212 SDValue LHS = N0.getOperand(0), RHS = N0.getOperand(1); in visitXOR()
6222 if (N0Opcode == ISD::AND && N0.hasOneUse() && N0->getOperand(1) == N1) { in visitXOR()
6223 SDValue X = N0.getOperand(0); in visitXOR()
6231 ConstantSDNode *ShiftC = isConstOrConstSplat(N0.getOperand(1)); in visitXOR()
6244 SDValue Not = DAG.getNOT(DL, N0.getOperand(0), VT); in visitXOR()
6245 return DAG.getNode(N0Opcode, DL, VT, Not, N0.getOperand(1)); in visitXOR()
6256 SDValue A0 = A.getOperand(0), A1 = A.getOperand(1); in visitXOR()
6257 SDValue S0 = S.getOperand(0); in visitXOR()
6260 if (ConstantSDNode *C = isConstOrConstSplat(S.getOperand(1))) in visitXOR()
6290 isAllOnesConstant(N1) && isOneConstant(N0.getOperand(0))) { in visitXOR()
6292 N0.getOperand(1)); in visitXOR()
6315 if (isBitwiseNot(N->getOperand(0))) in visitShiftByConstant()
6318 SDNode *LHS = N->getOperand(0).getNode(); in visitShiftByConstant()
6344 ConstantSDNode *BinOpCst = getAsNonOpaqueConstant(LHS->getOperand(1)); in visitShiftByConstant()
6349 SDNode *BinOpLHSVal = LHS->getOperand(0).getNode(); in visitShiftByConstant()
6356 if ((!isShift || !isa<ConstantSDNode>(BinOpLHSVal->getOperand(1))) && in visitShiftByConstant()
6379 SDValue NewRHS = DAG.getNode(N->getOpcode(), SDLoc(LHS->getOperand(1)), in visitShiftByConstant()
6381 LHS->getOperand(1), N->getOperand(1)); in visitShiftByConstant()
6386 SDLoc(LHS->getOperand(0)), in visitShiftByConstant()
6387 VT, LHS->getOperand(0), N->getOperand(1)); in visitShiftByConstant()
6395 assert(N->getOperand(0).getOpcode() == ISD::AND); in distributeTruncateThroughAnd()
6398 if (N->hasOneUse() && N->getOperand(0).hasOneUse()) { in distributeTruncateThroughAnd()
6399 SDValue N01 = N->getOperand(0).getOperand(1); in distributeTruncateThroughAnd()
6403 SDValue N00 = N->getOperand(0).getOperand(0); in distributeTruncateThroughAnd()
6417 SDValue N0 = N->getOperand(0); in visitRotate()
6418 SDValue N1 = N->getOperand(1); in visitRotate()
6444 N1.getOperand(0).getOpcode() == ISD::AND) { in visitRotate()
6453 SDNode *C2 = DAG.isConstantIntBuildVectorOrConstantInt(N0.getOperand(1)); in visitRotate()
6464 return DAG.getNode(N->getOpcode(), dl, VT, N0->getOperand(0), in visitRotate()
6473 SDValue N0 = N->getOperand(0); in visitSHL()
6474 SDValue N1 = N->getOperand(1); in visitSHL()
6491 SDValue N00 = N0->getOperand(0); in visitSHL()
6492 SDValue N01 = N0->getOperand(1); in visitSHL()
6496 TLI.getBooleanContents(N00.getOperand(0).getValueType()) == in visitSHL()
6522 N1.getOperand(0).getOpcode() == ISD::AND) { in visitSHL()
6539 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchOutOfRange)) in visitSHL()
6549 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchInRange)) { in visitSHL()
6552 SDValue Sum = DAG.getNode(ISD::ADD, DL, ShiftVT, N1, N0.getOperand(1)); in visitSHL()
6553 return DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0), Sum); in visitSHL()
6565 N0.getOperand(0).getOpcode() == ISD::SHL) { in visitSHL()
6566 SDValue N0Op0 = N0.getOperand(0); in visitSHL()
6567 if (ConstantSDNode *N0Op0C1 = isConstOrConstSplat(N0Op0.getOperand(1))) { in visitSHL()
6582 DAG.getNode(N0.getOpcode(), DL, VT, N0Op0->getOperand(0)), in visitSHL()
6592 N0.getOperand(0).getOpcode() == ISD::SRL) { in visitSHL()
6593 SDValue N0Op0 = N0.getOperand(0); in visitSHL()
6594 if (ConstantSDNode *N0Op0C1 = isConstOrConstSplat(N0Op0.getOperand(1))) { in visitSHL()
6599 SDValue NewOp0 = N0.getOperand(0); in visitSHL()
6600 EVT CountVT = NewOp0.getOperand(1).getValueType(); in visitSHL()
6616 if (ConstantSDNode *N0C1 = isConstOrConstSplat(N0.getOperand(1))) { in visitSHL()
6621 return DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0), in visitSHL()
6623 return DAG.getNode(N0.getOpcode(), DL, VT, N0.getOperand(0), in visitSHL()
6634 if (ConstantSDNode *N0C1 = isConstOrConstSplat(N0.getOperand(1))) { in visitSHL()
6643 Shift = DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0), in visitSHL()
6648 Shift = DAG.getNode(ISD::SRL, DL, VT, N0.getOperand(0), in visitSHL()
6659 if (N0.getOpcode() == ISD::SRA && N1 == N0.getOperand(1) && in visitSHL()
6664 return DAG.getNode(ISD::AND, DL, VT, N0.getOperand(0), HiBitsMask); in visitSHL()
6674 isConstantOrConstantVector(N0.getOperand(1), /* No Opaques */ true) && in visitSHL()
6676 SDValue Shl0 = DAG.getNode(ISD::SHL, SDLoc(N0), VT, N0.getOperand(0), N1); in visitSHL()
6677 SDValue Shl1 = DAG.getNode(ISD::SHL, SDLoc(N1), VT, N0.getOperand(1), N1); in visitSHL()
6686 isConstantOrConstantVector(N0.getOperand(1), /* No Opaques */ true)) { in visitSHL()
6687 SDValue Shl = DAG.getNode(ISD::SHL, SDLoc(N1), VT, N0.getOperand(1), N1); in visitSHL()
6689 return DAG.getNode(ISD::MUL, SDLoc(N), VT, N0.getOperand(0), Shl); in visitSHL()
6700 SDValue N0 = N->getOperand(0); in visitSRA()
6701 SDValue N1 = N->getOperand(1); in visitSRA()
6731 if (N1C && N0.getOpcode() == ISD::SHL && N1 == N0.getOperand(1)) { in visitSRA()
6740 N0.getOperand(0), DAG.getValueType(ExtVT)); in visitSRA()
6761 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), SumOfShifts)) { in visitSRA()
6767 return DAG.getNode(ISD::SRA, DL, VT, N0.getOperand(0), ShiftValue); in visitSRA()
6778 const ConstantSDNode *N01C = isConstOrConstSplat(N0.getOperand(1)); in visitSRA()
6800 getShiftAmountTy(N0.getOperand(0).getValueType())); in visitSRA()
6802 N0.getOperand(0), Amt); in visitSRA()
6813 N1.getOperand(0).getOpcode() == ISD::AND) { in visitSRA()
6821 (N0.getOperand(0).getOpcode() == ISD::SRL || in visitSRA()
6822 N0.getOperand(0).getOpcode() == ISD::SRA) && in visitSRA()
6823 N0.getOperand(0).hasOneUse() && in visitSRA()
6824 N0.getOperand(0).getOperand(1).hasOneUse() && in visitSRA()
6826 SDValue N0Op0 = N0.getOperand(0); in visitSRA()
6827 if (ConstantSDNode *LargeShift = isConstOrConstSplat(N0Op0.getOperand(1))) { in visitSRA()
6835 getShiftAmountTy(N0Op0.getOperand(0).getValueType())); in visitSRA()
6837 N0Op0.getOperand(0), Amt); in visitSRA()
6859 SDValue N0 = N->getOperand(0); in visitSRL()
6860 SDValue N1 = N->getOperand(1); in visitSRL()
6896 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchOutOfRange)) in visitSRL()
6906 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchInRange)) { in visitSRL()
6909 SDValue Sum = DAG.getNode(ISD::ADD, DL, ShiftVT, N1, N0.getOperand(1)); in visitSRL()
6910 return DAG.getNode(ISD::SRL, DL, VT, N0.getOperand(0), Sum); in visitSRL()
6916 N0.getOperand(0).getOpcode() == ISD::SRL) { in visitSRL()
6917 if (auto N001C = isConstOrConstSplat(N0.getOperand(0).getOperand(1))) { in visitSRL()
6920 EVT InnerShiftVT = N0.getOperand(0).getValueType(); in visitSRL()
6921 EVT ShiftCountVT = N0.getOperand(0).getOperand(1).getValueType(); in visitSRL()
6930 N0.getOperand(0).getOperand(0), in visitSRL()
6938 if (N0.getOpcode() == ISD::SHL && N0.getOperand(1) == N1 && in visitSRL()
6944 return DAG.getNode(ISD::AND, DL, VT, N0.getOperand(0), Mask); in visitSRL()
6950 EVT SmallVT = N0.getOperand(0).getValueType(); in visitSRL()
6959 N0.getOperand(0), in visitSRL()
6975 return DAG.getNode(ISD::SRL, SDLoc(N), VT, N0.getOperand(0), N1); in visitSRL()
6981 KnownBits Known = DAG.computeKnownBits(N0.getOperand(0)); in visitSRL()
6999 SDValue Op = N0.getOperand(0); in visitSRL()
7017 N1.getOperand(0).getOpcode() == ISD::AND) { in visitSRL()
7069 SDValue N0 = N->getOperand(0); in visitFunnelShift()
7070 SDValue N1 = N->getOperand(1); in visitFunnelShift()
7071 SDValue N2 = N->getOperand(2); in visitFunnelShift()
7103 SDValue N0 = N->getOperand(0); in visitABS()
7119 SDValue N0 = N->getOperand(0); in visitBSWAP()
7127 return N0->getOperand(0); in visitBSWAP()
7132 SDValue N0 = N->getOperand(0); in visitBITREVERSE()
7140 return N0.getOperand(0); in visitBITREVERSE()
7145 SDValue N0 = N->getOperand(0); in visitCTLZ()
7162 SDValue N0 = N->getOperand(0); in visitCTLZ_ZERO_UNDEF()
7172 SDValue N0 = N->getOperand(0); in visitCTTZ()
7189 SDValue N0 = N->getOperand(0); in visitCTTZ_ZERO_UNDEF()
7199 SDValue N0 = N->getOperand(0); in visitCTPOP()
7267 SDValue Cond = N->getOperand(0); in foldSelectOfConstants()
7268 SDValue N1 = N->getOperand(1); in foldSelectOfConstants()
7269 SDValue N2 = N->getOperand(2); in foldSelectOfConstants()
7361 SDValue N0 = N->getOperand(0); in visitSELECT()
7362 SDValue N1 = N->getOperand(1); in visitSELECT()
7363 SDValue N2 = N->getOperand(2); in visitSELECT()
7414 SDValue Cond0 = N0->getOperand(0); in visitSELECT()
7415 SDValue Cond1 = N0->getOperand(1); in visitSELECT()
7424 SDValue Cond0 = N0->getOperand(0); in visitSELECT()
7425 SDValue Cond1 = N0->getOperand(1); in visitSELECT()
7435 SDValue N1_0 = N1->getOperand(0); in visitSELECT()
7436 SDValue N1_1 = N1->getOperand(1); in visitSELECT()
7437 SDValue N1_2 = N1->getOperand(2); in visitSELECT()
7452 SDValue N2_0 = N2->getOperand(0); in visitSELECT()
7453 SDValue N2_1 = N2->getOperand(1); in visitSELECT()
7454 SDValue N2_2 = N2->getOperand(2); in visitSELECT()
7472 return DAG.getNode(ISD::SELECT, DL, VT, N0->getOperand(0), N2, N1); in visitSELECT()
7477 SDValue Cond0 = N0.getOperand(0), Cond1 = N0.getOperand(1); in visitSELECT()
7478 ISD::CondCode CC = cast<CondCodeSDNode>(N0.getOperand(2))->get(); in visitSELECT()
7496 N2.getOpcode() == ISD::ADD && Cond0 == N2.getOperand(0)) { in visitSELECT()
7497 auto *C = dyn_cast<ConstantSDNode>(N2.getOperand(1)); in visitSELECT()
7513 SDValue UAO = DAG.getNode(ISD::UADDO, DL, VTs, Cond0, N2.getOperand(1)); in visitSELECT()
7521 N0.getOperand(2)); in visitSELECT()
7540 Lo = DAG.getNode(N->getOpcode(), DL, LoVT, LL, RL, N->getOperand(2)); in SplitVSETCC()
7541 Hi = DAG.getNode(N->getOpcode(), DL, HiVT, LH, RH, N->getOperand(2)); in SplitVSETCC()
7550 SDValue Cond = N->getOperand(0); in ConvertSelectToConcatVector()
7551 SDValue LHS = N->getOperand(1); in ConvertSelectToConcatVector()
7552 SDValue RHS = N->getOperand(2); in ConvertSelectToConcatVector()
7571 if (Cond->getOperand(i)->isUndef()) in ConvertSelectToConcatVector()
7575 BottomHalf = cast<ConstantSDNode>(Cond.getOperand(i)); in ConvertSelectToConcatVector()
7576 else if (Cond->getOperand(i).getNode() != BottomHalf) in ConvertSelectToConcatVector()
7583 if (Cond->getOperand(i)->isUndef()) in ConvertSelectToConcatVector()
7587 TopHalf = cast<ConstantSDNode>(Cond.getOperand(i)); in ConvertSelectToConcatVector()
7588 else if (Cond->getOperand(i).getNode() != TopHalf) in ConvertSelectToConcatVector()
7597 BottomHalf->isNullValue() ? RHS->getOperand(0) : LHS->getOperand(0), in ConvertSelectToConcatVector()
7598 TopHalf->isNullValue() ? RHS->getOperand(1) : LHS->getOperand(1)); in ConvertSelectToConcatVector()
7894 SDValue Cond = N->getOperand(0); in foldVSelectOfConstants()
7895 SDValue N1 = N->getOperand(1); in foldVSelectOfConstants()
7896 SDValue N2 = N->getOperand(2); in foldVSelectOfConstants()
7911 SDValue N1Elt = N1.getOperand(i); in foldVSelectOfConstants()
7912 SDValue N2Elt = N2.getOperand(i); in foldVSelectOfConstants()
7943 SDValue N0 = N->getOperand(0); in visitVSELECT()
7944 SDValue N1 = N->getOperand(1); in visitVSELECT()
7945 SDValue N2 = N->getOperand(2); in visitVSELECT()
7957 SDValue LHS = N0.getOperand(0), RHS = N0.getOperand(1); in visitVSELECT()
7958 ISD::CondCode CC = cast<CondCodeSDNode>(N0.getOperand(2))->get(); in visitVSELECT()
7964 N1 == LHS && N2.getOpcode() == ISD::SUB && N1 == N2.getOperand(1)) in visitVSELECT()
7965 isAbs = ISD::isBuildVectorAllZeros(N2.getOperand(0).getNode()); in visitVSELECT()
7967 N2 == LHS && N1.getOpcode() == ISD::SUB && N2 == N1.getOperand(1)) in visitVSELECT()
7968 isAbs = ISD::isBuildVectorAllZeros(N1.getOperand(0).getNode()); in visitVSELECT()
7991 if (N0.hasOneUse() && isLegalToCombineMinNumMaxNum(DAG, N0.getOperand(0), N0.getOperand(1))) { in visitVSELECT()
7992 ISD::CondCode CC = cast<CondCodeSDNode>(N0.getOperand(2))->get(); in visitVSELECT()
7994 DL, VT, N0.getOperand(0), N0.getOperand(1), N1, N2, CC, TLI, DAG)) in visitVSELECT()
8056 SDValue N0 = N->getOperand(0); in visitSELECT_CC()
8057 SDValue N1 = N->getOperand(1); in visitSELECT_CC()
8058 SDValue N2 = N->getOperand(2); in visitSELECT_CC()
8059 SDValue N3 = N->getOperand(3); in visitSELECT_CC()
8060 SDValue N4 = N->getOperand(4); in visitSELECT_CC()
8084 SCC.getOperand(0), SCC.getOperand(1), N2, N3, in visitSELECT_CC()
8085 SCC.getOperand(2)); in visitSELECT_CC()
8105 N->getValueType(0), N->getOperand(0), N->getOperand(1), in visitSETCC()
8106 cast<CondCodeSDNode>(N->getOperand(2))->get(), SDLoc(N), !PreferSetCC); in visitSETCC()
8128 SDValue LHS = N->getOperand(0); in visitSETCCCARRY()
8129 SDValue RHS = N->getOperand(1); in visitSETCCCARRY()
8130 SDValue Carry = N->getOperand(2); in visitSETCCCARRY()
8131 SDValue Cond = N->getOperand(3); in visitSETCCCARRY()
8149 SDValue N0 = N->getOperand(0); in tryToFoldExtendOfConstant()
8184 SDValue Op = N0.getOperand(i); in tryToFoldExtendOfConstant()
8223 ISD::CondCode CC = cast<CondCodeSDNode>(User->getOperand(2))->get(); in ExtendUsesToFormExtLoad()
8229 SDValue UseOp = User->getOperand(i); in ExtendUsesToFormExtLoad()
8276 SDValue SOp = SetCC->getOperand(j); in ExtendSetCCUses()
8283 Ops.push_back(SetCC->getOperand(2)); in ExtendSetCCUses()
8290 SDValue N0 = N->getOperand(0); in CombineExtLoad()
8392 SDValue N0 = N->getOperand(0); in CombineZExtLogicopShiftLoad()
8395 N0.getOperand(1).getOpcode() != ISD::Constant || in CombineZExtLogicopShiftLoad()
8400 SDValue N1 = N0->getOperand(0); in CombineZExtLogicopShiftLoad()
8402 N1.getOperand(1).getOpcode() != ISD::Constant || in CombineZExtLogicopShiftLoad()
8407 if (!isa<LoadSDNode>(N1.getOperand(0))) in CombineZExtLogicopShiftLoad()
8409 LoadSDNode *Load = cast<LoadSDNode>(N1.getOperand(0)); in CombineZExtLogicopShiftLoad()
8425 if (!ExtendUsesToFormExtLoad(VT, N1.getNode(), N1.getOperand(0), in CombineZExtLogicopShiftLoad()
8436 N1.getOperand(1)); in CombineZExtLogicopShiftLoad()
8438 APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue(); in CombineZExtLogicopShiftLoad()
8444 ExtendSetCCUses(SetCCs, N1.getOperand(0), ExtLoad, ISD::ZERO_EXTEND); in CombineZExtLogicopShiftLoad()
8474 SDValue VSel = Cast->getOperand(0); in matchVSelectOpSizesWithSetCC()
8476 VSel.getOperand(0).getOpcode() != ISD::SETCC) in matchVSelectOpSizesWithSetCC()
8480 SDValue SetCC = VSel.getOperand(0); in matchVSelectOpSizesWithSetCC()
8481 EVT SetCCVT = getSetCCResultType(SetCC.getOperand(0).getValueType()); in matchVSelectOpSizesWithSetCC()
8486 SDValue A = VSel.getOperand(1); in matchVSelectOpSizesWithSetCC()
8487 SDValue B = VSel.getOperand(2); in matchVSelectOpSizesWithSetCC()
8492 CastA = DAG.getNode(CastOpcode, DL, VT, A, Cast->getOperand(1)); in matchVSelectOpSizesWithSetCC()
8493 CastB = DAG.getNode(CastOpcode, DL, VT, B, Cast->getOperand(1)); in matchVSelectOpSizesWithSetCC()
8575 SDValue SetCC = N->getOperand(0); in foldExtendedSignBitTest()
8580 SDValue X = SetCC.getOperand(0); in foldExtendedSignBitTest()
8581 SDValue Ones = SetCC.getOperand(1); in foldExtendedSignBitTest()
8582 ISD::CondCode CC = cast<CondCodeSDNode>(SetCC.getOperand(2))->get(); in foldExtendedSignBitTest()
8602 SDValue N0 = N->getOperand(0); in visitSIGN_EXTEND()
8612 return DAG.getNode(ISD::SIGN_EXTEND, DL, VT, N0.getOperand(0)); in visitSIGN_EXTEND()
8618 SDNode *oye = N0.getOperand(0).getNode(); in visitSIGN_EXTEND()
8629 SDValue Op = N0.getOperand(0); in visitSIGN_EXTEND()
8684 isa<LoadSDNode>(N0.getOperand(0)) && in visitSIGN_EXTEND()
8685 N0.getOperand(1).getOpcode() == ISD::Constant && in visitSIGN_EXTEND()
8687 LoadSDNode *LN00 = cast<LoadSDNode>(N0.getOperand(0)); in visitSIGN_EXTEND()
8692 bool DoXform = ExtendUsesToFormExtLoad(VT, N0.getNode(), N0.getOperand(0), in visitSIGN_EXTEND()
8699 APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue(); in visitSIGN_EXTEND()
8703 ExtendSetCCUses(SetCCs, N0.getOperand(0), ExtLoad, ISD::SIGN_EXTEND); in visitSIGN_EXTEND()
8729 SDValue N00 = N0.getOperand(0); in visitSIGN_EXTEND()
8730 SDValue N01 = N0.getOperand(1); in visitSIGN_EXTEND()
8731 ISD::CondCode CC = cast<CondCodeSDNode>(N0.getOperand(2))->get(); in visitSIGN_EXTEND()
8732 EVT N00VT = N0.getOperand(0).getValueType(); in visitSIGN_EXTEND()
8817 Op = N->getOperand(0); in isTruncateOf()
8824 cast<CondCodeSDNode>(N.getOperand(2))->get() != ISD::SETNE) in isTruncateOf()
8827 SDValue Op0 = N->getOperand(0); in isTruncateOf()
8828 SDValue Op1 = N->getOperand(1); in isTruncateOf()
8844 SDValue N0 = N->getOperand(0); in visitZERO_EXTEND()
8854 N0.getOperand(0)); in visitZERO_EXTEND()
8878 SDNode *oye = N0.getOperand(0).getNode(); in visitZERO_EXTEND()
8887 EVT SrcVT = N0.getOperand(0).getValueType(); in visitZERO_EXTEND()
8895 SDValue Op = N0.getOperand(0); in visitZERO_EXTEND()
8906 SDValue Op = DAG.getAnyExtOrTrunc(N0.getOperand(0), SDLoc(N), VT); in visitZERO_EXTEND()
8919 N0.getOperand(0).getOpcode() == ISD::TRUNCATE && in visitZERO_EXTEND()
8920 N0.getOperand(1).getOpcode() == ISD::Constant && in visitZERO_EXTEND()
8921 (!TLI.isTruncateFree(N0.getOperand(0).getOperand(0).getValueType(), in visitZERO_EXTEND()
8924 SDValue X = N0.getOperand(0).getOperand(0); in visitZERO_EXTEND()
8926 APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue(); in visitZERO_EXTEND()
8950 isa<LoadSDNode>(N0.getOperand(0)) && in visitZERO_EXTEND()
8951 N0.getOperand(1).getOpcode() == ISD::Constant && in visitZERO_EXTEND()
8953 LoadSDNode *LN00 = cast<LoadSDNode>(N0.getOperand(0)); in visitZERO_EXTEND()
8961 auto *AndC = cast<ConstantSDNode>(N0.getOperand(1)); in visitZERO_EXTEND()
8969 DoXform = ExtendUsesToFormExtLoad(VT, N0.getNode(), N0.getOperand(0), in visitZERO_EXTEND()
8976 APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue(); in visitZERO_EXTEND()
8981 ExtendSetCCUses(SetCCs, N0.getOperand(0), ExtLoad, ISD::ZERO_EXTEND); in visitZERO_EXTEND()
9020 EVT N00VT = N0.getOperand(0).getValueType(); in visitZERO_EXTEND()
9033 SDValue VSetCC = DAG.getNode(ISD::SETCC, DL, VT, N0.getOperand(0), in visitZERO_EXTEND()
9034 N0.getOperand(1), N0.getOperand(2)); in visitZERO_EXTEND()
9043 DAG.getNode(ISD::SETCC, DL, MatchingVectorType, N0.getOperand(0), in visitZERO_EXTEND()
9044 N0.getOperand(1), N0.getOperand(2)); in visitZERO_EXTEND()
9052 DL, N0.getOperand(0), N0.getOperand(1), DAG.getConstant(1, DL, VT), in visitZERO_EXTEND()
9054 cast<CondCodeSDNode>(N0.getOperand(2))->get(), true)) in visitZERO_EXTEND()
9060 isa<ConstantSDNode>(N0.getOperand(1)) && in visitZERO_EXTEND()
9061 N0.getOperand(0).getOpcode() == ISD::ZERO_EXTEND && in visitZERO_EXTEND()
9063 SDValue ShAmt = N0.getOperand(1); in visitZERO_EXTEND()
9066 SDValue InnerZExt = N0.getOperand(0); in visitZERO_EXTEND()
9070 InnerZExt.getOperand(0).getValueSizeInBits(); in visitZERO_EXTEND()
9082 DAG.getNode(ISD::ZERO_EXTEND, DL, VT, N0.getOperand(0)), in visitZERO_EXTEND()
9093 SDValue N0 = N->getOperand(0); in visitANY_EXTEND()
9105 return DAG.getNode(N0.getOpcode(), SDLoc(N), VT, N0.getOperand(0)); in visitANY_EXTEND()
9111 SDNode *oye = N0.getOperand(0).getNode(); in visitANY_EXTEND()
9123 return DAG.getAnyExtOrTrunc(N0.getOperand(0), SDLoc(N), VT); in visitANY_EXTEND()
9128 N0.getOperand(0).getOpcode() == ISD::TRUNCATE && in visitANY_EXTEND()
9129 N0.getOperand(1).getOpcode() == ISD::Constant && in visitANY_EXTEND()
9130 !TLI.isTruncateFree(N0.getOperand(0).getOperand(0).getValueType(), in visitANY_EXTEND()
9133 SDValue X = N0.getOperand(0).getOperand(0); in visitANY_EXTEND()
9135 APInt Mask = cast<ConstantSDNode>(N0.getOperand(1))->getAPIntValue(); in visitANY_EXTEND()
9199 EVT N00VT = N0.getOperand(0).getValueType(); in visitANY_EXTEND()
9209 return DAG.getSetCC(SDLoc(N), VT, N0.getOperand(0), in visitANY_EXTEND()
9210 N0.getOperand(1), in visitANY_EXTEND()
9211 cast<CondCodeSDNode>(N0.getOperand(2))->get()); in visitANY_EXTEND()
9218 DAG.getSetCC(SDLoc(N), MatchingVectorType, N0.getOperand(0), in visitANY_EXTEND()
9219 N0.getOperand(1), in visitANY_EXTEND()
9220 cast<CondCodeSDNode>(N0.getOperand(2))->get()); in visitANY_EXTEND()
9227 DL, N0.getOperand(0), N0.getOperand(1), DAG.getConstant(1, DL, VT), in visitANY_EXTEND()
9229 cast<CondCodeSDNode>(N0.getOperand(2))->get(), true)) in visitANY_EXTEND()
9238 SDValue N0 = N->getOperand(0); in visitAssertExt()
9239 SDValue N1 = N->getOperand(1); in visitAssertExt()
9244 AssertVT == cast<VTSDNode>(N0.getOperand(1))->getVT()) in visitAssertExt()
9248 N0.getOperand(0).getOpcode() == Opcode) { in visitAssertExt()
9254 SDValue BigA = N0.getOperand(0); in visitAssertExt()
9255 EVT BigA_AssertVT = cast<VTSDNode>(BigA.getOperand(1))->getVT(); in visitAssertExt()
9264 BigA.getOperand(0), MinAssertVTVal); in visitAssertExt()
9272 N0.getOperand(0).getOpcode() == ISD::AssertSext && in visitAssertExt()
9274 SDValue BigA = N0.getOperand(0); in visitAssertExt()
9275 EVT BigA_AssertVT = cast<VTSDNode>(BigA.getOperand(1))->getVT(); in visitAssertExt()
9283 BigA.getOperand(0), N1); in visitAssertExt()
9301 SDValue N0 = N->getOperand(0); in ReduceLoadWidth()
9315 ExtVT = cast<VTSDNode>(N->getOperand(1))->getVT(); in ReduceLoadWidth()
9323 auto *LN0 = dyn_cast<LoadSDNode>(N0.getOperand(0)); in ReduceLoadWidth()
9324 auto *N01 = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in ReduceLoadWidth()
9337 auto AndC = dyn_cast<ConstantSDNode>(N->getOperand(1)); in ReduceLoadWidth()
9359 if (auto *ConstShift = dyn_cast<ConstantSDNode>(SRL.getOperand(1))) { in ReduceLoadWidth()
9364 N0 = N0.getOperand(0); in ReduceLoadWidth()
9391 isa<ConstantSDNode>(Mask->getOperand(1))) { in ReduceLoadWidth()
9393 cast<ConstantSDNode>(Mask->getOperand(1))->getAPIntValue(); in ReduceLoadWidth()
9411 if (ConstantSDNode *N01 = dyn_cast<ConstantSDNode>(N0.getOperand(1))) { in ReduceLoadWidth()
9413 N0 = N0.getOperand(0); in ReduceLoadWidth()
9436 EVT PtrType = N0.getOperand(1).getValueType(); in ReduceLoadWidth()
9502 SDValue N0 = N->getOperand(0); in visitSIGN_EXTEND_INREG()
9503 SDValue N1 = N->getOperand(1); in visitSIGN_EXTEND_INREG()
9522 EVT.bitsLT(cast<VTSDNode>(N0.getOperand(1))->getVT())) in visitSIGN_EXTEND_INREG()
9524 N0.getOperand(0), N1); in visitSIGN_EXTEND_INREG()
9531 SDValue N00 = N0.getOperand(0); in visitSIGN_EXTEND_INREG()
9543 N0.getOperand(0).getScalarValueSizeInBits() == EVTBits) { in visitSIGN_EXTEND_INREG()
9547 N0.getOperand(0)); in visitSIGN_EXTEND_INREG()
9553 SDValue N00 = N0.getOperand(0); in visitSIGN_EXTEND_INREG()
9577 if (ConstantSDNode *ShAmt = dyn_cast<ConstantSDNode>(N0.getOperand(1))) in visitSIGN_EXTEND_INREG()
9581 unsigned InSignBits = DAG.ComputeNumSignBits(N0.getOperand(0)); in visitSIGN_EXTEND_INREG()
9584 N0.getOperand(0), N0.getOperand(1)); in visitSIGN_EXTEND_INREG()
9626 if (SDValue BSwap = MatchBSwapHWordLow(N0.getNode(), N0.getOperand(0), in visitSIGN_EXTEND_INREG()
9627 N0.getOperand(1), false)) in visitSIGN_EXTEND_INREG()
9636 SDValue N0 = N->getOperand(0); in visitSIGN_EXTEND_VECTOR_INREG()
9652 SDValue N0 = N->getOperand(0); in visitZERO_EXTEND_VECTOR_INREG()
9668 SDValue N0 = N->getOperand(0); in visitTRUNCATE()
9678 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0.getOperand(0)); in visitTRUNCATE()
9692 if (N0.getOperand(0).getValueType().bitsLT(VT)) in visitTRUNCATE()
9693 return DAG.getNode(N0.getOpcode(), SDLoc(N), VT, N0.getOperand(0)); in visitTRUNCATE()
9695 if (N0.getOperand(0).getValueType().bitsGT(VT)) in visitTRUNCATE()
9696 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0.getOperand(0)); in visitTRUNCATE()
9699 return N0.getOperand(0); in visitTRUNCATE()
9718 EVT VecTy = N0.getOperand(0).getValueType(); in visitTRUNCATE()
9728 SDValue EltNo = N0->getOperand(1); in visitTRUNCATE()
9736 DAG.getBitcast(NVT, N0.getOperand(0)), in visitTRUNCATE()
9747 SDValue Cond = N0.getOperand(0); in visitTRUNCATE()
9748 SDValue TruncOp0 = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(1)); in visitTRUNCATE()
9749 SDValue TruncOp1 = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(2)); in visitTRUNCATE()
9758 SDValue Amt = N0.getOperand(1); in visitTRUNCATE()
9765 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(0)); in visitTRUNCATE()
9780 N0.getOperand(0).getOpcode() == ISD::BUILD_VECTOR && in visitTRUNCATE()
9781 N0.getOperand(0).hasOneUse()) { in visitTRUNCATE()
9782 SDValue BuildVect = N0.getOperand(0); in visitTRUNCATE()
9798 Opnds.push_back(BuildVect.getOperand(i)); in visitTRUNCATE()
9847 SDValue X = N0.getOperand(i); in visitTRUNCATE()
9885 SDValue VecSrc = N0.getOperand(0); in visitTRUNCATE()
9911 auto X = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(0)); in visitTRUNCATE()
9912 auto Y = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(1)); in visitTRUNCATE()
9914 return DAG.getNode(N0.getOpcode(), SL, VTs, X, Y, N0.getOperand(2)); in visitTRUNCATE()
9922 SDValue N00 = N0.getOperand(0); in visitTRUNCATE()
9926 if (N00.getOperand(0)->getValueType(0).getVectorElementType() == in visitTRUNCATE()
9928 return DAG.getNode(ISD::EXTRACT_SUBVECTOR, SDLoc(N0->getOperand(0)), VT, in visitTRUNCATE()
9929 N00.getOperand(0), N0.getOperand(1)); in visitTRUNCATE()
9948 (isConstantOrConstantVector(N0.getOperand(0), true) || in visitTRUNCATE()
9949 isConstantOrConstantVector(N0.getOperand(1), true))) { in visitTRUNCATE()
9955 SDValue NarrowL = DAG.getNode(ISD::TRUNCATE, DL, VT, N0.getOperand(0)); in visitTRUNCATE()
9956 SDValue NarrowR = DAG.getNode(ISD::TRUNCATE, DL, VT, N0.getOperand(1)); in visitTRUNCATE()
9966 SDValue Elt = N->getOperand(i); in getBuildPairElt()
9969 return Elt.getOperand(Elt.getResNo()).getNode(); in getBuildPairElt()
10022 SDValue N0 = N->getOperand(0); in foldBitcastedFPLogic()
10050 SDValue LogicOp0 = N0.getOperand(0); in foldBitcastedFPLogic()
10051 ConstantSDNode *LogicOp1 = isConstOrConstSplat(N0.getOperand(1), true); in foldBitcastedFPLogic()
10054 LogicOp0.getOperand(0).getValueType() == VT) { in foldBitcastedFPLogic()
10055 SDValue FPOp = DAG.getNode(FPOpcode, SDLoc(N), VT, LogicOp0.getOperand(0)); in foldBitcastedFPLogic()
10066 SDValue N0 = N->getOperand(0); in visitBITCAST()
10102 return DAG.getBitcast(VT, N0.getOperand(0)); in visitBITCAST()
10153 SDValue NewConv = DAG.getBitcast(VT, N0.getOperand(0)); in visitBITCAST()
10201 isa<ConstantFPSDNode>(N0.getOperand(0)) && in visitBITCAST()
10203 unsigned OrigXWidth = N0.getOperand(1).getValueSizeInBits(); in visitBITCAST()
10206 SDValue X = DAG.getBitcast(IntXVT, N0.getOperand(1)); in visitBITCAST()
10229 SDValue Cst = DAG.getBitcast(VT, N0.getOperand(0)); in visitBITCAST()
10231 SDValue X = DAG.getBitcast(VT, N0.getOperand(1)); in visitBITCAST()
10254 SDValue Cst = DAG.getBitcast(VT, N0.getOperand(0)); in visitBITCAST()
10282 Op.getOperand(0).getValueType() == VT) in visitBITCAST()
10283 return SDValue(Op.getOperand(0)); in visitBITCAST()
10293 SDValue SV0 = PeekThroughBitcast(N0->getOperand(0)); in visitBITCAST()
10294 SDValue SV1 = PeekThroughBitcast(N0->getOperand(1)); in visitBITCAST()
10391 SDValue Op = BV->getOperand(i+ (isLE ? (NumInputsPerOutput-j-1) : j)); in ConstantFoldBITCASTofBUILD_VECTOR()
10446 SDValue N0 = N->getOperand(0); in visitFADDForFMACombine()
10447 SDValue N1 = N->getOperand(1); in visitFADDForFMACombine()
10498 N0.getOperand(0), N0.getOperand(1), N1, Flags); in visitFADDForFMACombine()
10505 N1.getOperand(0), N1.getOperand(1), N0, Flags); in visitFADDForFMACombine()
10512 SDValue N00 = N0.getOperand(0); in visitFADDForFMACombine()
10517 N00.getOperand(0)), in visitFADDForFMACombine()
10519 N00.getOperand(1)), N1, Flags); in visitFADDForFMACombine()
10526 SDValue N10 = N1.getOperand(0); in visitFADDForFMACombine()
10531 N10.getOperand(0)), in visitFADDForFMACombine()
10533 N10.getOperand(1)), N0, Flags); in visitFADDForFMACombine()
10542 N0.getOperand(2).getOpcode() == ISD::FMUL && in visitFADDForFMACombine()
10543 N0->hasOneUse() && N0.getOperand(2)->hasOneUse()) { in visitFADDForFMACombine()
10545 N0.getOperand(0), N0.getOperand(1), in visitFADDForFMACombine()
10547 N0.getOperand(2).getOperand(0), in visitFADDForFMACombine()
10548 N0.getOperand(2).getOperand(1), in visitFADDForFMACombine()
10555 N1.getOperand(2).getOpcode() == ISD::FMUL && in visitFADDForFMACombine()
10556 N1->hasOneUse() && N1.getOperand(2)->hasOneUse()) { in visitFADDForFMACombine()
10558 N1.getOperand(0), N1.getOperand(1), in visitFADDForFMACombine()
10560 N1.getOperand(2).getOperand(0), in visitFADDForFMACombine()
10561 N1.getOperand(2).getOperand(1), in visitFADDForFMACombine()
10578 SDValue N02 = N0.getOperand(2); in visitFADDForFMACombine()
10580 SDValue N020 = N02.getOperand(0); in visitFADDForFMACombine()
10583 return FoldFAddFMAFPExtFMul(N0.getOperand(0), N0.getOperand(1), in visitFADDForFMACombine()
10584 N020.getOperand(0), N020.getOperand(1), in visitFADDForFMACombine()
10607 SDValue N00 = N0.getOperand(0); in visitFADDForFMACombine()
10609 SDValue N002 = N00.getOperand(2); in visitFADDForFMACombine()
10612 return FoldFAddFPExtFMAFMul(N00.getOperand(0), N00.getOperand(1), in visitFADDForFMACombine()
10613 N002.getOperand(0), N002.getOperand(1), in visitFADDForFMACombine()
10622 SDValue N12 = N1.getOperand(2); in visitFADDForFMACombine()
10624 SDValue N120 = N12.getOperand(0); in visitFADDForFMACombine()
10627 return FoldFAddFMAFPExtFMul(N1.getOperand(0), N1.getOperand(1), in visitFADDForFMACombine()
10628 N120.getOperand(0), N120.getOperand(1), in visitFADDForFMACombine()
10640 SDValue N10 = N1.getOperand(0); in visitFADDForFMACombine()
10642 SDValue N102 = N10.getOperand(2); in visitFADDForFMACombine()
10645 return FoldFAddFPExtFMAFMul(N10.getOperand(0), N10.getOperand(1), in visitFADDForFMACombine()
10646 N102.getOperand(0), N102.getOperand(1), in visitFADDForFMACombine()
10658 SDValue N0 = N->getOperand(0); in visitFSUBForFMACombine()
10659 SDValue N1 = N->getOperand(1); in visitFSUBForFMACombine()
10704 N0.getOperand(0), N0.getOperand(1), in visitFSUBForFMACombine()
10713 N1.getOperand(0)), in visitFSUBForFMACombine()
10714 N1.getOperand(1), N0, Flags); in visitFSUBForFMACombine()
10718 if (N0.getOpcode() == ISD::FNEG && isContractableFMUL(N0.getOperand(0)) && in visitFSUBForFMACombine()
10719 (Aggressive || (N0->hasOneUse() && N0.getOperand(0).hasOneUse()))) { in visitFSUBForFMACombine()
10720 SDValue N00 = N0.getOperand(0).getOperand(0); in visitFSUBForFMACombine()
10721 SDValue N01 = N0.getOperand(0).getOperand(1); in visitFSUBForFMACombine()
10732 SDValue N00 = N0.getOperand(0); in visitFSUBForFMACombine()
10737 N00.getOperand(0)), in visitFSUBForFMACombine()
10739 N00.getOperand(1)), in visitFSUBForFMACombine()
10748 SDValue N10 = N1.getOperand(0); in visitFSUBForFMACombine()
10754 N10.getOperand(0))), in visitFSUBForFMACombine()
10756 N10.getOperand(1)), in visitFSUBForFMACombine()
10768 SDValue N00 = N0.getOperand(0); in visitFSUBForFMACombine()
10770 SDValue N000 = N00.getOperand(0); in visitFSUBForFMACombine()
10776 N000.getOperand(0)), in visitFSUBForFMACombine()
10778 N000.getOperand(1)), in visitFSUBForFMACombine()
10791 SDValue N00 = N0.getOperand(0); in visitFSUBForFMACombine()
10793 SDValue N000 = N00.getOperand(0); in visitFSUBForFMACombine()
10799 N000.getOperand(0)), in visitFSUBForFMACombine()
10801 N000.getOperand(1)), in visitFSUBForFMACombine()
10812 isContractableFMUL(N0.getOperand(2)) && N0->hasOneUse() && in visitFSUBForFMACombine()
10813 N0.getOperand(2)->hasOneUse()) { in visitFSUBForFMACombine()
10815 N0.getOperand(0), N0.getOperand(1), in visitFSUBForFMACombine()
10817 N0.getOperand(2).getOperand(0), in visitFSUBForFMACombine()
10818 N0.getOperand(2).getOperand(1), in visitFSUBForFMACombine()
10826 isContractableFMUL(N1.getOperand(2))) { in visitFSUBForFMACombine()
10827 SDValue N20 = N1.getOperand(2).getOperand(0); in visitFSUBForFMACombine()
10828 SDValue N21 = N1.getOperand(2).getOperand(1); in visitFSUBForFMACombine()
10831 N1.getOperand(0)), in visitFSUBForFMACombine()
10832 N1.getOperand(1), in visitFSUBForFMACombine()
10842 SDValue N02 = N0.getOperand(2); in visitFSUBForFMACombine()
10844 SDValue N020 = N02.getOperand(0); in visitFSUBForFMACombine()
10848 N0.getOperand(0), N0.getOperand(1), in visitFSUBForFMACombine()
10851 N020.getOperand(0)), in visitFSUBForFMACombine()
10853 N020.getOperand(1)), in visitFSUBForFMACombine()
10867 SDValue N00 = N0.getOperand(0); in visitFSUBForFMACombine()
10869 SDValue N002 = N00.getOperand(2); in visitFSUBForFMACombine()
10874 N00.getOperand(0)), in visitFSUBForFMACombine()
10876 N00.getOperand(1)), in visitFSUBForFMACombine()
10879 N002.getOperand(0)), in visitFSUBForFMACombine()
10881 N002.getOperand(1)), in visitFSUBForFMACombine()
10891 N1.getOperand(2).getOpcode() == ISD::FP_EXTEND) { in visitFSUBForFMACombine()
10892 SDValue N120 = N1.getOperand(2).getOperand(0); in visitFSUBForFMACombine()
10895 SDValue N1200 = N120.getOperand(0); in visitFSUBForFMACombine()
10896 SDValue N1201 = N120.getOperand(1); in visitFSUBForFMACombine()
10898 DAG.getNode(ISD::FNEG, SL, VT, N1.getOperand(0)), in visitFSUBForFMACombine()
10899 N1.getOperand(1), in visitFSUBForFMACombine()
10917 N1.getOperand(0).getOpcode() == PreferredFusedOpcode) { in visitFSUBForFMACombine()
10918 SDValue CvtSrc = N1.getOperand(0); in visitFSUBForFMACombine()
10919 SDValue N100 = CvtSrc.getOperand(0); in visitFSUBForFMACombine()
10920 SDValue N101 = CvtSrc.getOperand(1); in visitFSUBForFMACombine()
10921 SDValue N102 = CvtSrc.getOperand(2); in visitFSUBForFMACombine()
10924 SDValue N1020 = N102.getOperand(0); in visitFSUBForFMACombine()
10925 SDValue N1021 = N102.getOperand(1); in visitFSUBForFMACombine()
10949 SDValue N0 = N->getOperand(0); in visitFMULForFMADistributiveCombine()
10950 SDValue N1 = N->getOperand(1); in visitFMULForFMADistributiveCombine()
10987 if (auto *C = isConstOrConstSplatFP(X.getOperand(1), true)) { in visitFMULForFMADistributiveCombine()
10989 return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, in visitFMULForFMADistributiveCombine()
10992 return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, in visitFMULForFMADistributiveCombine()
11010 if (auto *C0 = isConstOrConstSplatFP(X.getOperand(0), true)) { in visitFMULForFMADistributiveCombine()
11013 DAG.getNode(ISD::FNEG, SL, VT, X.getOperand(1)), Y, in visitFMULForFMADistributiveCombine()
11017 DAG.getNode(ISD::FNEG, SL, VT, X.getOperand(1)), Y, in visitFMULForFMADistributiveCombine()
11020 if (auto *C1 = isConstOrConstSplatFP(X.getOperand(1), true)) { in visitFMULForFMADistributiveCombine()
11022 return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, in visitFMULForFMADistributiveCombine()
11025 return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, in visitFMULForFMADistributiveCombine()
11041 SDValue N0 = N->getOperand(0); in visitFADD()
11042 SDValue N1 = N->getOperand(1); in visitFADD()
11087 auto *C = isConstOrConstSplatFP(FMul.getOperand(1), true); in visitFADD()
11093 SDValue B = N0.getOperand(0); in visitFADD()
11099 SDValue B = N1.getOperand(0); in visitFADD()
11111 if (N0.getOpcode() == ISD::FNEG && N0.getOperand(0) == N1) in visitFADD()
11115 if (N1.getOpcode() == ISD::FNEG && N1.getOperand(0) == N0) in visitFADD()
11127 isConstantFPBuildVectorOrConstantFP(N0.getOperand(1))) { in visitFADD()
11128 SDValue NewC = DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(1), N1, Flags); in visitFADD()
11129 return DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(0), NewC, Flags); in visitFADD()
11137 bool CFP00 = isConstantFPBuildVectorOrConstantFP(N0.getOperand(0)); in visitFADD()
11138 bool CFP01 = isConstantFPBuildVectorOrConstantFP(N0.getOperand(1)); in visitFADD()
11141 if (CFP01 && !CFP00 && N0.getOperand(0) == N1) { in visitFADD()
11142 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(1), in visitFADD()
11149 N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
11150 N0.getOperand(0) == N1.getOperand(0)) { in visitFADD()
11151 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(1), in visitFADD()
11153 return DAG.getNode(ISD::FMUL, DL, VT, N0.getOperand(0), NewCFP, Flags); in visitFADD()
11158 bool CFP10 = isConstantFPBuildVectorOrConstantFP(N1.getOperand(0)); in visitFADD()
11159 bool CFP11 = isConstantFPBuildVectorOrConstantFP(N1.getOperand(1)); in visitFADD()
11162 if (CFP11 && !CFP10 && N1.getOperand(0) == N0) { in visitFADD()
11163 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N1.getOperand(1), in visitFADD()
11170 N0.getOperand(0) == N0.getOperand(1) && in visitFADD()
11171 N1.getOperand(0) == N0.getOperand(0)) { in visitFADD()
11172 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N1.getOperand(1), in visitFADD()
11174 return DAG.getNode(ISD::FMUL, DL, VT, N1.getOperand(0), NewCFP, Flags); in visitFADD()
11179 bool CFP00 = isConstantFPBuildVectorOrConstantFP(N0.getOperand(0)); in visitFADD()
11181 if (!CFP00 && N0.getOperand(0) == N0.getOperand(1) && in visitFADD()
11182 (N0.getOperand(0) == N1)) { in visitFADD()
11189 bool CFP10 = isConstantFPBuildVectorOrConstantFP(N1.getOperand(0)); in visitFADD()
11191 if (!CFP10 && N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
11192 N1.getOperand(0) == N0) { in visitFADD()
11200 N0.getOperand(0) == N0.getOperand(1) && in visitFADD()
11201 N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
11202 N0.getOperand(0) == N1.getOperand(0)) { in visitFADD()
11203 return DAG.getNode(ISD::FMUL, DL, VT, N0.getOperand(0), in visitFADD()
11218 SDValue N0 = N->getOperand(0); in visitFSUB()
11219 SDValue N1 = N->getOperand(1); in visitFSUB()
11268 if (N0 == N1->getOperand(0)) in visitFSUB()
11269 return DAG.getNode(ISD::FNEG, DL, VT, N1->getOperand(1), Flags); in visitFSUB()
11271 if (N0 == N1->getOperand(1)) in visitFSUB()
11272 return DAG.getNode(ISD::FNEG, DL, VT, N1->getOperand(0), Flags); in visitFSUB()
11290 SDValue N0 = N->getOperand(0); in visitFMUL()
11291 SDValue N1 = N->getOperand(1); in visitFMUL()
11333 SDValue N00 = N0.getOperand(0); in visitFMUL()
11334 SDValue N01 = N0.getOperand(1); in visitFMUL()
11347 N0.getOperand(0) == N0.getOperand(1)) { in visitFMUL()
11350 return DAG.getNode(ISD::FMUL, DL, VT, N0.getOperand(0), MulConsts, Flags); in visitFMUL()
11385 SDValue Cond = Select.getOperand(0); in visitFMUL()
11386 auto TrueOpnd = dyn_cast<ConstantFPSDNode>(Select.getOperand(1)); in visitFMUL()
11387 auto FalseOpnd = dyn_cast<ConstantFPSDNode>(Select.getOperand(2)); in visitFMUL()
11390 Cond.getOpcode() == ISD::SETCC && Cond.getOperand(0) == X && in visitFMUL()
11391 isa<ConstantFPSDNode>(Cond.getOperand(1)) && in visitFMUL()
11392 cast<ConstantFPSDNode>(Cond.getOperand(1))->isExactlyValue(0.0)) { in visitFMUL()
11393 ISD::CondCode CC = cast<CondCodeSDNode>(Cond.getOperand(2))->get(); in visitFMUL()
11432 SDValue N0 = N->getOperand(0); in visitFMA()
11433 SDValue N1 = N->getOperand(1); in visitFMA()
11434 SDValue N2 = N->getOperand(2); in visitFMA()
11471 if (N2.getOpcode() == ISD::FMUL && N0 == N2.getOperand(0) && in visitFMA()
11473 isConstantFPBuildVectorOrConstantFP(N2.getOperand(1))) { in visitFMA()
11475 DAG.getNode(ISD::FADD, DL, VT, N1, N2.getOperand(1), in visitFMA()
11482 isConstantFPBuildVectorOrConstantFP(N0.getOperand(1))) { in visitFMA()
11484 N0.getOperand(0), in visitFMA()
11485 DAG.getNode(ISD::FMUL, DL, VT, N1, N0.getOperand(1), in visitFMA()
11510 return DAG.getNode(ISD::FMA, DL, VT, N0.getOperand(0), in visitFMA()
11525 if (N1CFP && N2.getOpcode() == ISD::FNEG && N2.getOperand(0) == N0) { in visitFMA()
11550 SDValue N0 = N->getOperand(0); in combineRepeatedFPDivisors()
11557 SDValue N1 = N->getOperand(1); in combineRepeatedFPDivisors()
11566 if (U->getOpcode() == ISD::FDIV && U->getOperand(1) == N1) { in combineRepeatedFPDivisors()
11586 SDValue Dividend = U->getOperand(0); in combineRepeatedFPDivisors()
11601 SDValue N0 = N->getOperand(0); in visitFDIV()
11602 SDValue N1 = N->getOperand(1); in visitFDIV()
11645 if (SDValue RV = buildRsqrtEstimate(N1.getOperand(0), Flags)) { in visitFDIV()
11649 N1.getOperand(0).getOpcode() == ISD::FSQRT) { in visitFDIV()
11650 if (SDValue RV = buildRsqrtEstimate(N1.getOperand(0).getOperand(0), in visitFDIV()
11657 N1.getOperand(0).getOpcode() == ISD::FSQRT) { in visitFDIV()
11658 if (SDValue RV = buildRsqrtEstimate(N1.getOperand(0).getOperand(0), in visitFDIV()
11660 RV = DAG.getNode(ISD::FP_ROUND, SDLoc(N1), VT, RV, N1.getOperand(1)); in visitFDIV()
11669 if (N1.getOperand(0).getOpcode() == ISD::FSQRT) { in visitFDIV()
11670 SqrtOp = N1.getOperand(0); in visitFDIV()
11671 OtherOp = N1.getOperand(1); in visitFDIV()
11672 } else if (N1.getOperand(1).getOpcode() == ISD::FSQRT) { in visitFDIV()
11673 SqrtOp = N1.getOperand(1); in visitFDIV()
11674 OtherOp = N1.getOperand(0); in visitFDIV()
11679 if (SDValue RV = buildRsqrtEstimate(SqrtOp.getOperand(0), Flags)) { in visitFDIV()
11714 SDValue N0 = N->getOperand(0); in visitFREM()
11715 SDValue N1 = N->getOperand(1); in visitFREM()
11736 SDValue N0 = N->getOperand(0); in visitFSQRT()
11747 SDValue N1 = N->getOperand(1); in CanCombineFCOPYSIGN_EXTEND_ROUND()
11755 EVT N1Op0VT = N1->getOperand(0).getValueType(); in CanCombineFCOPYSIGN_EXTEND_ROUND()
11762 SDValue N0 = N->getOperand(0); in visitFCOPYSIGN()
11763 SDValue N1 = N->getOperand(1); in visitFCOPYSIGN()
11771 if (ConstantFPSDNode *N1C = isConstOrConstSplatFP(N->getOperand(1))) { in visitFCOPYSIGN()
11790 return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, N0.getOperand(0), N1); in visitFCOPYSIGN()
11798 return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, N0, N1.getOperand(1)); in visitFCOPYSIGN()
11803 return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, N0, N1.getOperand(0)); in visitFCOPYSIGN()
11809 ConstantFPSDNode *ExponentC = isConstOrConstSplatFP(N->getOperand(1)); in visitFPOW()
11838 return DAG.getNode(ISD::FCBRT, SDLoc(N), VT, N->getOperand(0), Flags); in visitFPOW()
11867 SDValue Sqrt = DAG.getNode(ISD::FSQRT, DL, VT, N->getOperand(0), Flags); in visitFPOW()
11897 SDValue N0 = N->getOperand(0); in foldFPToIntToFP()
11899 N0.getOperand(0).getValueType() == VT) in foldFPToIntToFP()
11900 return DAG.getNode(ISD::FTRUNC, SDLoc(N), VT, N0.getOperand(0)); in foldFPToIntToFP()
11903 N0.getOperand(0).getValueType() == VT) in foldFPToIntToFP()
11904 return DAG.getNode(ISD::FTRUNC, SDLoc(N), VT, N0.getOperand(0)); in foldFPToIntToFP()
11910 SDValue N0 = N->getOperand(0); in visitSINT_TO_FP()
11939 { N0.getOperand(0), N0.getOperand(1), in visitSINT_TO_FP()
11941 N0.getOperand(2) }; in visitSINT_TO_FP()
11948 N0.getOperand(0).getOpcode() == ISD::SETCC &&!VT.isVector() && in visitSINT_TO_FP()
11953 { N0.getOperand(0).getOperand(0), N0.getOperand(0).getOperand(1), in visitSINT_TO_FP()
11955 N0.getOperand(0).getOperand(2) }; in visitSINT_TO_FP()
11967 SDValue N0 = N->getOperand(0); in visitUINT_TO_FP()
11995 { N0.getOperand(0), N0.getOperand(1), in visitUINT_TO_FP()
11997 N0.getOperand(2) }; in visitUINT_TO_FP()
12010 SDValue N0 = N->getOperand(0); in FoldIntToFPToInt()
12016 SDValue Src = N0.getOperand(0); in FoldIntToFPToInt()
12051 SDValue N0 = N->getOperand(0); in visitFP_TO_SINT()
12062 SDValue N0 = N->getOperand(0); in visitFP_TO_UINT()
12073 SDValue N0 = N->getOperand(0); in visitFP_ROUND()
12074 SDValue N1 = N->getOperand(1); in visitFP_ROUND()
12083 if (N0.getOpcode() == ISD::FP_EXTEND && VT == N0.getOperand(0).getValueType()) in visitFP_ROUND()
12084 return N0.getOperand(0); in visitFP_ROUND()
12098 if (N0.getOperand(0).getValueType() == MVT::f80 && VT == MVT::f16) in visitFP_ROUND()
12108 return DAG.getNode(ISD::FP_ROUND, DL, VT, N0.getOperand(0), in visitFP_ROUND()
12116 N0.getOperand(0), N1); in visitFP_ROUND()
12119 Tmp, N0.getOperand(1)); in visitFP_ROUND()
12129 SDValue N0 = N->getOperand(0); in visitFP_ROUND_INREG()
12131 EVT EVT = cast<VTSDNode>(N->getOperand(1))->getVT(); in visitFP_ROUND_INREG()
12145 SDValue N0 = N->getOperand(0); in visitFP_EXTEND()
12160 return DAG.getNode(ISD::FP16_TO_FP, SDLoc(N), VT, N0.getOperand(0)); in visitFP_EXTEND()
12166 SDValue In = N0.getOperand(0); in visitFP_EXTEND()
12170 In, N0.getOperand(1)); in visitFP_EXTEND()
12198 SDValue N0 = N->getOperand(0); in visitFCEIL()
12209 SDValue N0 = N->getOperand(0); in visitFTRUNC()
12233 SDValue N0 = N->getOperand(0); in visitFFLOOR()
12245 SDValue N0 = N->getOperand(0); in visitFNEG()
12261 SDValue Int = N0.getOperand(0); in visitFNEG()
12285 ConstantFPSDNode *CFP1 = dyn_cast<ConstantFPSDNode>(N0.getOperand(1)); in visitFNEG()
12293 ISD::FMUL, SDLoc(N), VT, N0.getOperand(0), in visitFNEG()
12294 DAG.getNode(ISD::FNEG, SDLoc(N), VT, N0.getOperand(1)), in visitFNEG()
12304 SDValue N0 = N->getOperand(0); in visitFMinMax()
12305 SDValue N1 = N->getOperand(1); in visitFMinMax()
12341 SDValue N0 = N->getOperand(0); in visitFABS()
12350 return N->getOperand(0); in visitFABS()
12355 return DAG.getNode(ISD::FABS, SDLoc(N), VT, N0.getOperand(0)); in visitFABS()
12359 SDValue Int = N0.getOperand(0); in visitFABS()
12384 SDValue Chain = N->getOperand(0); in visitBRCOND()
12385 SDValue N1 = N->getOperand(1); in visitBRCOND()
12386 SDValue N2 = N->getOperand(2); in visitBRCOND()
12398 N1.getOperand(0).getValueType())) { in visitBRCOND()
12400 Chain, N1.getOperand(2), in visitBRCOND()
12401 N1.getOperand(0), N1.getOperand(1), N2); in visitBRCOND()
12415 (N.getOperand(0).hasOneUse() && in rebuildSetCC()
12416 N.getOperand(0).getOpcode() == ISD::SRL))) { in rebuildSetCC()
12419 N = N.getOperand(0); in rebuildSetCC()
12438 SDValue Op0 = N.getOperand(0); in rebuildSetCC()
12439 SDValue Op1 = N.getOperand(1); in rebuildSetCC()
12442 SDValue AndOp1 = Op0.getOperand(1); in rebuildSetCC()
12485 SDValue Op0 = TheXor->getOperand(0); in rebuildSetCC()
12486 SDValue Op1 = TheXor->getOperand(1); in rebuildSetCC()
12511 CondCodeSDNode *CC = cast<CondCodeSDNode>(N->getOperand(1)); in visitBR_CC()
12512 SDValue CondLHS = N->getOperand(2), CondRHS = N->getOperand(3); in visitBR_CC()
12529 N->getOperand(0), Simp.getOperand(2), in visitBR_CC()
12530 Simp.getOperand(0), Simp.getOperand(1), in visitBR_CC()
12531 N->getOperand(4)); in visitBR_CC()
12559 ConstantSDNode *Offset = dyn_cast<ConstantSDNode>(N->getOperand(1)); in canFoldInAddressingMode()
12567 ConstantSDNode *Offset = dyn_cast<ConstantSDNode>(N->getOperand(1)); in canFoldInAddressingMode()
12688 SDValue Op1 = Use.getUser()->getOperand((UI.getOperandNo() + 1) & 1); in CombineToPreIndexedLoadStore()
12752 if (OtherUses[i]->getOperand(OffsetIdx).getNode() == BasePtr.getNode()) in CombineToPreIndexedLoadStore()
12754 assert(OtherUses[i]->getOperand(!OffsetIdx).getNode() == in CombineToPreIndexedLoadStore()
12769 cast<ConstantSDNode>(OtherUses[i]->getOperand(OffsetIdx)); in CombineToPreIndexedLoadStore()
12936 SDValue BP = LD->getOperand(1); in SplitIndexingFromLoad()
12937 SDValue Inc = LD->getOperand(2); in SplitIndexingFromLoad()
13014 SDValue Chain = LD->getOperand(0); in ForwardStoreValueToDirectLoad()
13048 SDValue Idx = DAG.getNode(Opc, SDLoc(LD), LD->getOperand(1).getValueType(), in ForwardStoreValueToDirectLoad()
13049 LD->getOperand(1), LD->getOperand(2)); in ForwardStoreValueToDirectLoad()
13144 bool HasOTCInc = LD->getOperand(2).getOpcode() == ISD::TargetConstant && in visitLOAD()
13145 cast<ConstantSDNode>(LD->getOperand(2))->isOpaque(); in visitLOAD()
13277 if (!TLI.isTruncateFree(LS.Inst->getOperand(0).getValueType(), in addSliceGain()
13505 TLI.getRegClassFor(Use->getOperand(0).getValueType().getSimpleVT()); in canMergeExpensiveCrossRegisterBankCopy()
13708 isa<ConstantSDNode>(User->getOperand(1))) { in SliceUpLoad()
13762 SliceInst = SliceInst.getOperand(0); in SliceUpLoad()
13784 !isa<ConstantSDNode>(V->getOperand(1)) || in CheckForMaskedLoad()
13785 !ISD::isNormalLoad(V->getOperand(0).getNode())) in CheckForMaskedLoad()
13789 LoadSDNode *LD = cast<LoadSDNode>(V->getOperand(0)); in CheckForMaskedLoad()
13801 uint64_t NotMask = ~cast<ConstantSDNode>(V->getOperand(1))->getSExtValue(); in CheckForMaskedLoad()
13937 MaskedLoad = CheckForMaskedLoad(Value.getOperand(0), Ptr, Chain); in ReduceLoadOpStoreWidth()
13940 Value.getOperand(1), ST,this)) in ReduceLoadOpStoreWidth()
13944 MaskedLoad = CheckForMaskedLoad(Value.getOperand(1), Ptr, Chain); in ReduceLoadOpStoreWidth()
13947 Value.getOperand(0), ST,this)) in ReduceLoadOpStoreWidth()
13952 Value.getOperand(1).getOpcode() != ISD::Constant) in ReduceLoadOpStoreWidth()
13955 SDValue N0 = Value.getOperand(0); in ReduceLoadOpStoreWidth()
13965 SDValue N1 = Value.getOperand(1); in ReduceLoadOpStoreWidth()
14119 SDNode *MulVar = AddNode.getOperand(0).getNode(); in isMulAddWithConstProfitable()
14122 if (Use->getOperand(0) == ConstNode) in isMulAddWithConstProfitable()
14123 OtherOp = Use->getOperand(1).getNode(); in isMulAddWithConstProfitable()
14125 OtherOp = Use->getOperand(0).getNode(); in isMulAddWithConstProfitable()
14154 DAG.isConstantIntBuildVectorOrConstantInt(OtherOp->getOperand(1)) && in isMulAddWithConstProfitable()
14155 OtherOp->getOperand(0).getNode() == MulVar) in isMulAddWithConstProfitable()
14258 SDValue Vec = Val.getOperand(0); in MergeStoresOfConstantsOrVecElts()
14259 SDValue Idx = Val.getOperand(1); in MergeStoresOfConstantsOrVecElts()
14515 Worklist.push_back(N->getOperand(j).getNode()); in checkMergeStoreCandidatesForDependencies()
15034 SDValue Val = StoreNodes[i].MemNode->getOperand(1); in MergeConsecutiveStores()
15163 EVT SVT = Value.getOperand(0).getValueType(); in visitSTORE()
15177 return DAG.getStore(Chain, SDLoc(N), Value.getOperand(0), Ptr, in visitSTORE()
15293 TLI.isTruncStoreLegal(Value.getOperand(0).getValueType(), in visitSTORE()
15295 return DAG.getTruncStore(Chain, SDLoc(N), Value.getOperand(0), in visitSTORE()
15376 SDValue Op1 = Val.getOperand(0); in splitMergedValStore()
15377 SDValue Op2 = Val.getOperand(1); in splitMergedValStore()
15385 Hi = Op1.getOperand(0); in splitMergedValStore()
15391 ConstantSDNode *ShAmt = dyn_cast<ConstantSDNode>(Op1.getOperand(1)); in splitMergedValStore()
15398 !Lo.getOperand(0).getValueType().isScalarInteger() || in splitMergedValStore()
15399 Lo.getOperand(0).getValueSizeInBits() > HalfValBitSize || in splitMergedValStore()
15401 !Hi.getOperand(0).getValueType().isScalarInteger() || in splitMergedValStore()
15402 Hi.getOperand(0).getValueSizeInBits() > HalfValBitSize) in splitMergedValStore()
15407 EVT LowTy = (Lo.getOperand(0).getOpcode() == ISD::BITCAST) in splitMergedValStore()
15408 ? Lo.getOperand(0).getValueType() in splitMergedValStore()
15410 EVT HighTy = (Hi.getOperand(0).getOpcode() == ISD::BITCAST) in splitMergedValStore()
15411 ? Hi.getOperand(0).getValueType() in splitMergedValStore()
15423 Lo = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, Lo.getOperand(0)); in splitMergedValStore()
15424 Hi = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, Hi.getOperand(0)); in splitMergedValStore()
15448 SDValue InsertVal = N->getOperand(1); in combineInsertEltToShuffle()
15450 !InsertVal.getOperand(0).getValueType().isVector()) in combineInsertEltToShuffle()
15453 SDValue SubVec = InsertVal.getOperand(0); in combineInsertEltToShuffle()
15454 SDValue DestVec = N->getOperand(0); in combineInsertEltToShuffle()
15497 SDValue InVec = N->getOperand(0); in visitINSERT_VECTOR_ELT()
15498 SDValue InVal = N->getOperand(1); in visitINSERT_VECTOR_ELT()
15499 SDValue EltNo = N->getOperand(2); in visitINSERT_VECTOR_ELT()
15512 InVec == InVal.getOperand(0) && EltNo == InVal.getOperand(1)) in visitINSERT_VECTOR_ELT()
15539 && isa<ConstantSDNode>(InVec.getOperand(2))) { in visitINSERT_VECTOR_ELT()
15544 InVec.getOperand(0), InVal, EltNo); in visitINSERT_VECTOR_ELT()
15547 VT, NewOp, InVec.getOperand(1), InVec.getOperand(2)); in visitINSERT_VECTOR_ELT()
15671 SDValue Vec = ExtElt->getOperand(0); in scalarizeExtractedBinop()
15672 SDValue Index = ExtElt->getOperand(1); in scalarizeExtractedBinop()
15685 SDValue Op0 = Vec.getOperand(0); in scalarizeExtractedBinop()
15686 SDValue Op1 = Vec.getOperand(1); in scalarizeExtractedBinop()
15702 SDValue VecOp = N->getOperand(0); in visitEXTRACT_VECTOR_ELT()
15703 SDValue Index = N->getOperand(1); in visitEXTRACT_VECTOR_ELT()
15715 Index == VecOp.getOperand(2)) { in visitEXTRACT_VECTOR_ELT()
15716 SDValue Elt = VecOp.getOperand(1); in visitEXTRACT_VECTOR_ELT()
15725 SDValue InOp = VecOp.getOperand(0); in visitEXTRACT_VECTOR_ELT()
15743 SDValue Elt = VecOp.getOperand(IndexC->getZExtValue()); in visitEXTRACT_VECTOR_ELT()
15764 SDValue BCSrc = VecOp.getOperand(0); in visitEXTRACT_VECTOR_ELT()
15772 SDValue X = BCSrc.getOperand(0); in visitEXTRACT_VECTOR_ELT()
15812 SVInVec = VecOp.getOperand(0); in visitEXTRACT_VECTOR_ELT()
15814 SVInVec = VecOp.getOperand(1); in visitEXTRACT_VECTOR_ELT()
15819 SDValue InOp = SVInVec.getOperand(OrigElt); in visitEXTRACT_VECTOR_ELT()
15845 Use->getOperand(0) == VecOp && in visitEXTRACT_VECTOR_ELT()
15846 isa<ConstantSDNode>(Use->getOperand(1)); in visitEXTRACT_VECTOR_ELT()
15850 auto *CstElt = cast<ConstantSDNode>(Use->getOperand(1)); in visitEXTRACT_VECTOR_ELT()
15877 EVT BCVT = VecOp.getOperand(0).getValueType(); in visitEXTRACT_VECTOR_ELT()
15882 VecOp = VecOp.getOperand(0); in visitEXTRACT_VECTOR_ELT()
15908 VecOp.getOperand(0).getValueType() == ExtVT && in visitEXTRACT_VECTOR_ELT()
15909 ISD::isNormalLoad(VecOp.getOperand(0).getNode())) { in visitEXTRACT_VECTOR_ELT()
15914 LN0 = cast<LoadSDNode>(VecOp.getOperand(0)); in visitEXTRACT_VECTOR_ELT()
15932 VecOp = (Idx < (int)NumElts) ? VecOp.getOperand(0) : VecOp.getOperand(1); in visitEXTRACT_VECTOR_ELT()
15939 VecOp = VecOp.getOperand(0); in visitEXTRACT_VECTOR_ELT()
15984 SDValue In = N->getOperand(i); in reduceBuildVecExtToExtBuildVec()
15998 EVT InTy = In.getOperand(0).getValueType(); in reduceBuildVecExtToExtBuildVec()
16038 SDValue Cast = N->getOperand(i); in reduceBuildVecExtToExtBuildVec()
16046 In = Cast->getOperand(0); in reduceBuildVecExtToExtBuildVec()
16093 !(VecIn1.getOperand(0) == VecIn2.getOperand(0))) in createBuildVecShuffle()
16171 unsigned ExtIndex = N->getOperand(i).getConstantOperandVal(1); in createBuildVecShuffle()
16202 SDValue Op = BV->getOperand(i); in reduceBuildVecToShuffleWithZero()
16221 SDValue Zext = BV->getOperand(ZextElt); in reduceBuildVecToShuffleWithZero()
16223 Zext.getOperand(0).getOpcode() != ISD::EXTRACT_VECTOR_ELT || in reduceBuildVecToShuffleWithZero()
16224 !isa<ConstantSDNode>(Zext.getOperand(0).getOperand(1)) || in reduceBuildVecToShuffleWithZero()
16230 SDValue Extract = Zext.getOperand(0); in reduceBuildVecToShuffleWithZero()
16234 Extract.getOperand(0).getValueSizeInBits() != VT.getSizeInBits()) in reduceBuildVecToShuffleWithZero()
16259 EVT VecVT = Extract.getOperand(0).getValueType(); in reduceBuildVecToShuffleWithZero()
16267 SDValue Shuf = DAG.getVectorShuffle(VecVT, DL, Extract.getOperand(0), ZeroVec, in reduceBuildVecToShuffleWithZero()
16304 SDValue Op = N->getOperand(i); in reduceBuildVecToShuffle()
16321 !isa<ConstantSDNode>(Op.getOperand(1))) in reduceBuildVecToShuffle()
16323 SDValue ExtractedFromVec = Op.getOperand(0); in reduceBuildVecToShuffle()
16325 APInt ExtractIdx = cast<ConstantSDNode>(Op.getOperand(1))->getAPIntValue(); in reduceBuildVecToShuffle()
16364 unsigned Index = N->getOperand(i).getConstantOperandVal(1); in reduceBuildVecToShuffle()
16495 SDValue Op0 = N->getOperand(0); in convertBuildVecZextToZext()
16498 Op.getOperand(0).getOpcode() == ISD::EXTRACT_VECTOR_ELT && in convertBuildVecZextToZext()
16499 Op0.getOperand(0).getOperand(0) == Op.getOperand(0).getOperand(0)) in convertBuildVecZextToZext()
16500 if (auto *C = dyn_cast<ConstantSDNode>(Op.getOperand(0).getOperand(1))) in convertBuildVecZextToZext()
16512 SDValue In = Op0.getOperand(0).getOperand(0); in convertBuildVecZextToZext()
16522 if ((Offset + i) != checkElem(N->getOperand(i))) in convertBuildVecZextToZext()
16528 Op0.getOperand(0).getOperand(1)); in convertBuildVecZextToZext()
16567 SDValue Op0 = N->getOperand(0); in visitBUILD_VECTOR()
16570 (Op0.getOperand(0) == Op.getOperand(0))) in visitBUILD_VECTOR()
16571 if (auto CNode = dyn_cast<ConstantSDNode>(Op.getOperand(1))) in visitBUILD_VECTOR()
16578 if (Offset + i != checkElem(N->getOperand(i))) { in visitBUILD_VECTOR()
16585 (Op0.getOperand(0).getValueType() == N->getValueType(0))) in visitBUILD_VECTOR()
16586 return Op0.getOperand(0); in visitBUILD_VECTOR()
16591 Op0.getOperand(0), Op0.getOperand(1)); in visitBUILD_VECTOR()
16608 EVT OpVT = N->getOperand(0).getValueType(); in combineConcatVectorOfScalars()
16626 !Op.getOperand(0).getValueType().isVector()) in combineConcatVectorOfScalars()
16627 Ops.push_back(Op.getOperand(0)); in combineConcatVectorOfScalars()
16673 EVT OpVT = N->getOperand(0).getValueType(); in combineConcatVectorOfExtracts()
16693 SDValue ExtVec = Op.getOperand(0); in combineConcatVectorOfExtracts()
16706 if (!isa<ConstantSDNode>(Op.getOperand(1))) in combineConcatVectorOfExtracts()
16748 return N->getOperand(0); in visitCONCAT_VECTORS()
16759 SDValue In = N->getOperand(0); in visitCONCAT_VECTORS()
16769 if (SVT == Scalar.getOperand(0).getValueType()) in visitCONCAT_VECTORS()
16770 Scalar = Scalar.getOperand(0); in visitCONCAT_VECTORS()
16780 TLI.isTypeLegal(Scalar->getOperand(0).getValueType())) in visitCONCAT_VECTORS()
16781 Scalar = Scalar->getOperand(0); in visitCONCAT_VECTORS()
16823 EVT OpSVT = Op.getOperand(0).getValueType(); in visitCONCAT_VECTORS()
16844 DAG.getNode(ISD::TRUNCATE, SDLoc(N), MinVT, Op.getOperand(i))); in visitCONCAT_VECTORS()
16868 unsigned PartNumElem = N->getOperand(0).getValueType().getVectorNumElements(); in visitCONCAT_VECTORS()
16871 SDValue Op = N->getOperand(i); in visitCONCAT_VECTORS()
16882 if (Op.getOperand(0) != SingleSource) in visitCONCAT_VECTORS()
16885 SingleSource = Op.getOperand(0); in visitCONCAT_VECTORS()
16895 ConstantSDNode *CS = dyn_cast<ConstantSDNode>(Op.getOperand(1)); in visitCONCAT_VECTORS()
16918 auto *ExtractIndexC = dyn_cast<ConstantSDNode>(Extract->getOperand(1)); in narrowExtractedVectorBinOp()
16924 SDValue BinOp = peekThroughBitcasts(Extract->getOperand(0)); in narrowExtractedVectorBinOp()
16965 EVT ExtBOIdxVT = Extract->getOperand(1).getValueType(); in narrowExtractedVectorBinOp()
16967 BinOp.hasOneUse() && Extract->getOperand(0)->hasOneUse()) { in narrowExtractedVectorBinOp()
16972 BinOp.getOperand(0), NewExtIndex); in narrowExtractedVectorBinOp()
16974 BinOp.getOperand(1), NewExtIndex); in narrowExtractedVectorBinOp()
16996 SDValue LHS = peekThroughBitcasts(BinOp.getOperand(0)); in narrowExtractedVectorBinOp()
16997 SDValue RHS = peekThroughBitcasts(BinOp.getOperand(1)); in narrowExtractedVectorBinOp()
17012 SDValue X = ConcatL ? DAG.getBitcast(NarrowBVT, LHS.getOperand(ConcatOpNum)) in narrowExtractedVectorBinOp()
17014 BinOp.getOperand(0), in narrowExtractedVectorBinOp()
17017 SDValue Y = ConcatR ? DAG.getBitcast(NarrowBVT, RHS.getOperand(ConcatOpNum)) in narrowExtractedVectorBinOp()
17019 BinOp.getOperand(1), in narrowExtractedVectorBinOp()
17034 auto *Ld = dyn_cast<LoadSDNode>(Extract->getOperand(0)); in narrowExtractedVectorLoad()
17035 auto *ExtIdx = dyn_cast<ConstantSDNode>(Extract->getOperand(1)); in narrowExtractedVectorLoad()
17048 SDValue BaseAddr = Ld->getOperand(1); in narrowExtractedVectorLoad()
17063 SDValue V = N->getOperand(0); in visitEXTRACT_SUBVECTOR()
17080 isa<ConstantSDNode>(N->getOperand(1)) && in visitEXTRACT_SUBVECTOR()
17081 V.getOperand(0).getValueType() == NVT) { in visitEXTRACT_SUBVECTOR()
17086 return V->getOperand(Idx / NumElems); in visitEXTRACT_SUBVECTOR()
17093 if (auto *Idx = dyn_cast<ConstantSDNode>(N->getOperand(1))) { in visitEXTRACT_SUBVECTOR()
17110 SDValue Src = V->getOperand(IdxVal); in visitEXTRACT_SUBVECTOR()
17130 EVT SmallVT = V.getOperand(1).getValueType(); in visitEXTRACT_SUBVECTOR()
17135 auto *ExtIdx = dyn_cast<ConstantSDNode>(N->getOperand(1)); in visitEXTRACT_SUBVECTOR()
17136 auto *InsIdx = dyn_cast<ConstantSDNode>(V.getOperand(2)); in visitEXTRACT_SUBVECTOR()
17146 return DAG.getBitcast(NVT, V.getOperand(1)); in visitEXTRACT_SUBVECTOR()
17149 DAG.getBitcast(N->getOperand(0).getValueType(), V.getOperand(0)), in visitEXTRACT_SUBVECTOR()
17150 N->getOperand(1)); in visitEXTRACT_SUBVECTOR()
17169 SDValue N0 = N->getOperand(0); in partitionShuffleOfConcats()
17170 SDValue N1 = N->getOperand(1); in partitionShuffleOfConcats()
17174 EVT ConcatVT = N0.getOperand(0).getValueType(); in partitionShuffleOfConcats()
17184 N0 = DAG.getVectorShuffle(ConcatVT, SDLoc(N), N0.getOperand(0), N0.getOperand(1), in partitionShuffleOfConcats()
17213 Ops.push_back(N0.getOperand(FirstElt)); in partitionShuffleOfConcats()
17215 Ops.push_back(N1.getOperand(FirstElt - N0.getNumOperands())); in partitionShuffleOfConcats()
17218 Ops.push_back(DAG.getUNDEF(N0.getOperand(0).getValueType())); in partitionShuffleOfConcats()
17248 SDValue N0 = SVN->getOperand(0); in combineShuffleOfScalars()
17249 SDValue N1 = SVN->getOperand(1); in combineShuffleOfScalars()
17285 Op = S.getOperand(Idx); in combineShuffleOfScalars()
17288 Op = S.getOperand(0); in combineShuffleOfScalars()
17338 SDValue N0 = SVN->getOperand(0); in combineShuffleToVectorExtend()
17390 SDValue N0 = peekThroughBitcasts(SVN->getOperand(0)); in combineTruncationShuffle()
17398 SDValue N00 = N0.getOperand(0); in combineTruncationShuffle()
17482 Splat->getOperand(0), Splat->getOperand(1), in combineShuffleOfSplat()
17520 SDValue Op0 = Shuf->getOperand(0); in replaceShuffleOfInsert()
17521 SDValue Op1 = Shuf->getOperand(1); in replaceShuffleOfInsert()
17544 auto *InsIndexC = dyn_cast<ConstantSDNode>(Op0.getOperand(2)); in replaceShuffleOfInsert()
17559 Op0.getOperand(2).getValueType()); in replaceShuffleOfInsert()
17561 Op1, Op0.getOperand(1), NewInsIndex); in replaceShuffleOfInsert()
17568 SDValue N0 = N->getOperand(0); in visitVECTOR_SHUFFLE()
17569 SDValue N1 = N->getOperand(1); in visitVECTOR_SHUFFLE()
17627 SDValue ConvInput = V->getOperand(0); in visitVECTOR_SHUFFLE()
17639 if (!V->getOperand(i).isUndef()) { in visitVECTOR_SHUFFLE()
17640 Base = V->getOperand(i); in visitVECTOR_SHUFFLE()
17648 if (V->getOperand(i) != Base) { in visitVECTOR_SHUFFLE()
17658 const SDValue &Splatted = V->getOperand(SVN->getSplatIndex()); in visitVECTOR_SHUFFLE()
17686 N0.getOperand(0).getValueType() == N1.getOperand(0).getValueType()))) { in visitVECTOR_SHUFFLE()
17743 SDValue SV0 = BC0->getOperand(0); in visitVECTOR_SHUFFLE()
17744 SDValue SV1 = BC0->getOperand(1); in visitVECTOR_SHUFFLE()
17771 assert(N1->getOperand(0).getValueType() == VT && in visitVECTOR_SHUFFLE()
17774 SDValue SV0 = N1->getOperand(0); in visitVECTOR_SHUFFLE()
17775 SDValue SV1 = N1->getOperand(1); in visitVECTOR_SHUFFLE()
17801 assert(OtherSV->getOperand(0).getValueType() == VT && in visitVECTOR_SHUFFLE()
17827 CurrentVec = (Idx < (int) NumElts) ? OtherSV->getOperand(0) in visitVECTOR_SHUFFLE()
17828 : OtherSV->getOperand(1); in visitVECTOR_SHUFFLE()
17897 SDValue InVal = N->getOperand(0); in visitSCALAR_TO_VECTOR()
17903 SDValue InVec = InVal->getOperand(0); in visitSCALAR_TO_VECTOR()
17904 SDValue EltNo = InVal->getOperand(1); in visitSCALAR_TO_VECTOR()
17949 SDValue N0 = N->getOperand(0); in visitINSERT_SUBVECTOR()
17950 SDValue N1 = N->getOperand(1); in visitINSERT_SUBVECTOR()
17951 SDValue N2 = N->getOperand(2); in visitINSERT_SUBVECTOR()
17960 N1.getOperand(1) == N2 && N1.getOperand(0).getValueType() == VT) in visitINSERT_SUBVECTOR()
17961 return N1.getOperand(0); in visitINSERT_SUBVECTOR()
17968 N1.getOperand(0).getOpcode() == ISD::EXTRACT_SUBVECTOR && in visitINSERT_SUBVECTOR()
17969 N1.getOperand(0).getOperand(1) == N2 && in visitINSERT_SUBVECTOR()
17970 N1.getOperand(0).getOperand(0).getValueType().getVectorNumElements() == in visitINSERT_SUBVECTOR()
17972 N1.getOperand(0).getOperand(0).getValueType().getSizeInBits() == in visitINSERT_SUBVECTOR()
17974 return DAG.getBitcast(VT, N1.getOperand(0).getOperand(0)); in visitINSERT_SUBVECTOR()
17982 SDValue CN0 = N0.getOperand(0); in visitINSERT_SUBVECTOR()
17983 SDValue CN1 = N1.getOperand(0); in visitINSERT_SUBVECTOR()
17999 N0.getOperand(1).getValueType() == N1.getValueType() && in visitINSERT_SUBVECTOR()
18000 N0.getOperand(2) == N2) in visitINSERT_SUBVECTOR()
18001 return DAG.getNode(ISD::INSERT_SUBVECTOR, SDLoc(N), VT, N0.getOperand(0), in visitINSERT_SUBVECTOR()
18008 N1.getOperand(0).isUndef() && isNullConstant(N1.getOperand(2))) in visitINSERT_SUBVECTOR()
18010 N1.getOperand(1), N2); in visitINSERT_SUBVECTOR()
18022 N1.getValueType() == N0.getOperand(1).getValueType() && in visitINSERT_SUBVECTOR()
18023 isa<ConstantSDNode>(N0.getOperand(2))) { in visitINSERT_SUBVECTOR()
18028 N0.getOperand(0), N1, N2); in visitINSERT_SUBVECTOR()
18031 VT, NewOp, N0.getOperand(1), N0.getOperand(2)); in visitINSERT_SUBVECTOR()
18038 N0.getOperand(0).getValueType() == N1.getValueType()) { in visitINSERT_SUBVECTOR()
18055 SDValue N0 = N->getOperand(0); in visitFP_TO_FP16()
18059 return N0->getOperand(0); in visitFP_TO_FP16()
18065 SDValue N0 = N->getOperand(0); in visitFP16_TO_FP()
18069 ConstantSDNode *AndConst = getAsNonOpaqueConstant(N0.getOperand(1)); in visitFP16_TO_FP()
18072 N0.getOperand(0)); in visitFP16_TO_FP()
18087 SDValue LHS = N->getOperand(0); in XformToShuffleWithZero()
18088 SDValue RHS = peekThroughBitcasts(N->getOperand(1)); in XformToShuffleWithZero()
18113 SDValue Elt = RHS.getOperand(EltIdx); in XformToShuffleWithZero()
18175 SDValue LHS = N->getOperand(0); in SimplifyVBinOp()
18176 SDValue RHS = N->getOperand(1); in SimplifyVBinOp()
18189 LHS.getOperand(1).isUndef() && in SimplifyVBinOp()
18190 RHS.getOperand(1).isUndef()) { in SimplifyVBinOp()
18196 SDValue UndefVector = LHS.getOperand(1); in SimplifyVBinOp()
18198 LHS.getOperand(0), RHS.getOperand(0), in SimplifyVBinOp()
18213 SDValue SCC = SimplifySelectCC(DL, N0.getOperand(0), N0.getOperand(1), N1, N2, in SimplifySelect()
18214 cast<CondCodeSDNode>(N0.getOperand(2))->get()); in SimplifySelect()
18225 SCC.getOperand(0), SCC.getOperand(1), in SimplifySelect()
18226 SCC.getOperand(4)); in SimplifySelect()
18229 SCC.getOperand(2), SCC.getOperand(3)); in SimplifySelect()
18255 CC = cast<CondCodeSDNode>(TheSelect->getOperand(4))->get(); in SimplifySelectOps()
18256 CmpLHS = TheSelect->getOperand(0); in SimplifySelectOps()
18257 Zero = isConstOrConstSplatFP(TheSelect->getOperand(1)); in SimplifySelectOps()
18260 SDValue Cmp = TheSelect->getOperand(0); in SimplifySelectOps()
18262 CC = cast<CondCodeSDNode>(Cmp.getOperand(2))->get(); in SimplifySelectOps()
18263 CmpLHS = Cmp.getOperand(0); in SimplifySelectOps()
18264 Zero = isConstOrConstSplatFP(Cmp.getOperand(1)); in SimplifySelectOps()
18268 Sqrt.getOperand(0) == CmpLHS && (CC == ISD::SETOLT || in SimplifySelectOps()
18277 if (TheSelect->getOperand(0).getValueType().isVector()) return false; in SimplifySelectOps()
18294 if (LHS.getOperand(0) != RHS.getOperand(0) || in SimplifySelectOps()
18347 SDNode *CondNode = TheSelect->getOperand(0).getNode(); in SimplifySelectOps()
18358 TheSelect->getOperand(0), LLD->getBasePtr(), in SimplifySelectOps()
18367 SDNode *CondLHS = TheSelect->getOperand(0).getNode(); in SimplifySelectOps()
18368 SDNode *CondRHS = TheSelect->getOperand(1).getNode(); in SimplifySelectOps()
18380 TheSelect->getOperand(0), in SimplifySelectOps()
18381 TheSelect->getOperand(1), in SimplifySelectOps()
18383 TheSelect->getOperand(4)); in SimplifySelectOps()
18587 SDValue AndLHS = N0->getOperand(0); in SimplifySelectCC()
18588 auto *ConstAndRHS = dyn_cast<ConstantSDNode>(N0->getOperand(1)); in SimplifySelectCC()
18663 N0 == N2 && N3.getOpcode() == ISD::SUB && N0 == N3.getOperand(1)) in SimplifySelectCC()
18664 SubC = dyn_cast<ConstantSDNode>(N3.getOperand(0)); in SimplifySelectCC()
18667 N0 == N3 && N2.getOpcode() == ISD::SUB && N0 == N2.getOperand(1)) in SimplifySelectCC()
18668 SubC = dyn_cast<ConstantSDNode>(N2.getOperand(0)); in SimplifySelectCC()
18704 N0 == Count.getOperand(0) && in SimplifySelectCC()
18711 N0 == Count.getOperand(0) && in SimplifySelectCC()
18753 ConstantSDNode *C = isConstOrConstSplat(N->getOperand(1)); in BuildSDIVPow2()
19186 Chains.push_back(Chain.getOperand(0)); in GatherAllAliases()
19202 Chains.push_back(Chain.getOperand(--n)); in GatherAllAliases()
19208 Chains.push_back(Chain.getOperand(0)); in GatherAllAliases()
19330 S, BetterChain, S->getOperand(1), S->getOperand(2), S->getOperand(3))); in parallelizeChainedStores()
19352 return ST->getOperand(0) != NewChain; in parallelizeChainedStores()
19364 AddToWorklist(TF->getOperand(--I).getNode()); in parallelizeChainedStores()