Lines Matching refs:getOperand

898     LHS = N.getOperand(0);  in isSetCCEquivalent()
899 RHS = N.getOperand(1); in isSetCCEquivalent()
900 CC = N.getOperand(2); in isSetCCEquivalent()
907 LHS = N.getOperand(1); in isSetCCEquivalent()
908 RHS = N.getOperand(2); in isSetCCEquivalent()
909 CC = N.getOperand(3); in isSetCCEquivalent()
913 if (N.getOpcode() != ISD::SELECT_CC || !TLI.isConstTrueVal(N.getOperand(2)) || in isSetCCEquivalent()
914 !TLI.isConstFalseVal(N.getOperand(3))) in isSetCCEquivalent()
921 LHS = N.getOperand(0); in isSetCCEquivalent()
922 RHS = N.getOperand(1); in isSetCCEquivalent()
923 CC = N.getOperand(4); in isSetCCEquivalent()
996 (LD->getOperand(2).getOpcode() != ISD::TargetConstant || in canSplitIdx()
997 !cast<ConstantSDNode>(LD->getOperand(2))->isOpaque()); in canSplitIdx()
1025 if (auto *C1 = dyn_cast<ConstantSDNode>(N0.getOperand(1))) { in reassociationCanBreakAddressingModePattern()
1056 if (auto *GA = dyn_cast<GlobalAddressSDNode>(N0.getOperand(1))) in reassociationCanBreakAddressingModePattern()
1091 SDValue N00 = N0.getOperand(0); in reassociateOpsCommutative()
1092 SDValue N01 = N0.getOperand(1); in reassociateOpsCommutative()
1291 if (SDValue Op0 = SExtPromoteOperand(Op.getOperand(0), PVT)) in PromoteOperand()
1292 return DAG.getNode(ISD::AssertSext, DL, PVT, Op0, Op.getOperand(1)); in PromoteOperand()
1295 if (SDValue Op0 = ZExtPromoteOperand(Op.getOperand(0), PVT)) in PromoteOperand()
1296 return DAG.getNode(ISD::AssertZext, DL, PVT, Op0, Op.getOperand(1)); in PromoteOperand()
1367 SDValue N0 = Op.getOperand(0); in PromoteIntBinOp()
1371 SDValue N1 = Op.getOperand(1); in PromoteIntBinOp()
1435 SDValue N0 = Op.getOperand(0); in PromoteIntShiftOp()
1447 SDValue N1 = Op.getOperand(1); in PromoteIntShiftOp()
1452 ReplaceLoadWithPromotedLoad(Op.getOperand(0).getNode(), N0.getNode()); in PromoteIntShiftOp()
1484 return DAG.getNode(Op.getOpcode(), SDLoc(Op), VT, Op.getOperand(0)); in PromoteExtend()
1872 SDValue N0 = N->getOperand(0); in combine()
1873 SDValue N1 = N->getOperand(1); in combine()
1892 if (N->getOperand(0).getValueType() == MVT::Other) in getInputChainForNode()
1893 return N->getOperand(0); in getInputChainForNode()
1894 if (N->getOperand(NumOps-1).getValueType() == MVT::Other) in getInputChainForNode()
1895 return N->getOperand(NumOps-1); in getInputChainForNode()
1897 if (N->getOperand(i).getValueType() == MVT::Other) in getInputChainForNode()
1898 return N->getOperand(i); in getInputChainForNode()
1907 if (getInputChainForNode(N->getOperand(0).getNode()) == N->getOperand(1)) in visitTokenFactor()
1908 return N->getOperand(0); in visitTokenFactor()
1909 if (getInputChainForNode(N->getOperand(1).getNode()) == N->getOperand(0)) in visitTokenFactor()
1910 return N->getOperand(1); in visitTokenFactor()
2055 AddToWorklist(i, CurNode->getOperand(0).getNode(), CurOpNumber); in visitTokenFactor()
2104 Ops.push_back(N->getOperand(i)); in visitMERGE_VALUES()
2152 ConstantSDNode *Offset = dyn_cast<ConstantSDNode>(N->getOperand(1)); in canFoldInAddressingMode()
2161 ConstantSDNode *Offset = dyn_cast<ConstantSDNode>(N->getOperand(1)); in canFoldInAddressingMode()
2184 SDValue N0 = N->getOperand(0); in foldSelectWithIdentityConstant()
2185 SDValue N1 = N->getOperand(1); in foldSelectWithIdentityConstant()
2195 SDValue Cond = N1.getOperand(0); in foldSelectWithIdentityConstant()
2196 SDValue TVal = N1.getOperand(1); in foldSelectWithIdentityConstant()
2197 SDValue FVal = N1.getOperand(2); in foldSelectWithIdentityConstant()
2266 SDValue Sel = BO->getOperand(0); in foldBinOpIntoSelect()
2269 Sel = BO->getOperand(1); in foldBinOpIntoSelect()
2275 SDValue CT = Sel.getOperand(1); in foldBinOpIntoSelect()
2280 SDValue CF = Sel.getOperand(2); in foldBinOpIntoSelect()
2295 SDValue CBO = BO->getOperand(SelOpNo ^ 1); in foldBinOpIntoSelect()
2319 SDValue SelectOp = DAG.getSelect(DL, VT, Sel.getOperand(0), NewCT, NewCF); in foldBinOpIntoSelect()
2332 SDValue C = IsAdd ? N->getOperand(1) : N->getOperand(0); in foldAddSubBoolOfMaskedVal()
2333 SDValue Z = IsAdd ? N->getOperand(0) : N->getOperand(1); in foldAddSubBoolOfMaskedVal()
2339 if (Z.getOperand(0).getOpcode() != ISD::SETCC || in foldAddSubBoolOfMaskedVal()
2340 Z.getOperand(0).getValueType() != MVT::i1) in foldAddSubBoolOfMaskedVal()
2344 SDValue SetCC = Z.getOperand(0); in foldAddSubBoolOfMaskedVal()
2345 ISD::CondCode CC = cast<CondCodeSDNode>(SetCC->getOperand(2))->get(); in foldAddSubBoolOfMaskedVal()
2346 if (CC != ISD::SETEQ || !isNullConstant(SetCC.getOperand(1)) || in foldAddSubBoolOfMaskedVal()
2347 SetCC.getOperand(0).getOpcode() != ISD::AND || in foldAddSubBoolOfMaskedVal()
2348 !isOneConstant(SetCC.getOperand(0).getOperand(1))) in foldAddSubBoolOfMaskedVal()
2357 SDValue LowBit = DAG.getZExtOrTrunc(SetCC.getOperand(0), DL, VT); in foldAddSubBoolOfMaskedVal()
2372 SDValue ConstantOp = IsAdd ? N->getOperand(1) : N->getOperand(0); in foldAddSubOfSignBit()
2373 SDValue ShiftOp = IsAdd ? N->getOperand(0) : N->getOperand(1); in foldAddSubOfSignBit()
2379 SDValue Not = ShiftOp.getOperand(0); in foldAddSubOfSignBit()
2385 SDValue ShAmt = ShiftOp.getOperand(1); in foldAddSubOfSignBit()
2398 Not.getOperand(0), ShAmt); in foldAddSubOfSignBit()
2408 return DAG.haveNoCommonBitsSet(V.getOperand(0), V.getOperand(1)); in isADDLike()
2410 return isMinSignedConstant(V.getOperand(1)); in isADDLike()
2418 SDValue N0 = N->getOperand(0); in visitADDLike()
2419 SDValue N1 = N->getOperand(1); in visitADDLike()
2453 SDValue N00 = N0.getOperand(0); in visitADDLike()
2454 SDValue N01 = N0.getOperand(1); in visitADDLike()
2458 return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), Sub); in visitADDLike()
2462 return DAG.getNode(ISD::SUB, DL, VT, Add, N0.getOperand(1)); in visitADDLike()
2471 SDValue X = N0.getOperand(0); in visitADDLike()
2486 SDValue N01 = N0.getOperand(1); in visitADDLike()
2488 return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), Add); in visitADDLike()
2505 isConstantOrConstantVector(N0.getOperand(1), /* NoOpaque */ true)) { in visitADDLike()
2507 DAG.getNode(ISD::ADD, DL, VT, N1, N0.getOperand(0)), in visitADDLike()
2508 N0.getOperand(1)); in visitADDLike()
2518 if (N0.getOpcode() == ISD::SUB && isNullOrNullSplat(N0.getOperand(0))) in visitADDLike()
2519 return DAG.getNode(ISD::SUB, DL, VT, N1, N0.getOperand(1)); in visitADDLike()
2522 if (N1.getOpcode() == ISD::SUB && isNullOrNullSplat(N1.getOperand(0))) in visitADDLike()
2523 return DAG.getNode(ISD::SUB, DL, VT, N0, N1.getOperand(1)); in visitADDLike()
2526 if (N1.getOpcode() == ISD::SUB && N0 == N1.getOperand(1)) in visitADDLike()
2527 return N1.getOperand(0); in visitADDLike()
2530 if (N0.getOpcode() == ISD::SUB && N1 == N0.getOperand(1)) in visitADDLike()
2531 return N0.getOperand(0); in visitADDLike()
2535 N0.getOperand(0) == N1.getOperand(1)) in visitADDLike()
2536 return DAG.getNode(ISD::SUB, DL, VT, N1.getOperand(0), in visitADDLike()
2537 N0.getOperand(1)); in visitADDLike()
2541 N0.getOperand(1) == N1.getOperand(0)) in visitADDLike()
2542 return DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), in visitADDLike()
2543 N1.getOperand(1)); in visitADDLike()
2546 if (N1.getOpcode() == ISD::SUB && N1.getOperand(1).getOpcode() == ISD::ADD && in visitADDLike()
2547 N0 == N1.getOperand(1).getOperand(0)) in visitADDLike()
2548 return DAG.getNode(ISD::SUB, DL, VT, N1.getOperand(0), in visitADDLike()
2549 N1.getOperand(1).getOperand(1)); in visitADDLike()
2552 if (N1.getOpcode() == ISD::SUB && N1.getOperand(1).getOpcode() == ISD::ADD && in visitADDLike()
2553 N0 == N1.getOperand(1).getOperand(1)) in visitADDLike()
2554 return DAG.getNode(ISD::SUB, DL, VT, N1.getOperand(0), in visitADDLike()
2555 N1.getOperand(1).getOperand(0)); in visitADDLike()
2559 N1.getOperand(0).getOpcode() == ISD::SUB && in visitADDLike()
2560 N0 == N1.getOperand(0).getOperand(1)) in visitADDLike()
2561 return DAG.getNode(N1.getOpcode(), DL, VT, N1.getOperand(0).getOperand(0), in visitADDLike()
2562 N1.getOperand(1)); in visitADDLike()
2567 SDValue N00 = N0.getOperand(0); in visitADDLike()
2568 SDValue N01 = N0.getOperand(1); in visitADDLike()
2569 SDValue N10 = N1.getOperand(0); in visitADDLike()
2570 SDValue N11 = N1.getOperand(1); in visitADDLike()
2584 if (ISD::matchBinaryPredicate(N0.getOperand(1), N1, MatchUSUBSAT, in visitADDLike()
2586 return DAG.getNode(ISD::USUBSAT, DL, VT, N0.getOperand(0), in visitADDLike()
2587 N0.getOperand(1)); in visitADDLike()
2597 N0.getOperand(0)); in visitADDLike()
2603 if (isBitwiseNot(N0.getOperand(0))) { in visitADDLike()
2604 A = N0.getOperand(1); in visitADDLike()
2605 Xor = N0.getOperand(0); in visitADDLike()
2606 } else if (isBitwiseNot(N0.getOperand(1))) { in visitADDLike()
2607 A = N0.getOperand(0); in visitADDLike()
2608 Xor = N0.getOperand(1); in visitADDLike()
2612 return DAG.getNode(ISD::SUB, DL, VT, A, Xor.getOperand(0)); in visitADDLike()
2621 SDValue Not = DAG.getNode(ISD::XOR, DL, VT, N0.getOperand(0), in visitADDLike()
2623 return DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(1), Not); in visitADDLike()
2630 SDValue Xor = DAG.getNode(ISD::XOR, DL, VT, N0.getOperand(1), N1); in visitADDLike()
2631 return DAG.getNode(ISD::ADD, DL, VT, Xor, N0.getOperand(0)); in visitADDLike()
2644 SDValue N0 = N->getOperand(0); in visitADD()
2645 SDValue N1 = N->getOperand(1); in visitADD()
2672 (N0.getOperand(1).getOpcode() == ISD::VSCALE) && in visitADD()
2674 const APInt &VS0 = N0.getOperand(1)->getConstantOperandAPInt(0); in visitADD()
2677 return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), VS); in visitADD()
2691 (N0.getOperand(1).getOpcode() == ISD::STEP_VECTOR) && in visitADD()
2693 const APInt &SV0 = N0.getOperand(1)->getConstantOperandAPInt(0); in visitADD()
2697 return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), SV); in visitADD()
2705 SDValue N0 = N->getOperand(0); in visitADDSAT()
2706 SDValue N1 = N->getOperand(1); in visitADDSAT()
2751 V = V.getOperand(0); in getAsCarry()
2755 if (V.getOpcode() == ISD::AND && isOneConstant(V.getOperand(1))) { in getAsCarry()
2757 V = V.getOperand(0); in getAsCarry()
2792 if (N1.getOpcode() != ISD::AND || !isOneOrOneSplat(N1->getOperand(1))) in foldAddSubMasked1()
2796 if (DAG.ComputeNumSignBits(N1.getOperand(0)) != VT.getScalarSizeInBits()) in foldAddSubMasked1()
2801 return DAG.getNode(IsAdd ? ISD::SUB : ISD::ADD, DL, VT, N0, N1.getOperand(0)); in foldAddSubMasked1()
2811 if (N1.getOpcode() == ISD::SHL && N1.getOperand(0).getOpcode() == ISD::SUB && in visitADDLikeCommutative()
2812 isNullOrNullSplat(N1.getOperand(0).getOperand(0))) in visitADDLikeCommutative()
2815 N1.getOperand(0).getOperand(1), in visitADDLikeCommutative()
2816 N1.getOperand(1))); in visitADDLikeCommutative()
2826 N0.hasOneUse() && isOneOrOneSplat(N0.getOperand(1))) { in visitADDLikeCommutative()
2827 SDValue Not = DAG.getNode(ISD::XOR, DL, VT, N0.getOperand(0), in visitADDLikeCommutative()
2836 if (isConstantOrConstantVector(N0.getOperand(1), /*NoOpaques=*/true)) { in visitADDLikeCommutative()
2837 SDValue Add = DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), N1); in visitADDLikeCommutative()
2838 return DAG.getNode(ISD::SUB, DL, VT, Add, N0.getOperand(1)); in visitADDLikeCommutative()
2842 if (isConstantOrConstantVector(N0.getOperand(0), /*NoOpaques=*/true)) { in visitADDLikeCommutative()
2843 SDValue Sub = DAG.getNode(ISD::SUB, DL, VT, N1, N0.getOperand(1)); in visitADDLikeCommutative()
2844 return DAG.getNode(ISD::ADD, DL, VT, Sub, N0.getOperand(0)); in visitADDLikeCommutative()
2852 N0.getOperand(0).getScalarValueSizeInBits() == 1 && in visitADDLikeCommutative()
2854 SDValue ZExt = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, N0.getOperand(0)); in visitADDLikeCommutative()
2860 VTSDNode *TN = cast<VTSDNode>(N1.getOperand(1)); in visitADDLikeCommutative()
2862 SDValue ZExt = DAG.getNode(ISD::AND, DL, VT, N1.getOperand(0), in visitADDLikeCommutative()
2869 if (N1.getOpcode() == ISD::ADDCARRY && isNullConstant(N1.getOperand(1)) && in visitADDLikeCommutative()
2872 N0, N1.getOperand(0), N1.getOperand(2)); in visitADDLikeCommutative()
2885 SDValue N0 = N->getOperand(0); in visitADDC()
2886 SDValue N1 = N->getOperand(1); in visitADDC()
2930 ConstantSDNode *Const = isConstOrConstSplat(V.getOperand(1), false); in extractBooleanFlip()
2950 return V.getOperand(0); in extractBooleanFlip()
2957 SDValue N0 = N->getOperand(0); in visitADDO()
2958 SDValue N1 = N->getOperand(1); in visitADDO()
2988 DAG.getConstant(0, DL, VT), N0.getOperand(0)); in visitADDO()
3010 if (N1.getOpcode() == ISD::ADDCARRY && isNullConstant(N1.getOperand(1))) { in visitUADDOLike()
3011 SDValue Y = N1.getOperand(0); in visitUADDOLike()
3015 N1.getOperand(2)); in visitUADDOLike()
3028 SDValue N0 = N->getOperand(0); in visitADDE()
3029 SDValue N1 = N->getOperand(1); in visitADDE()
3030 SDValue CarryIn = N->getOperand(2); in visitADDE()
3047 SDValue N0 = N->getOperand(0); in visitADDCARRY()
3048 SDValue N1 = N->getOperand(1); in visitADDCARRY()
3049 SDValue CarryIn = N->getOperand(2); in visitADDCARRY()
3086 SDValue N0 = N->getOperand(0); in visitSADDO_CARRY()
3087 SDValue N1 = N->getOperand(1); in visitSADDO_CARRY()
3088 SDValue CarryIn = N->getOperand(2); in visitSADDO_CARRY()
3144 isNullConstant(Carry0.getOperand(1))) { in combineADDCARRYDiamond()
3145 Z = Carry0.getOperand(2); in combineADDCARRYDiamond()
3147 isOneConstant(Carry0.getOperand(1))) { in combineADDCARRYDiamond()
3149 Z = DAG.getConstant(1, SDLoc(Carry0.getOperand(1)), VT); in combineADDCARRYDiamond()
3172 if (Carry0.getOperand(0) == Carry1.getValue(0)) { in combineADDCARRYDiamond()
3173 return cancelDiamond(Carry1.getOperand(0), Carry1.getOperand(1)); in combineADDCARRYDiamond()
3183 if (Carry1.getOperand(0) == Carry0.getValue(0)) { in combineADDCARRYDiamond()
3184 return cancelDiamond(Carry0.getOperand(0), Carry1.getOperand(1)); in combineADDCARRYDiamond()
3187 if (Carry1.getOperand(1) == Carry0.getValue(0)) { in combineADDCARRYDiamond()
3188 return cancelDiamond(Carry1.getOperand(0), Carry0.getOperand(0)); in combineADDCARRYDiamond()
3241 if (Carry1.getOperand(0) != Carry0.getValue(0) && in combineCarryDiamond()
3242 Carry1.getOperand(1) != Carry0.getValue(0)) in combineCarryDiamond()
3247 Carry1.getOperand(0) == Carry0.getValue(0) ? 1 : 0; in combineCarryDiamond()
3250 SDValue CarryIn = Carry1.getOperand(CarryInOperandNum); in combineCarryDiamond()
3260 CarryIn = CarryIn.getOperand(0); in combineCarryDiamond()
3266 DAG.getNode(NewOp, DL, Carry1->getVTList(), Carry0.getOperand(0), in combineCarryDiamond()
3267 Carry0.getOperand(1), CarryIn); in combineCarryDiamond()
3295 N0.getOperand(0), NotC); in visitADDCARRYLike()
3309 N0.getOperand(0), N0.getOperand(1), CarryIn); in visitADDCARRYLike()
3363 SDValue Op0 = N->getOperand(0); in foldSubToUSubSat()
3364 SDValue Op1 = N->getOperand(1); in foldSubToUSubSat()
3369 SDValue MaxLHS = Op0.getOperand(0); in foldSubToUSubSat()
3370 SDValue MaxRHS = Op0.getOperand(1); in foldSubToUSubSat()
3378 SDValue MinLHS = Op1.getOperand(0); in foldSubToUSubSat()
3379 SDValue MinRHS = Op1.getOperand(1); in foldSubToUSubSat()
3388 Op1.getOperand(0).getOpcode() == ISD::UMIN && in foldSubToUSubSat()
3389 Op1.getOperand(0).hasOneUse()) { in foldSubToUSubSat()
3390 SDValue MinLHS = Op1.getOperand(0).getOperand(0); in foldSubToUSubSat()
3391 SDValue MinRHS = Op1.getOperand(0).getOperand(1); in foldSubToUSubSat()
3392 if (MinLHS.getOpcode() == ISD::ZERO_EXTEND && MinLHS.getOperand(0) == Op0) in foldSubToUSubSat()
3395 if (MinRHS.getOpcode() == ISD::ZERO_EXTEND && MinRHS.getOperand(0) == Op0) in foldSubToUSubSat()
3415 SDValue N0 = N->getOperand(0); in visitSUB()
3416 SDValue N1 = N->getOperand(1); in visitSUB()
3422 return N->getOperand(0); in visitSUB()
3463 ConstantSDNode *ShiftAmt = isConstOrConstSplat(N1.getOperand(1)); in visitSUB()
3467 return DAG.getNode(NewSh, DL, VT, N1.getOperand(0), N1.getOperand(1)); in visitSUB()
3495 isNullConstant(N1S.getOperand(0))) { in visitSUB()
3497 return DAG.getSplatVector(VT, DL, N1S.getOperand(1)); in visitSUB()
3498 return DAG.getSplatBuildVector(VT, DL, N1S.getOperand(1)); in visitSUB()
3508 if (N1.getOpcode() == ISD::SUB && isNullOrNullSplat(N1.getOperand(0))) in visitSUB()
3509 return DAG.getNode(ISD::ADD, DL, VT, N0, N1.getOperand(1)); in visitSUB()
3512 if (N1.getOpcode() == ISD::SUB && N0 == N1.getOperand(0)) in visitSUB()
3513 return N1.getOperand(1); in visitSUB()
3516 if (N0.getOpcode() == ISD::ADD && N0.getOperand(0) == N1) in visitSUB()
3517 return N0.getOperand(1); in visitSUB()
3520 if (N0.getOpcode() == ISD::ADD && N0.getOperand(1) == N1) in visitSUB()
3521 return N0.getOperand(0); in visitSUB()
3525 SDValue N01 = N0.getOperand(1); in visitSUB()
3527 return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), NewC); in visitSUB()
3532 SDValue N11 = N1.getOperand(1); in visitSUB()
3534 return DAG.getNode(ISD::SUB, DL, VT, NewC, N1.getOperand(0)); in visitSUB()
3539 SDValue N01 = N0.getOperand(1); in visitSUB()
3541 return DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), NewC); in visitSUB()
3546 SDValue N00 = N0.getOperand(0); in visitSUB()
3548 return DAG.getNode(ISD::SUB, DL, VT, NewC, N0.getOperand(1)); in visitSUB()
3553 (N0.getOperand(1).getOpcode() == ISD::SUB || in visitSUB()
3554 N0.getOperand(1).getOpcode() == ISD::ADD) && in visitSUB()
3555 N0.getOperand(1).getOperand(0) == N1) in visitSUB()
3556 return DAG.getNode(N0.getOperand(1).getOpcode(), DL, VT, N0.getOperand(0), in visitSUB()
3557 N0.getOperand(1).getOperand(1)); in visitSUB()
3560 if (N0.getOpcode() == ISD::ADD && N0.getOperand(1).getOpcode() == ISD::ADD && in visitSUB()
3561 N0.getOperand(1).getOperand(1) == N1) in visitSUB()
3562 return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(0), in visitSUB()
3563 N0.getOperand(1).getOperand(0)); in visitSUB()
3566 if (N0.getOpcode() == ISD::SUB && N0.getOperand(1).getOpcode() == ISD::SUB && in visitSUB()
3567 N0.getOperand(1).getOperand(1) == N1) in visitSUB()
3568 return DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), in visitSUB()
3569 N0.getOperand(1).getOperand(0)); in visitSUB()
3574 DAG.getNode(ISD::SUB, DL, VT, N1.getOperand(1), in visitSUB()
3575 N1.getOperand(0))); in visitSUB()
3579 SDValue A = N1.getOperand(0); in visitSUB()
3580 SDValue B = N1.getOperand(1); in visitSUB()
3593 if (N1.getOperand(0).getOpcode() == ISD::SUB && in visitSUB()
3594 isNullOrNullSplat(N1.getOperand(0).getOperand(0))) { in visitSUB()
3596 N1.getOperand(0).getOperand(1), in visitSUB()
3597 N1.getOperand(1)); in visitSUB()
3600 if (N1.getOperand(1).getOpcode() == ISD::SUB && in visitSUB()
3601 isNullOrNullSplat(N1.getOperand(1).getOperand(0))) { in visitSUB()
3603 N1.getOperand(0), in visitSUB()
3604 N1.getOperand(1).getOperand(1)); in visitSUB()
3629 SDValue Xor = DAG.getNode(ISD::XOR, DL, VT, N0.getOperand(1), in visitSUB()
3631 return DAG.getNode(ISD::ADD, DL, VT, Xor, N0.getOperand(0)); in visitSUB()
3639 SDValue Add = DAG.getNode(ISD::ADD, DL, VT, N0, N1.getOperand(0)); in visitSUB()
3646 isConstantOrConstantVector(N0.getOperand(1), /*NoOpaques=*/true)) { in visitSUB()
3647 SDValue Sub = DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), N1); in visitSUB()
3648 return DAG.getNode(ISD::ADD, DL, VT, Sub, N0.getOperand(1)); in visitSUB()
3652 isConstantOrConstantVector(N1.getOperand(1), /*NoOpaques=*/true)) { in visitSUB()
3653 SDValue Sub = DAG.getNode(ISD::SUB, DL, VT, N0, N1.getOperand(0)); in visitSUB()
3654 return DAG.getNode(ISD::SUB, DL, VT, Sub, N1.getOperand(1)); in visitSUB()
3659 isConstantOrConstantVector(N0.getOperand(1), /*NoOpaques=*/true)) { in visitSUB()
3660 SDValue Sub = DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), N1); in visitSUB()
3661 return DAG.getNode(ISD::SUB, DL, VT, Sub, N0.getOperand(1)); in visitSUB()
3665 isConstantOrConstantVector(N0.getOperand(0), /*NoOpaques=*/true)) { in visitSUB()
3666 SDValue Add = DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(1), N1); in visitSUB()
3667 return DAG.getNode(ISD::SUB, DL, VT, N0.getOperand(0), Add); in visitSUB()
3674 N1.getOperand(0).getScalarValueSizeInBits() == 1 && in visitSUB()
3677 SDValue SExt = DAG.getNode(ISD::SIGN_EXTEND, DL, VT, N1.getOperand(0)); in visitSUB()
3684 SDValue X0 = N0.getOperand(0), X1 = N0.getOperand(1); in visitSUB()
3685 SDValue S0 = N1.getOperand(0); in visitSUB()
3687 if (ConstantSDNode *C = isConstOrConstSplat(N1.getOperand(1))) in visitSUB()
3710 VTSDNode *TN = cast<VTSDNode>(N1.getOperand(1)); in visitSUB()
3712 SDValue ZExt = DAG.getNode(ISD::AND, DL, VT, N1.getOperand(0), in visitSUB()
3734 SDValue ShAmt = N1.getOperand(1); in visitSUB()
3738 SDValue SRA = DAG.getNode(ISD::SRA, DL, VT, N1.getOperand(0), ShAmt); in visitSUB()
3747 ConstantSDNode *ShlC = isConstOrConstSplat(N1.getOperand(1)); in visitSUB()
3779 SDValue N0 = N->getOperand(0); in visitSUBSAT()
3780 SDValue N1 = N->getOperand(1); in visitSUBSAT()
3814 SDValue N0 = N->getOperand(0); in visitSUBC()
3815 SDValue N1 = N->getOperand(1); in visitSUBC()
3842 SDValue N0 = N->getOperand(0); in visitSUBO()
3843 SDValue N1 = N->getOperand(1); in visitSUBO()
3881 SDValue N0 = N->getOperand(0); in visitSUBE()
3882 SDValue N1 = N->getOperand(1); in visitSUBE()
3883 SDValue CarryIn = N->getOperand(2); in visitSUBE()
3893 SDValue N0 = N->getOperand(0); in visitSUBCARRY()
3894 SDValue N1 = N->getOperand(1); in visitSUBCARRY()
3895 SDValue CarryIn = N->getOperand(2); in visitSUBCARRY()
3908 SDValue N0 = N->getOperand(0); in visitSSUBO_CARRY()
3909 SDValue N1 = N->getOperand(1); in visitSSUBO_CARRY()
3910 SDValue CarryIn = N->getOperand(2); in visitSSUBO_CARRY()
3925 SDValue N0 = N->getOperand(0); in visitMULFIX()
3926 SDValue N1 = N->getOperand(1); in visitMULFIX()
3927 SDValue Scale = N->getOperand(2); in visitMULFIX()
3947 SDValue N0 = N->getOperand(0); in visitMUL()
3948 SDValue N1 = N->getOperand(1); in visitMUL()
4074 SDValue N01 = N0.getOperand(1); in visitMUL()
4076 return DAG.getNode(ISD::MUL, DL, VT, N0.getOperand(0), C3); in visitMUL()
4086 isConstantOrConstantVector(N0.getOperand(1)) && N0->hasOneUse()) { in visitMUL()
4089 isConstantOrConstantVector(N1.getOperand(1)) && in visitMUL()
4095 SDValue Mul = DAG.getNode(ISD::MUL, DL, VT, Sh.getOperand(0), Y); in visitMUL()
4096 return DAG.getNode(ISD::SHL, DL, VT, Mul, Sh.getOperand(1)); in visitMUL()
4103 DAG.isConstantIntBuildVectorOrConstantInt(N0.getOperand(1)) && in visitMUL()
4107 DAG.getNode(ISD::MUL, SDLoc(N0), VT, N0.getOperand(0), N1), in visitMUL()
4108 DAG.getNode(ISD::MUL, SDLoc(N1), VT, N0.getOperand(1), N1)); in visitMUL()
4146 EVT LegalSVT = N1.getOperand(0).getValueType(); in visitMUL()
4222 SDValue Op0 = Node->getOperand(0); in useDivRem()
4223 SDValue Op1 = Node->getOperand(1); in useDivRem()
4234 User->getOperand(0) == Op0 && in useDivRem()
4235 User->getOperand(1) == Op1) { in useDivRem()
4257 SDValue N0 = N->getOperand(0); in simplifyDivRem()
4258 SDValue N1 = N->getOperand(1); in simplifyDivRem()
4303 SDValue N0 = N->getOperand(0); in visitSDIV()
4304 SDValue N1 = N->getOperand(1); in visitSDIV()
4451 SDValue N0 = N->getOperand(0); in visitUDIV()
4452 SDValue N1 = N->getOperand(1); in visitUDIV()
4522 SDValue N10 = N1.getOperand(0); in visitUDIVLike()
4528 EVT ADDVT = N1.getOperand(1).getValueType(); in visitUDIVLike()
4531 SDValue Add = DAG.getNode(ISD::ADD, DL, ADDVT, N1.getOperand(1), Trunc); in visitUDIVLike()
4560 SDValue N0 = N->getOperand(0); in visitREM()
4561 SDValue N1 = N->getOperand(1); in visitREM()
4604 DAG.isKnownToBeAPowerOfTwo(N1.getOperand(0))) { in visitREM()
4652 SDValue N0 = N->getOperand(0); in visitMULHS()
4653 SDValue N1 = N->getOperand(1); in visitMULHS()
4712 SDValue N0 = N->getOperand(0); in visitMULHU()
4713 SDValue N1 = N->getOperand(1); in visitMULHU()
4789 SDValue N0 = N->getOperand(0); in visitAVG()
4790 SDValue N1 = N->getOperand(1); in visitAVG()
4880 SDValue N0 = N->getOperand(0); in visitSMUL_LOHI()
4881 SDValue N1 = N->getOperand(1); in visitSMUL_LOHI()
4918 SDValue N0 = N->getOperand(0); in visitUMUL_LOHI()
4919 SDValue N1 = N->getOperand(1); in visitUMUL_LOHI()
4965 SDValue N0 = N->getOperand(0); in visitMULO()
4966 SDValue N1 = N->getOperand(1); in visitMULO()
5049 if (N0 != N2 && (N2.getOpcode() != ISD::TRUNCATE || N0 != N2.getOperand(0))) in isSaturatingMinMax()
5073 N00 = N02 = N0.getOperand(0); in isSaturatingMinMax()
5074 N01 = N03 = N0.getOperand(1); in isSaturatingMinMax()
5078 N00 = N0.getOperand(0); in isSaturatingMinMax()
5079 N01 = N0.getOperand(1); in isSaturatingMinMax()
5080 N02 = N0.getOperand(2); in isSaturatingMinMax()
5081 N03 = N0.getOperand(3); in isSaturatingMinMax()
5082 N0CC = cast<CondCodeSDNode>(N0.getOperand(4))->get(); in isSaturatingMinMax()
5086 if (N0.getOperand(0).getOpcode() != ISD::SETCC) in isSaturatingMinMax()
5088 N00 = N0.getOperand(0).getOperand(0); in isSaturatingMinMax()
5089 N01 = N0.getOperand(0).getOperand(1); in isSaturatingMinMax()
5090 N02 = N0.getOperand(1); in isSaturatingMinMax()
5091 N03 = N0.getOperand(2); in isSaturatingMinMax()
5092 N0CC = cast<CondCodeSDNode>(N0.getOperand(0).getOperand(2))->get(); in isSaturatingMinMax()
5133 EVT FPVT = Fp.getOperand(0).getValueType(); in PerformMinMaxFpToSatCombine()
5142 SDValue Sat = DAG.getNode(NewOpc, DL, NewVT, Fp.getOperand(0), in PerformMinMaxFpToSatCombine()
5155 (N2.getOpcode() != ISD::TRUNCATE || N0 != N2.getOperand(0))) || in PerformUMinFpToSatCombine()
5169 EVT FPVT = N0.getOperand(0).getValueType(); in PerformUMinFpToSatCombine()
5179 DAG.getNode(ISD::FP_TO_UINT_SAT, SDLoc(N0), NewVT, N0.getOperand(0), in PerformUMinFpToSatCombine()
5185 SDValue N0 = N->getOperand(0); in visitIMINMAX()
5186 SDValue N1 = N->getOperand(1); in visitIMINMAX()
5244 SDValue N0 = N->getOperand(0), N1 = N->getOperand(1); in hoistLogicOpWithSameOpcodeHands()
5260 SDValue X = N0.getOperand(0); in hoistLogicOpWithSameOpcodeHands()
5261 SDValue Y = N1.getOperand(0); in hoistLogicOpWithSameOpcodeHands()
5314 N0.getOperand(1) == N1.getOperand(1)) { in hoistLogicOpWithSameOpcodeHands()
5319 return DAG.getNode(HandOpcode, DL, VT, Logic, N0.getOperand(1)); in hoistLogicOpWithSameOpcodeHands()
5377 SDValue ShOp = N0.getOperand(1); in hoistLogicOpWithSameOpcodeHands()
5382 if (N0.getOperand(1) == N1.getOperand(1) && ShOp.getNode()) { in hoistLogicOpWithSameOpcodeHands()
5384 N0.getOperand(0), N1.getOperand(0)); in hoistLogicOpWithSameOpcodeHands()
5390 ShOp = N0.getOperand(0); in hoistLogicOpWithSameOpcodeHands()
5395 if (N0.getOperand(0) == N1.getOperand(0) && ShOp.getNode()) { in hoistLogicOpWithSameOpcodeHands()
5396 SDValue Logic = DAG.getNode(LogicOpcode, DL, VT, N0.getOperand(1), in hoistLogicOpWithSameOpcodeHands()
5397 N1.getOperand(1)); in hoistLogicOpWithSameOpcodeHands()
5568 if (ConstantSDNode *ADDI = dyn_cast<ConstantSDNode>(N0.getOperand(1))) { in visitANDLike()
5569 if (ConstantSDNode *SRLI = dyn_cast<ConstantSDNode>(N1.getOperand(1))) { in visitANDLike()
5581 if (DAG.MaskedValueIsZero(N0.getOperand(1), Mask)) { in visitANDLike()
5587 N0.getOperand(0), DAG.getConstant(ADDC, DL, VT)); in visitANDLike()
5603 if (ConstantSDNode *CShift = dyn_cast<ConstantSDNode>(N0.getOperand(1))) { in visitANDLike()
5635 N0.getOperand(0)); in visitANDLike()
5822 cast<VTSDNode>(Op.getOperand(1))->getVT() : in SearchForAndLoads()
5823 Op.getOperand(0).getValueType(); in SearchForAndLoads()
5865 auto *Mask = dyn_cast<ConstantSDNode>(N->getOperand(1)); in BackwardsPropagateMask()
5873 if (isa<LoadSDNode>(N->getOperand(0))) in BackwardsPropagateMask()
5884 SDValue MaskOp = N->getOperand(1); in BackwardsPropagateMask()
5900 SDValue Op0 = LogicN->getOperand(0); in BackwardsPropagateMask()
5901 SDValue Op1 = LogicN->getOperand(1); in BackwardsPropagateMask()
5926 DAG.ReplaceAllUsesWith(N, N->getOperand(0).getNode()); in BackwardsPropagateMask()
5940 SDValue N0 = N->getOperand(0); in unfoldExtremeBitClearingToShifts()
5941 SDValue N1 = N->getOperand(1); in unfoldExtremeBitClearingToShifts()
5961 if (!isAllOnesConstant(M->getOperand(0))) in unfoldExtremeBitClearingToShifts()
5963 Y = M->getOperand(1); in unfoldExtremeBitClearingToShifts()
5999 SDValue And0 = And->getOperand(0), And1 = And->getOperand(1); in combineShiftAnd1ToBitTest()
6001 And0 = And0.getOperand(0); in combineShiftAnd1ToBitTest()
6012 Src = Src.getOperand(0); in combineShiftAnd1ToBitTest()
6018 Src = Src.getOperand(0); in combineShiftAnd1ToBitTest()
6029 SDValue ShiftAmt = Src.getOperand(1); in combineShiftAnd1ToBitTest()
6035 Src = Src.getOperand(0); in combineShiftAnd1ToBitTest()
6042 Src = Src.getOperand(0); in combineShiftAnd1ToBitTest()
6065 SDValue N0 = N->getOperand(0); in foldAndToUsubsat()
6066 SDValue N1 = N->getOperand(1); in foldAndToUsubsat()
6078 N0.getOperand(0) != N1.getOperand(0)) in foldAndToUsubsat()
6082 ConstantSDNode *XorC = isConstOrConstSplat(N0.getOperand(1), true); in foldAndToUsubsat()
6083 ConstantSDNode *SraC = isConstOrConstSplat(N1.getOperand(1), true); in foldAndToUsubsat()
6092 return DAG.getNode(ISD::USUBSAT, DL, VT, N0.getOperand(0), SignMask); in foldAndToUsubsat()
6120 SDValue X1 = ShiftOp.getOperand(0); in foldLogicOfShifts()
6121 SDValue Y = ShiftOp.getOperand(1); in foldLogicOfShifts()
6123 if (LogicOp.getOperand(0).getOpcode() == ShiftOpcode && in foldLogicOfShifts()
6124 LogicOp.getOperand(0).getOperand(1) == Y) { in foldLogicOfShifts()
6125 X0 = LogicOp.getOperand(0).getOperand(0); in foldLogicOfShifts()
6126 Z = LogicOp.getOperand(1); in foldLogicOfShifts()
6127 } else if (LogicOp.getOperand(1).getOpcode() == ShiftOpcode && in foldLogicOfShifts()
6128 LogicOp.getOperand(1).getOperand(1) == Y) { in foldLogicOfShifts()
6129 X0 = LogicOp.getOperand(1).getOperand(0); in foldLogicOfShifts()
6130 Z = LogicOp.getOperand(0); in foldLogicOfShifts()
6143 SDValue N0 = N->getOperand(0); in visitAND()
6144 SDValue N1 = N->getOperand(1); in visitAND()
6229 ISD::matchBinaryPredicate(N0.getOperand(1), N1, MatchSubset)) in visitAND()
6233 SDValue N0Op0 = N0.getOperand(0); in visitAND()
6258 N0.getValueSizeInBits() == N0.getOperand(0).getScalarValueSizeInBits() && in visitAND()
6259 N0.getOperand(0).getOpcode() == ISD::LOAD && in visitAND()
6260 N0.getOperand(0).getResNo() == 0) || in visitAND()
6263 N0 : N0.getOperand(0) ); in visitAND()
6357 ISD::isExtOpcode(N0.getOperand(0).getOpcode())) { in visitAND()
6358 SDValue Ext = N0.getOperand(0); in visitAND()
6360 SDValue Extendee = Ext->getOperand(0); in visitAND()
6371 N0.getOperand(1)); in visitAND()
6433 if (isNullOrNullSplat(N0.getOperand(0))) { in visitAND()
6434 SDValue SubRHS = N0.getOperand(1); in visitAND()
6436 SubRHS.getOperand(0).getScalarValueSizeInBits() == 1) in visitAND()
6439 SubRHS.getOperand(0).getScalarValueSizeInBits() == 1) in visitAND()
6440 return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), VT, SubRHS.getOperand(0)); in visitAND()
6475 if (SDValue BSwap = MatchBSwapHWordLow(N0.getNode(), N0.getOperand(0), in visitAND()
6476 N0.getOperand(1), false)) in visitAND()
6501 LHS.getOperand(0).getValueType().getFixedSizeInBits())) in visitAND()
6509 return DAG.getNode(ISD::ZERO_EXTEND, SDLoc(N), VT, N0.getOperand(0)); in visitAND()
6533 if (N0.getOpcode() == ISD::AND && N0.getOperand(0).getOpcode() == ISD::SRL) in MatchBSwapHWordLow()
6535 if (N1.getOpcode() == ISD::AND && N1.getOperand(0).getOpcode() == ISD::SHL) in MatchBSwapHWordLow()
6540 ConstantSDNode *N01C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in MatchBSwapHWordLow()
6546 N0 = N0.getOperand(0); in MatchBSwapHWordLow()
6553 ConstantSDNode *N11C = dyn_cast<ConstantSDNode>(N1.getOperand(1)); in MatchBSwapHWordLow()
6556 N1 = N1.getOperand(0); in MatchBSwapHWordLow()
6567 ConstantSDNode *N01C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in MatchBSwapHWordLow()
6568 ConstantSDNode *N11C = dyn_cast<ConstantSDNode>(N1.getOperand(1)); in MatchBSwapHWordLow()
6575 SDValue N00 = N0->getOperand(0); in MatchBSwapHWordLow()
6579 ConstantSDNode *N001C = dyn_cast<ConstantSDNode>(N00.getOperand(1)); in MatchBSwapHWordLow()
6582 N00 = N00.getOperand(0); in MatchBSwapHWordLow()
6586 SDValue N10 = N1->getOperand(0); in MatchBSwapHWordLow()
6590 ConstantSDNode *N101C = dyn_cast<ConstantSDNode>(N10.getOperand(1)); in MatchBSwapHWordLow()
6596 N10 = N10.getOperand(0); in MatchBSwapHWordLow()
6649 SDValue N0 = N.getOperand(0); in isBSwapHWordElement()
6657 N1C = dyn_cast<ConstantSDNode>(N.getOperand(1)); in isBSwapHWordElement()
6659 N1C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in isBSwapHWordElement()
6688 ConstantSDNode *C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in isBSwapHWordElement()
6696 ConstantSDNode *C = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in isBSwapHWordElement()
6705 ConstantSDNode *C = dyn_cast<ConstantSDNode>(N.getOperand(1)); in isBSwapHWordElement()
6713 ConstantSDNode *C = dyn_cast<ConstantSDNode>(N.getOperand(1)); in isBSwapHWordElement()
6721 Parts[MaskByteOffset] = N0.getOperand(0).getNode(); in isBSwapHWordElement()
6728 return isBSwapHWordElement(N.getOperand(0), Parts) && in isBSwapHWordPair()
6729 isBSwapHWordElement(N.getOperand(1), Parts); in isBSwapHWordPair()
6731 if (N.getOpcode() == ISD::SRL && N.getOperand(0).getOpcode() == ISD::BSWAP) { in isBSwapHWordPair()
6732 ConstantSDNode *C = isConstOrConstSplat(N.getOperand(1)); in isBSwapHWordPair()
6735 Parts[0] = Parts[1] = N.getOperand(0).getOperand(0).getNode(); in isBSwapHWordPair()
6758 ConstantSDNode *Mask0 = isConstOrConstSplat(N0.getOperand(1)); in matchBSwapHWordOrAndAnd()
6759 ConstantSDNode *Mask1 = isConstOrConstSplat(N1.getOperand(1)); in matchBSwapHWordOrAndAnd()
6765 SDValue Shift0 = N0.getOperand(0); in matchBSwapHWordOrAndAnd()
6766 SDValue Shift1 = N1.getOperand(0); in matchBSwapHWordOrAndAnd()
6769 ConstantSDNode *ShiftAmt0 = isConstOrConstSplat(Shift0.getOperand(1)); in matchBSwapHWordOrAndAnd()
6770 ConstantSDNode *ShiftAmt1 = isConstOrConstSplat(Shift1.getOperand(1)); in matchBSwapHWordOrAndAnd()
6775 if (Shift0.getOperand(0) != Shift1.getOperand(0)) in matchBSwapHWordOrAndAnd()
6779 SDValue BSwap = DAG.getNode(ISD::BSWAP, DL, VT, Shift0.getOperand(0)); in matchBSwapHWordOrAndAnd()
6824 SDValue N00 = N0.getOperand(0); in MatchBSwapHWord()
6825 SDValue N01 = N0.getOperand(1); in MatchBSwapHWord()
6873 getAsNonOpaqueConstant(N0.getOperand(1))) { in visitORLike()
6875 getAsNonOpaqueConstant(N1.getOperand(1))) { in visitORLike()
6881 if (DAG.MaskedValueIsZero(N0.getOperand(0), RHSMask&~LHSMask) && in visitORLike()
6882 DAG.MaskedValueIsZero(N1.getOperand(0), LHSMask&~RHSMask)) { in visitORLike()
6884 N0.getOperand(0), N1.getOperand(0)); in visitORLike()
6895 N0.getOperand(0) == N1.getOperand(0) && in visitORLike()
6899 N0.getOperand(1), N1.getOperand(1)); in visitORLike()
6900 return DAG.getNode(ISD::AND, DL, VT, N0.getOperand(0), X); in visitORLike()
6911 SDValue N00 = N0.getOperand(0); in visitORCommutative()
6912 SDValue N01 = N0.getOperand(1); in visitORCommutative()
6931 return V->getOperand(0); in visitORCommutative()
6937 N0.getOperand(0) == N1.getOperand(0) && in visitORCommutative()
6938 peekThroughZext(N0.getOperand(2)) == peekThroughZext(N1.getOperand(1))) in visitORCommutative()
6943 N0.getOperand(1) == N1.getOperand(0) && in visitORCommutative()
6944 peekThroughZext(N0.getOperand(2)) == peekThroughZext(N1.getOperand(1))) in visitORCommutative()
6951 SDValue N0 = N->getOperand(0); in visitOR()
6952 SDValue N1 = N->getOperand(1); in visitOR()
6987 bool ZeroN00 = ISD::isBuildVectorAllZeros(N0.getOperand(0).getNode()); in visitOR()
6988 bool ZeroN01 = ISD::isBuildVectorAllZeros(N0.getOperand(1).getNode()); in visitOR()
6989 bool ZeroN10 = ISD::isBuildVectorAllZeros(N1.getOperand(0).getNode()); in visitOR()
6990 bool ZeroN11 = ISD::isBuildVectorAllZeros(N1.getOperand(1).getNode()); in visitOR()
7028 SDValue NewLHS = ZeroN00 ? N0.getOperand(1) : N0.getOperand(0); in visitOR()
7029 SDValue NewRHS = ZeroN10 ? N1.getOperand(1) : N1.getOperand(0); in visitOR()
7079 ISD::matchBinaryPredicate(N0.getOperand(1), N1, MatchIntersect, true)) { in visitOR()
7081 {N1, N0.getOperand(1)})) { in visitOR()
7082 SDValue IOR = DAG.getNode(ISD::OR, SDLoc(N0), VT, N0.getOperand(0), N1); in visitOR()
7120 DAG.isConstantIntBuildVectorOrConstantInt(Op.getOperand(1))) { in stripConstantMask()
7121 Mask = Op.getOperand(1); in stripConstantMask()
7122 return Op.getOperand(0); in stripConstantMask()
7172 SDValue OppShiftLHS = OppShift.getOperand(0); in extractShiftForRotate()
7176 ConstantSDNode *OppShiftCst = isConstOrConstSplat(OppShift.getOperand(1)); in extractShiftForRotate()
7182 ExtractFrom.getOperand(0) == ExtractFrom.getOperand(1) && in extractShiftForRotate()
7183 ExtractFrom.getOperand(0) == OppShiftLHS && in extractShiftForRotate()
7212 OppShiftLHS.getOperand(0) != ExtractFrom.getOperand(0) || in extractShiftForRotate()
7217 ConstantSDNode *OppLHSCst = isConstOrConstSplat(OppShiftLHS.getOperand(1)); in extractShiftForRotate()
7220 isConstOrConstSplat(ExtractFrom.getOperand(1)); in extractShiftForRotate()
7262 EVT ShiftVT = OppShift.getOperand(1).getValueType(); in extractShiftForRotate()
7336 ConstantSDNode *NegC = isConstOrConstSplat(Neg.getOperand(0)); in matchRotateSub()
7339 SDValue NegOp1 = Neg.getOperand(1); in matchRotateSub()
7369 (NegOp1.getOpcode() == ISD::TRUNCATE && Pos == NegOp1.getOperand(0))) in matchRotateSub()
7381 else if (Pos.getOpcode() == ISD::ADD && Pos.getOperand(0) == NegOp1) { in matchRotateSub()
7382 if (ConstantSDNode *PosC = isConstOrConstSplat(Pos.getOperand(1))) in matchRotateSub()
7456 ConstantSDNode *Cst = isConstOrConstSplat(Op.getOperand(1)); in MatchFunnelPosNeg()
7464 InnerPos == InnerNeg.getOperand(0) && in MatchFunnelPosNeg()
7466 return DAG.getNode(ISD::FSHL, DL, VT, N0, N1.getOperand(0), Pos); in MatchFunnelPosNeg()
7473 InnerNeg == InnerPos.getOperand(0) && in MatchFunnelPosNeg()
7475 return DAG.getNode(ISD::FSHR, DL, VT, N0.getOperand(0), N1, Neg); in MatchFunnelPosNeg()
7481 if (N0.getOpcode() == ISD::ADD && N0.getOperand(0) == N0.getOperand(1) && in MatchFunnelPosNeg()
7483 InnerNeg == InnerPos.getOperand(0) && in MatchFunnelPosNeg()
7485 return DAG.getNode(ISD::FSHR, DL, VT, N0.getOperand(0), N1, Neg); in MatchFunnelPosNeg()
7521 LHS.getOperand(0).getValueType() == RHS.getOperand(0).getValueType()) { in MatchRotate()
7523 if (SDValue Rot = MatchRotate(LHS.getOperand(0), RHS.getOperand(0), DL)) { in MatchRotate()
7581 SDValue LHSShiftArg = LHSShift.getOperand(0); in MatchRotate()
7582 SDValue LHSShiftAmt = LHSShift.getOperand(1); in MatchRotate()
7583 SDValue RHSShiftArg = RHSShift.getOperand(0); in MatchRotate()
7584 SDValue RHSShiftAmt = RHSShift.getOperand(1); in MatchRotate()
7615 bool IsRotate = LHSShift.getOperand(0) == RHSShift.getOperand(0); in MatchRotate()
7625 if (CommonOp == Or.getOperand(0)) { in MatchRotate()
7627 Y = Or.getOperand(1); in MatchRotate()
7630 if (CommonOp == Or.getOperand(1)) { in MatchRotate()
7632 Y = Or.getOperand(0); in MatchRotate()
7700 LExtOp0 = LHSShiftAmt.getOperand(0); in MatchRotate()
7701 RExtOp0 = RHSShiftAmt.getOperand(0); in MatchRotate()
7797 auto LHS = calculateByteProvider(Op->getOperand(0), Index, Depth + 1); in calculateByteProvider()
7800 auto RHS = calculateByteProvider(Op->getOperand(1), Index, Depth + 1); in calculateByteProvider()
7811 auto ShiftOp = dyn_cast<ConstantSDNode>(Op->getOperand(1)); in calculateByteProvider()
7822 : calculateByteProvider(Op->getOperand(0), Index - ByteShift, in calculateByteProvider()
7828 SDValue NarrowOp = Op->getOperand(0); in calculateByteProvider()
7841 return calculateByteProvider(Op->getOperand(0), ByteWidth - Index - 1, in calculateByteProvider()
7902 return stripTruncAndExt(Value.getOperand(0)); in stripTruncAndExt()
7987 SDValue WideVal = Trunc.getOperand(0); in mergeTruncStores()
7989 isa<ConstantSDNode>(WideVal.getOperand(1))) { in mergeTruncStores()
8001 WideVal = WideVal.getOperand(0); in mergeTruncStores()
8323 if (isAllOnesOrAllOnesSplat(N->getOperand(1))) in unfoldMaskedMerge()
8334 SDValue Xor = And.getOperand(XorIdx); in unfoldMaskedMerge()
8337 SDValue Xor0 = Xor.getOperand(0); in unfoldMaskedMerge()
8338 SDValue Xor1 = Xor.getOperand(1); in unfoldMaskedMerge()
8348 M = And.getOperand(XorIdx ? 0 : 1); in unfoldMaskedMerge()
8352 SDValue N0 = N->getOperand(0); in unfoldMaskedMerge()
8353 SDValue N1 = N->getOperand(1); in unfoldMaskedMerge()
8387 SDValue NotM = M.getOperand(0); in unfoldMaskedMerge()
8403 SDValue N0 = N->getOperand(0); in visitXOR()
8404 SDValue N1 = N->getOperand(1); in visitXOR()
8470 return DAG.getSelectCC(SDLoc(N0), LHS, RHS, N0.getOperand(2), in visitXOR()
8471 N0.getOperand(3), NotCC); in visitXOR()
8479 N0.getOperand(0), N0Opcode == ISD::STRICT_FSETCCS); in visitXOR()
8493 isSetCCEquivalent(N0.getOperand(0), LHS, RHS, CC)){ in visitXOR()
8494 SDValue V = N0.getOperand(0); in visitXOR()
8505 SDValue N00 = N0.getOperand(0), N01 = N0.getOperand(1); in visitXOR()
8517 SDValue N00 = N0.getOperand(0), N01 = N0.getOperand(1); in visitXOR()
8531 isNullConstant(N0.getOperand(0))) { in visitXOR()
8532 return DAG.getNode(ISD::ADD, DL, VT, N0.getOperand(1), in visitXOR()
8538 isAllOnesOrAllOnesSplat(N0.getOperand(1))) { in visitXOR()
8540 N0.getOperand(0)); in visitXOR()
8544 if (N0Opcode == ISD::AND && N0.hasOneUse() && N0->getOperand(1) == N1) { in visitXOR()
8545 SDValue X = N0.getOperand(0); in visitXOR()
8556 SDValue A0 = A.getOperand(0), A1 = A.getOperand(1); in visitXOR()
8557 SDValue S0 = S.getOperand(0); in visitXOR()
8559 if (ConstantSDNode *C = isConstOrConstSplat(S.getOperand(1))) in visitXOR()
8588 isAllOnesConstant(N1) && isOneConstant(N0.getOperand(0))) { in visitXOR()
8590 N0.getOperand(1)); in visitXOR()
8623 SDValue LogicOp = Shift->getOperand(0); in combineShiftOfShiftedLogic()
8634 SDValue C1 = Shift->getOperand(1); in combineShiftOfShiftedLogic()
8643 ConstantSDNode *ShiftCNode = isConstOrConstSplat(V.getOperand(1)); in combineShiftOfShiftedLogic()
8648 ShiftOp = V.getOperand(0); in combineShiftOfShiftedLogic()
8666 if (matchFirstShift(LogicOp.getOperand(0), X, C0Val)) in combineShiftOfShiftedLogic()
8667 Y = LogicOp.getOperand(1); in combineShiftOfShiftedLogic()
8668 else if (matchFirstShift(LogicOp.getOperand(1), X, C0Val)) in combineShiftOfShiftedLogic()
8669 Y = LogicOp.getOperand(0); in combineShiftOfShiftedLogic()
8676 EVT ShiftAmtVT = Shift->getOperand(1).getValueType(); in combineShiftOfShiftedLogic()
8690 assert(isConstOrConstSplat(N->getOperand(1)) && "Expected constant operand"); in visitShiftByConstant()
8693 if (isBitwiseNot(N->getOperand(0))) in visitShiftByConstant()
8697 SDValue LHS = N->getOperand(0); in visitShiftByConstant()
8727 ConstantSDNode *BinOpCst = getAsNonOpaqueConstant(LHS.getOperand(1)); in visitShiftByConstant()
8734 SDValue BinOpLHSVal = LHS.getOperand(0); in visitShiftByConstant()
8738 isa<ConstantSDNode>(BinOpLHSVal.getOperand(1)); in visitShiftByConstant()
8751 SDValue NewRHS = DAG.getNode(N->getOpcode(), DL, VT, LHS.getOperand(1), in visitShiftByConstant()
8752 N->getOperand(1)); in visitShiftByConstant()
8755 SDValue NewShift = DAG.getNode(N->getOpcode(), DL, VT, LHS.getOperand(0), in visitShiftByConstant()
8756 N->getOperand(1)); in visitShiftByConstant()
8762 assert(N->getOperand(0).getOpcode() == ISD::AND); in distributeTruncateThroughAnd()
8766 if (N->hasOneUse() && N->getOperand(0).hasOneUse() && in distributeTruncateThroughAnd()
8768 SDValue N01 = N->getOperand(0).getOperand(1); in distributeTruncateThroughAnd()
8771 SDValue N00 = N->getOperand(0).getOperand(0); in distributeTruncateThroughAnd()
8785 SDValue N0 = N->getOperand(0); in visitRotate()
8786 SDValue N1 = N->getOperand(1); in visitRotate()
8827 N1.getOperand(0).getOpcode() == ISD::AND) { in visitRotate()
8838 SDNode *C2 = DAG.isConstantIntBuildVectorOrConstantInt(N0.getOperand(1)); in visitRotate()
8847 {N0.getOperand(1), BitsizeC}); in visitRotate()
8853 return DAG.getNode(N->getOpcode(), dl, VT, N0->getOperand(0), in visitRotate()
8862 SDValue N0 = N->getOperand(0); in visitSHL()
8863 SDValue N1 = N->getOperand(1); in visitSHL()
8885 SDValue N00 = N0->getOperand(0); in visitSHL()
8886 SDValue N01 = N0->getOperand(1); in visitSHL()
8890 TLI.getBooleanContents(N00.getOperand(0).getValueType()) == in visitSHL()
8909 N1.getOperand(0).getOpcode() == ISD::AND) { in visitSHL()
8926 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchOutOfRange)) in visitSHL()
8936 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchInRange)) { in visitSHL()
8938 SDValue Sum = DAG.getNode(ISD::ADD, DL, ShiftVT, N1, N0.getOperand(1)); in visitSHL()
8939 return DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0), Sum); in visitSHL()
8951 N0.getOperand(0).getOpcode() == ISD::SHL) { in visitSHL()
8952 SDValue N0Op0 = N0.getOperand(0); in visitSHL()
8953 SDValue InnerShiftAmt = N0Op0.getOperand(1); in visitSHL()
8982 SDValue Ext = DAG.getNode(N0.getOpcode(), DL, VT, N0Op0.getOperand(0)); in visitSHL()
8993 N0.getOperand(0).getOpcode() == ISD::SRL) { in visitSHL()
8994 SDValue N0Op0 = N0.getOperand(0); in visitSHL()
8995 SDValue InnerShiftAmt = N0Op0.getOperand(1); in visitSHL()
9007 EVT InnerShiftAmtVT = N0Op0.getOperand(1).getValueType(); in visitSHL()
9029 if (ISD::matchBinaryPredicate(N0.getOperand(1), N1, MatchShiftAmount, in visitSHL()
9032 SDValue N01 = DAG.getZExtOrTrunc(N0.getOperand(1), DL, ShiftVT); in visitSHL()
9034 return DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0), Diff); in visitSHL()
9036 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchShiftAmount, in visitSHL()
9039 SDValue N01 = DAG.getZExtOrTrunc(N0.getOperand(1), DL, ShiftVT); in visitSHL()
9041 return DAG.getNode(N0.getOpcode(), DL, VT, N0.getOperand(0), Diff); in visitSHL()
9050 (N0.getOperand(1) == N1 || N0.hasOneUse()) && in visitSHL()
9052 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchShiftAmount, in visitSHL()
9055 SDValue N01 = DAG.getZExtOrTrunc(N0.getOperand(1), DL, ShiftVT); in visitSHL()
9060 SDValue Shift = DAG.getNode(ISD::SRL, DL, VT, N0.getOperand(0), Diff); in visitSHL()
9063 if (ISD::matchBinaryPredicate(N0.getOperand(1), N1, MatchShiftAmount, in visitSHL()
9066 SDValue N01 = DAG.getZExtOrTrunc(N0.getOperand(1), DL, ShiftVT); in visitSHL()
9070 SDValue Shift = DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0), Diff); in visitSHL()
9077 if (N0.getOpcode() == ISD::SRA && N1 == N0.getOperand(1) && in visitSHL()
9082 return DAG.getNode(ISD::AND, DL, VT, N0.getOperand(0), HiBitsMask); in visitSHL()
9092 isConstantOrConstantVector(N0.getOperand(1), /* No Opaques */ true) && in visitSHL()
9094 SDValue Shl0 = DAG.getNode(ISD::SHL, SDLoc(N0), VT, N0.getOperand(0), N1); in visitSHL()
9095 SDValue Shl1 = DAG.getNode(ISD::SHL, SDLoc(N1), VT, N0.getOperand(1), N1); in visitSHL()
9103 SDValue N01 = N0.getOperand(1); in visitSHL()
9106 return DAG.getNode(ISD::MUL, SDLoc(N), VT, N0.getOperand(0), Shl); in visitSHL()
9116 if (ConstantSDNode *NC1 = isConstOrConstSplat(N->getOperand(1))) { in visitSHL()
9147 ConstantSDNode *ShiftAmtSrc = isConstOrConstSplat(N->getOperand(1)); in combineShiftToMULH()
9154 SDValue ShiftOperand = N->getOperand(0); in combineShiftToMULH()
9159 SDValue LeftOp = ShiftOperand.getOperand(0); in combineShiftToMULH()
9160 SDValue RightOp = ShiftOperand.getOperand(1); in combineShiftToMULH()
9168 EVT NarrowVT = LeftOp.getOperand(0).getValueType(); in combineShiftToMULH()
9185 if (NarrowVT != RightOp.getOperand(0).getValueType()) in combineShiftToMULH()
9187 MulhRightOp = RightOp.getOperand(0); in combineShiftToMULH()
9216 DAG.getNode(MulhOpcode, DL, NarrowVT, LeftOp.getOperand(0), MulhRightOp); in combineShiftToMULH()
9222 SDValue N0 = N->getOperand(0); in visitSRA()
9223 SDValue N1 = N->getOperand(1); in visitSRA()
9251 if (N1C && N0.getOpcode() == ISD::SHL && N1 == N0.getOperand(1)) { in visitSRA()
9261 N0.getOperand(0), DAG.getValueType(ExtVT)); in visitSRA()
9264 if (DAG.ComputeNumSignBits(N0.getOperand(0)) > N1C->getZExtValue()) in visitSRA()
9265 return N0.getOperand(0); in visitSRA()
9286 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), SumOfShifts)) { in visitSRA()
9297 return DAG.getNode(ISD::SRA, DL, VT, N0.getOperand(0), ShiftValue); in visitSRA()
9308 const ConstantSDNode *N01C = isConstOrConstSplat(N0.getOperand(1)); in visitSRA()
9330 getShiftAmountTy(N0.getOperand(0).getValueType())); in visitSRA()
9332 N0.getOperand(0), Amt); in visitSRA()
9349 SDValue Shl = N0.getOperand(IsAdd ? 0 : 1); in visitSRA()
9350 if (Shl.getOpcode() == ISD::SHL && Shl.getOperand(1) == N1 && in visitSRA()
9354 isConstOrConstSplat(N0.getOperand(IsAdd ? 1 : 0))) { in visitSRA()
9370 SDValue Trunc = DAG.getZExtOrTrunc(Shl.getOperand(0), DL, TruncVT); in visitSRA()
9388 N1.getOperand(0).getOpcode() == ISD::AND) { in visitSRA()
9398 (N0.getOperand(0).getOpcode() == ISD::SRL || in visitSRA()
9399 N0.getOperand(0).getOpcode() == ISD::SRA) && in visitSRA()
9400 N0.getOperand(0).hasOneUse() && in visitSRA()
9401 N0.getOperand(0).getOperand(1).hasOneUse() && N1C) { in visitSRA()
9402 SDValue N0Op0 = N0.getOperand(0); in visitSRA()
9403 if (ConstantSDNode *LargeShift = isConstOrConstSplat(N0Op0.getOperand(1))) { in visitSRA()
9413 DAG.getNode(ISD::SRA, DL, LargeVT, N0Op0.getOperand(0), Amt); in visitSRA()
9444 SDValue N0 = N->getOperand(0); in visitSRL()
9445 SDValue N1 = N->getOperand(1); in visitSRL()
9480 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchOutOfRange)) in visitSRL()
9490 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchInRange)) { in visitSRL()
9492 SDValue Sum = DAG.getNode(ISD::ADD, DL, ShiftVT, N1, N0.getOperand(1)); in visitSRL()
9493 return DAG.getNode(ISD::SRL, DL, VT, N0.getOperand(0), Sum); in visitSRL()
9498 N0.getOperand(0).getOpcode() == ISD::SRL) { in visitSRL()
9499 SDValue InnerShift = N0.getOperand(0); in visitSRL()
9501 if (auto *N001C = isConstOrConstSplat(InnerShift.getOperand(1))) { in visitSRL()
9505 EVT ShiftAmtVT = InnerShift.getOperand(1).getValueType(); in visitSRL()
9515 InnerShift.getOperand(0), NewShiftAmt); in visitSRL()
9525 InnerShift.getOperand(0), NewShiftAmt); in visitSRL()
9538 (N0.getOperand(1) == N1 || N0->hasOneUse()) && in visitSRL()
9547 if (ISD::matchBinaryPredicate(N1, N0.getOperand(1), MatchShiftAmount, in visitSRL()
9551 SDValue N01 = DAG.getZExtOrTrunc(N0.getOperand(1), DL, ShiftVT); in visitSRL()
9556 SDValue Shift = DAG.getNode(ISD::SHL, DL, VT, N0.getOperand(0), Diff); in visitSRL()
9559 if (ISD::matchBinaryPredicate(N0.getOperand(1), N1, MatchShiftAmount, in visitSRL()
9563 SDValue N01 = DAG.getZExtOrTrunc(N0.getOperand(1), DL, ShiftVT); in visitSRL()
9567 SDValue Shift = DAG.getNode(ISD::SRL, DL, VT, N0.getOperand(0), Diff); in visitSRL()
9576 EVT SmallVT = N0.getOperand(0).getValueType(); in visitSRL()
9585 N0.getOperand(0), in visitSRL()
9601 return DAG.getNode(ISD::SRL, SDLoc(N), VT, N0.getOperand(0), N1); in visitSRL()
9607 KnownBits Known = DAG.computeKnownBits(N0.getOperand(0)); in visitSRL()
9625 SDValue Op = N0.getOperand(0); in visitSRL()
9643 N1.getOperand(0).getOpcode() == ISD::AND) { in visitSRL()
9700 SDValue N0 = N->getOperand(0); in visitFunnelShift()
9701 SDValue N1 = N->getOperand(1); in visitFunnelShift()
9702 SDValue N2 = N->getOperand(2); in visitFunnelShift()
9813 SDValue N0 = N->getOperand(0); in visitSHLSAT()
9814 SDValue N1 = N->getOperand(1); in visitSHLSAT()
9848 SDValue AbsOp1 = N->getOperand(0); in combineABSToABD()
9854 Op0 = AbsOp1.getOperand(0); in combineABSToABD()
9855 Op1 = AbsOp1.getOperand(1); in combineABSToABD()
9864 EVT VT1 = Op0.getOperand(0).getValueType(); in combineABSToABD()
9865 EVT VT2 = Op1.getOperand(0).getValueType(); in combineABSToABD()
9872 Op0 = Op0.getOperand(0); in combineABSToABD()
9873 Op1 = Op1.getOperand(0); in combineABSToABD()
9887 SDValue N0 = N->getOperand(0); in visitABS()
9907 SDValue N0 = N->getOperand(0); in visitBSWAP()
9916 return N0.getOperand(0); in visitBSWAP()
9923 SDValue BSwap = DAG.getNode(ISD::BSWAP, DL, VT, N0.getOperand(0)); in visitBSWAP()
9931 auto *ShAmt = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in visitBSWAP()
9938 SDValue Res = N0.getOperand(0); in visitBSWAP()
9954 auto *ShAmt = dyn_cast<ConstantSDNode>(N0.getOperand(1)); in visitBSWAP()
9957 SDValue NewSwap = DAG.getNode(ISD::BSWAP, DL, VT, N0.getOperand(0)); in visitBSWAP()
9959 return DAG.getNode(InverseShift, DL, VT, NewSwap, N0.getOperand(1)); in visitBSWAP()
9967 SDValue N0 = N->getOperand(0); in visitBITREVERSE()
9975 return N0.getOperand(0); in visitBITREVERSE()
9980 SDValue N0 = N->getOperand(0); in visitCTLZ()
9997 SDValue N0 = N->getOperand(0); in visitCTLZ_ZERO_UNDEF()
10007 SDValue N0 = N->getOperand(0); in visitCTTZ()
10024 SDValue N0 = N->getOperand(0); in visitCTTZ_ZERO_UNDEF()
10034 SDValue N0 = N->getOperand(0); in visitCTPOP()
10107 SDValue Cond = N->getOperand(0); in foldSelectOfConstantsUsingSra()
10108 SDValue C1 = N->getOperand(1); in foldSelectOfConstantsUsingSra()
10109 SDValue C2 = N->getOperand(2); in foldSelectOfConstantsUsingSra()
10115 VT != Cond.getOperand(0).getValueType()) in foldSelectOfConstantsUsingSra()
10120 SDValue X = Cond.getOperand(0); in foldSelectOfConstantsUsingSra()
10121 SDValue CondC = Cond.getOperand(1); in foldSelectOfConstantsUsingSra()
10122 ISD::CondCode CC = cast<CondCodeSDNode>(Cond.getOperand(2))->get(); in foldSelectOfConstantsUsingSra()
10142 SDValue Cond = N->getOperand(0); in foldSelectOfConstants()
10143 SDValue N1 = N->getOperand(1); in foldSelectOfConstants()
10144 SDValue N2 = N->getOperand(2); in foldSelectOfConstants()
10253 SDValue Cond = N->getOperand(0); in foldBoolSelectToLogic()
10254 SDValue T = N->getOperand(1), F = N->getOperand(2); in foldBoolSelectToLogic()
10285 SDValue N0 = N->getOperand(0); in foldVSelectToSignBitSplatMask()
10286 SDValue N1 = N->getOperand(1); in foldVSelectToSignBitSplatMask()
10287 SDValue N2 = N->getOperand(2); in foldVSelectToSignBitSplatMask()
10292 SDValue Cond0 = N0.getOperand(0); in foldVSelectToSignBitSplatMask()
10293 SDValue Cond1 = N0.getOperand(1); in foldVSelectToSignBitSplatMask()
10294 ISD::CondCode CC = cast<CondCodeSDNode>(N0.getOperand(2))->get(); in foldVSelectToSignBitSplatMask()
10343 SDValue N0 = N->getOperand(0); in visitSELECT()
10344 SDValue N1 = N->getOperand(1); in visitSELECT()
10345 SDValue N2 = N->getOperand(2); in visitSELECT()
10378 SDValue Cond0 = N0->getOperand(0); in visitSELECT()
10379 SDValue Cond1 = N0->getOperand(1); in visitSELECT()
10391 SDValue Cond0 = N0->getOperand(0); in visitSELECT()
10392 SDValue Cond1 = N0->getOperand(1); in visitSELECT()
10405 SDValue N1_0 = N1->getOperand(0); in visitSELECT()
10406 SDValue N1_1 = N1->getOperand(1); in visitSELECT()
10407 SDValue N1_2 = N1->getOperand(2); in visitSELECT()
10424 SDValue N2_0 = N2->getOperand(0); in visitSELECT()
10425 SDValue N2_1 = N2->getOperand(1); in visitSELECT()
10426 SDValue N2_2 = N2->getOperand(2); in visitSELECT()
10451 SDValue Cond0 = N0.getOperand(0), Cond1 = N0.getOperand(1); in visitSELECT()
10452 ISD::CondCode CC = cast<CondCodeSDNode>(N0.getOperand(2))->get(); in visitSELECT()
10470 N2.getOpcode() == ISD::ADD && Cond0 == N2.getOperand(0)) { in visitSELECT()
10471 auto *C = dyn_cast<ConstantSDNode>(N2.getOperand(1)); in visitSELECT()
10487 SDValue UAO = DAG.getNode(ISD::UADDO, DL, VTs, Cond0, N2.getOperand(1)); in visitSELECT()
10499 N2, N0.getOperand(2)); in visitSELECT()
10519 SDValue Cond = N->getOperand(0); in ConvertSelectToConcatVector()
10520 SDValue LHS = N->getOperand(1); in ConvertSelectToConcatVector()
10521 SDValue RHS = N->getOperand(2); in ConvertSelectToConcatVector()
10540 if (Cond->getOperand(i)->isUndef()) in ConvertSelectToConcatVector()
10544 BottomHalf = cast<ConstantSDNode>(Cond.getOperand(i)); in ConvertSelectToConcatVector()
10545 else if (Cond->getOperand(i).getNode() != BottomHalf) in ConvertSelectToConcatVector()
10552 if (Cond->getOperand(i)->isUndef()) in ConvertSelectToConcatVector()
10556 TopHalf = cast<ConstantSDNode>(Cond.getOperand(i)); in ConvertSelectToConcatVector()
10557 else if (Cond->getOperand(i).getNode() != TopHalf) in ConvertSelectToConcatVector()
10566 BottomHalf->isZero() ? RHS->getOperand(0) : LHS->getOperand(0), in ConvertSelectToConcatVector()
10567 TopHalf->isZero() ? RHS->getOperand(1) : LHS->getOperand(1)); in ConvertSelectToConcatVector()
10580 SDValue LHS = Index.getOperand(0); in refineUniformBase()
10586 Index = Index.getOperand(1); in refineUniformBase()
10597 SDValue Op = Index.getOperand(0); in refineIndexType()
10612 SDValue Op = Index.getOperand(0); in refineIndexType()
10705 TLI.canCombineTruncStore(Value.getOperand(0).getValueType(), in visitMSTORE()
10708 Value.getOperand(0).getValueType()); in visitMSTORE()
10709 return DAG.getMaskedStore(Chain, SDLoc(N), Value.getOperand(0), Ptr, in visitMSTORE()
10780 SDValue Cond = N->getOperand(0); in foldVSelectOfConstants()
10781 SDValue N1 = N->getOperand(1); in foldVSelectOfConstants()
10782 SDValue N2 = N->getOperand(2); in foldVSelectOfConstants()
10797 SDValue N1Elt = N1.getOperand(i); in foldVSelectOfConstants()
10798 SDValue N2Elt = N2.getOperand(i); in foldVSelectOfConstants()
10843 SDValue N0 = N->getOperand(0); in visitVSELECT()
10844 SDValue N1 = N->getOperand(1); in visitVSELECT()
10845 SDValue N2 = N->getOperand(2); in visitVSELECT()
10865 SDValue LHS = N0.getOperand(0), RHS = N0.getOperand(1); in visitVSELECT()
10866 ISD::CondCode CC = cast<CondCodeSDNode>(N0.getOperand(2))->get(); in visitVSELECT()
10872 N1 == LHS && N2.getOpcode() == ISD::SUB && N1 == N2.getOperand(1)) in visitVSELECT()
10873 isAbs = ISD::isBuildVectorAllZeros(N2.getOperand(0).getNode()); in visitVSELECT()
10875 N2 == LHS && N1.getOpcode() == ISD::SUB && N2 == N1.getOperand(1)) in visitVSELECT()
10876 isAbs = ISD::isBuildVectorAllZeros(N1.getOperand(0).getNode()); in visitVSELECT()
10953 SDValue OpLHS = Other.getOperand(0), OpRHS = Other.getOperand(1); in visitVSELECT()
11003 Other.getOperand(0).getOpcode() == ISD::SUB && in visitVSELECT()
11005 SDValue OpLHS = Other.getOperand(0).getOperand(0); in visitVSELECT()
11006 SDValue OpRHS = Other.getOperand(0).getOperand(1); in visitVSELECT()
11015 SDValue OpLHS = Other.getOperand(0), OpRHS = Other.getOperand(1); in visitVSELECT()
11101 SDValue N0 = N->getOperand(0); in visitSELECT_CC()
11102 SDValue N1 = N->getOperand(1); in visitSELECT_CC()
11103 SDValue N2 = N->getOperand(2); in visitSELECT_CC()
11104 SDValue N3 = N->getOperand(3); in visitSELECT_CC()
11105 SDValue N4 = N->getOperand(4); in visitSELECT_CC()
11130 ISD::SELECT_CC, SDLoc(N), N2.getValueType(), SCC.getOperand(0), in visitSELECT_CC()
11131 SCC.getOperand(1), N2, N3, SCC.getOperand(2)); in visitSELECT_CC()
11152 ISD::CondCode Cond = cast<CondCodeSDNode>(N->getOperand(2))->get(); in visitSETCC()
11170 SDValue N0 = N->getOperand(0), N1 = N->getOperand(1); in visitSETCC()
11190 N0 = N0->getOperand(0); in visitSETCC()
11197 N1 = N1->getOperand(0); in visitSETCC()
11206 SDValue Combined = SimplifySetCC(VT, N->getOperand(0), N->getOperand(1), Cond, in visitSETCC()
11229 SDValue LHS = N->getOperand(0); in visitSETCCCARRY()
11230 SDValue RHS = N->getOperand(1); in visitSETCCCARRY()
11231 SDValue Carry = N->getOperand(2); in visitSETCCCARRY()
11232 SDValue Cond = N->getOperand(3); in visitSETCCCARRY()
11278 SDValue N0 = N->getOperand(0); in tryToFoldExtendSelectLoad()
11290 SDValue Op1 = N0->getOperand(1); in tryToFoldExtendSelectLoad()
11291 SDValue Op2 = N0->getOperand(2); in tryToFoldExtendSelectLoad()
11309 return DAG.getSelect(DL, VT, N0->getOperand(0), Ext1, Ext2); in tryToFoldExtendSelectLoad()
11321 SDValue N0 = N->getOperand(0); in tryToFoldExtendOfConstant()
11340 SDValue Op1 = N0->getOperand(1); in tryToFoldExtendOfConstant()
11341 SDValue Op2 = N0->getOperand(2); in tryToFoldExtendOfConstant()
11356 return DAG.getSelect(DL, VT, N0->getOperand(0), in tryToFoldExtendOfConstant()
11382 SDValue Op = N0.getOperand(i); in tryToFoldExtendOfConstant()
11420 ISD::CondCode CC = cast<CondCodeSDNode>(User->getOperand(2))->get(); in ExtendUsesToFormExtLoad()
11426 SDValue UseOp = User->getOperand(i); in ExtendUsesToFormExtLoad()
11473 SDValue SOp = SetCC->getOperand(j); in ExtendSetCCUses()
11480 Ops.push_back(SetCC->getOperand(2)); in ExtendSetCCUses()
11487 SDValue N0 = N->getOperand(0); in CombineExtLoad()
11589 EVT OrigVT = N->getOperand(0).getValueType(); in CombineZExtLogicopShiftLoad()
11594 SDValue N0 = N->getOperand(0); in CombineZExtLogicopShiftLoad()
11597 N0.getOperand(1).getOpcode() != ISD::Constant || in CombineZExtLogicopShiftLoad()
11602 SDValue N1 = N0->getOperand(0); in CombineZExtLogicopShiftLoad()
11604 N1.getOperand(1).getOpcode() != ISD::Constant || in CombineZExtLogicopShiftLoad()
11609 if (!isa<LoadSDNode>(N1.getOperand(0))) in CombineZExtLogicopShiftLoad()
11611 LoadSDNode *Load = cast<LoadSDNode>(N1.getOperand(0)); in CombineZExtLogicopShiftLoad()
11627 if (!ExtendUsesToFormExtLoad(VT, N1.getNode(), N1.getOperand(0), in CombineZExtLogicopShiftLoad()
11638 N1.getOperand(1)); in CombineZExtLogicopShiftLoad()
11645 ExtendSetCCUses(SetCCs, N1.getOperand(0), ExtLoad, ISD::ZERO_EXTEND); in CombineZExtLogicopShiftLoad()
11679 SDValue VSel = Cast->getOperand(0); in matchVSelectOpSizesWithSetCC()
11681 VSel.getOperand(0).getOpcode() != ISD::SETCC) in matchVSelectOpSizesWithSetCC()
11685 SDValue SetCC = VSel.getOperand(0); in matchVSelectOpSizesWithSetCC()
11686 EVT SetCCVT = getSetCCResultType(SetCC.getOperand(0).getValueType()); in matchVSelectOpSizesWithSetCC()
11691 SDValue A = VSel.getOperand(1); in matchVSelectOpSizesWithSetCC()
11692 SDValue B = VSel.getOperand(2); in matchVSelectOpSizesWithSetCC()
11697 CastA = DAG.getNode(CastOpcode, DL, VT, A, Cast->getOperand(1)); in matchVSelectOpSizesWithSetCC()
11698 CastB = DAG.getNode(CastOpcode, DL, VT, B, Cast->getOperand(1)); in matchVSelectOpSizesWithSetCC()
11815 SDValue SetCC = N->getOperand(0); in foldExtendedSignBitTest()
11820 SDValue X = SetCC.getOperand(0); in foldExtendedSignBitTest()
11821 SDValue Ones = SetCC.getOperand(1); in foldExtendedSignBitTest()
11822 ISD::CondCode CC = cast<CondCodeSDNode>(SetCC.getOperand(2))->get(); in foldExtendedSignBitTest()
11847 SDValue N0 = N->getOperand(0); in foldSextSetcc()
11851 SDValue N00 = N0.getOperand(0); in foldSextSetcc()
11852 SDValue N01 = N0.getOperand(1); in foldSextSetcc()
11853 ISD::CondCode CC = cast<CondCodeSDNode>(N0.getOperand(2))->get(); in foldSextSetcc()
11972 SDValue N0 = N->getOperand(0); in visitSIGN_EXTEND()
11986 return DAG.getNode(ISD::SIGN_EXTEND, DL, VT, N0.getOperand(0)); in visitSIGN_EXTEND()
11992 SDNode *oye = N0.getOperand(0).getNode(); in visitSIGN_EXTEND()
12003 SDValue Op = N0.getOperand(0); in visitSIGN_EXTEND()
12063 isa<LoadSDNode>(N0.getOperand(0)) && in visitSIGN_EXTEND()
12064 N0.getOperand(1).getOpcode() == ISD::Constant && in visitSIGN_EXTEND()
12066 LoadSDNode *LN00 = cast<LoadSDNode>(N0.getOperand(0)); in visitSIGN_EXTEND()
12071 bool DoXform = ExtendUsesToFormExtLoad(VT, N0.getNode(), N0.getOperand(0), in visitSIGN_EXTEND()
12081 ExtendSetCCUses(SetCCs, N0.getOperand(0), ExtLoad, ISD::SIGN_EXTEND); in visitSIGN_EXTEND()
12120 isNullOrNullSplat(N0.getOperand(0)) && in visitSIGN_EXTEND()
12121 N0.getOperand(1).getOpcode() == ISD::ZERO_EXTEND && in visitSIGN_EXTEND()
12123 SDValue Zext = DAG.getZExtOrTrunc(N0.getOperand(1).getOperand(0), DL, VT); in visitSIGN_EXTEND()
12129 isAllOnesOrAllOnesSplat(N0.getOperand(1)) && in visitSIGN_EXTEND()
12130 N0.getOperand(0).getOpcode() == ISD::ZERO_EXTEND && in visitSIGN_EXTEND()
12132 SDValue Zext = DAG.getZExtOrTrunc(N0.getOperand(0).getOperand(0), DL, VT); in visitSIGN_EXTEND()
12155 SDValue Zext = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, N0.getOperand(0)); in visitSIGN_EXTEND()
12172 Op = N->getOperand(0); in isTruncateOf()
12179 cast<CondCodeSDNode>(N.getOperand(2))->get() != ISD::SETNE) in isTruncateOf()
12182 SDValue Op0 = N->getOperand(0); in isTruncateOf()
12183 SDValue Op1 = N->getOperand(1); in isTruncateOf()
12205 SDValue CtPop = Extend->getOperand(0); in widenCtPop()
12217 SDValue NewZext = DAG.getZExtOrTrunc(CtPop.getOperand(0), DL, VT); in widenCtPop()
12222 SDValue N0 = N->getOperand(0); in visitZERO_EXTEND()
12236 N0.getOperand(0)); in visitZERO_EXTEND()
12260 SDNode *oye = N0.getOperand(0).getNode(); in visitZERO_EXTEND()
12269 EVT SrcVT = N0.getOperand(0).getValueType(); in visitZERO_EXTEND()
12277 SDValue Op = N0.getOperand(0); in visitZERO_EXTEND()
12288 SDValue Op = DAG.getAnyExtOrTrunc(N0.getOperand(0), SDLoc(N), VT); in visitZERO_EXTEND()
12301 N0.getOperand(0).getOpcode() == ISD::TRUNCATE && in visitZERO_EXTEND()
12302 N0.getOperand(1).getOpcode() == ISD::Constant && in visitZERO_EXTEND()
12303 (!TLI.isTruncateFree(N0.getOperand(0).getOperand(0).getValueType(), in visitZERO_EXTEND()
12306 SDValue X = N0.getOperand(0).getOperand(0); in visitZERO_EXTEND()
12336 isa<LoadSDNode>(N0.getOperand(0)) && in visitZERO_EXTEND()
12337 N0.getOperand(1).getOpcode() == ISD::Constant && in visitZERO_EXTEND()
12339 LoadSDNode *LN00 = cast<LoadSDNode>(N0.getOperand(0)); in visitZERO_EXTEND()
12347 auto *AndC = cast<ConstantSDNode>(N0.getOperand(1)); in visitZERO_EXTEND()
12355 DoXform = ExtendUsesToFormExtLoad(VT, N0.getNode(), N0.getOperand(0), in visitZERO_EXTEND()
12366 ExtendSetCCUses(SetCCs, N0.getOperand(0), ExtLoad, ISD::ZERO_EXTEND); in visitZERO_EXTEND()
12408 EVT N00VT = N0.getOperand(0).getValueType(); in visitZERO_EXTEND()
12420 SDValue VSetCC = DAG.getNode(ISD::SETCC, DL, VT, N0.getOperand(0), in visitZERO_EXTEND()
12421 N0.getOperand(1), N0.getOperand(2)); in visitZERO_EXTEND()
12430 DAG.getNode(ISD::SETCC, DL, MatchingVectorType, N0.getOperand(0), in visitZERO_EXTEND()
12431 N0.getOperand(1), N0.getOperand(2)); in visitZERO_EXTEND()
12439 EVT N00VT = N0.getOperand(0).getValueType(); in visitZERO_EXTEND()
12441 DL, N0.getOperand(0), N0.getOperand(1), in visitZERO_EXTEND()
12444 cast<CondCodeSDNode>(N0.getOperand(2))->get(), true)) in visitZERO_EXTEND()
12450 isa<ConstantSDNode>(N0.getOperand(1)) && in visitZERO_EXTEND()
12451 N0.getOperand(0).getOpcode() == ISD::ZERO_EXTEND && in visitZERO_EXTEND()
12453 SDValue ShAmt = N0.getOperand(1); in visitZERO_EXTEND()
12455 SDValue InnerZExt = N0.getOperand(0); in visitZERO_EXTEND()
12459 InnerZExt.getOperand(0).getValueSizeInBits(); in visitZERO_EXTEND()
12471 DAG.getNode(ISD::ZERO_EXTEND, DL, VT, N0.getOperand(0)), in visitZERO_EXTEND()
12488 SDValue N0 = N->getOperand(0); in visitANY_EXTEND()
12504 return DAG.getNode(N0.getOpcode(), SDLoc(N), VT, N0.getOperand(0)); in visitANY_EXTEND()
12510 SDNode *oye = N0.getOperand(0).getNode(); in visitANY_EXTEND()
12522 return DAG.getAnyExtOrTrunc(N0.getOperand(0), SDLoc(N), VT); in visitANY_EXTEND()
12527 N0.getOperand(0).getOpcode() == ISD::TRUNCATE && in visitANY_EXTEND()
12528 N0.getOperand(1).getOpcode() == ISD::Constant && in visitANY_EXTEND()
12529 !TLI.isTruncateFree(N0.getOperand(0).getOperand(0).getValueType(), in visitANY_EXTEND()
12532 SDValue X = DAG.getAnyExtOrTrunc(N0.getOperand(0).getOperand(0), DL, VT); in visitANY_EXTEND()
12533 SDValue Y = DAG.getNode(ISD::ANY_EXTEND, DL, VT, N0.getOperand(1)); in visitANY_EXTEND()
12605 EVT N00VT = N0.getOperand(0).getValueType(); in visitANY_EXTEND()
12615 return DAG.getSetCC(SDLoc(N), VT, N0.getOperand(0), in visitANY_EXTEND()
12616 N0.getOperand(1), in visitANY_EXTEND()
12617 cast<CondCodeSDNode>(N0.getOperand(2))->get()); in visitANY_EXTEND()
12624 DAG.getSetCC(SDLoc(N), MatchingVectorType, N0.getOperand(0), in visitANY_EXTEND()
12625 N0.getOperand(1), in visitANY_EXTEND()
12626 cast<CondCodeSDNode>(N0.getOperand(2))->get()); in visitANY_EXTEND()
12633 DL, N0.getOperand(0), N0.getOperand(1), DAG.getConstant(1, DL, VT), in visitANY_EXTEND()
12635 cast<CondCodeSDNode>(N0.getOperand(2))->get(), true)) in visitANY_EXTEND()
12650 SDValue N0 = N->getOperand(0); in visitAssertExt()
12651 SDValue N1 = N->getOperand(1); in visitAssertExt()
12656 AssertVT == cast<VTSDNode>(N0.getOperand(1))->getVT()) in visitAssertExt()
12660 N0.getOperand(0).getOpcode() == Opcode) { in visitAssertExt()
12667 SDValue BigA = N0.getOperand(0); in visitAssertExt()
12668 EVT BigA_AssertVT = cast<VTSDNode>(BigA.getOperand(1))->getVT(); in visitAssertExt()
12672 BigA.getOperand(0), MinAssertVTVal); in visitAssertExt()
12680 N0.getOperand(0).getOpcode() == ISD::AssertSext && in visitAssertExt()
12682 SDValue BigA = N0.getOperand(0); in visitAssertExt()
12683 EVT BigA_AssertVT = cast<VTSDNode>(BigA.getOperand(1))->getVT(); in visitAssertExt()
12687 BigA.getOperand(0), N1); in visitAssertExt()
12699 SDValue N0 = N->getOperand(0); in visitAssertAlign()
12704 return DAG.getAssertAlign(DL, N0.getOperand(0), in visitAssertAlign()
12716 SDValue LHS = N0.getOperand(0); in visitAssertAlign()
12717 SDValue RHS = N0.getOperand(1); in visitAssertAlign()
12741 SDValue N0 = N->getOperand(0); in reduceLoadWidth()
12762 ExtVT = cast<VTSDNode>(N->getOperand(1))->getVT(); in reduceLoadWidth()
12771 auto *N1C = dyn_cast<ConstantSDNode>(N->getOperand(1)); in reduceLoadWidth()
12793 auto AndC = dyn_cast<ConstantSDNode>(N->getOperand(1)); in reduceLoadWidth()
12828 auto *LN = dyn_cast<LoadSDNode>(SRL.getOperand(0)); in reduceLoadWidth()
12829 auto *SRL1C = dyn_cast<ConstantSDNode>(SRL.getOperand(1)); in reduceLoadWidth()
12865 isa<ConstantSDNode>(Mask->getOperand(1))) { in reduceLoadWidth()
12877 N0 = SRL.getOperand(0); in reduceLoadWidth()
12888 if (ConstantSDNode *N01 = dyn_cast<ConstantSDNode>(N0.getOperand(1))) { in reduceLoadWidth()
12890 N0 = N0.getOperand(0); in reduceLoadWidth()
12974 SDValue N0 = N->getOperand(0); in visitSIGN_EXTEND_INREG()
12975 SDValue N1 = N->getOperand(1); in visitSIGN_EXTEND_INREG()
12995 ExtVT.bitsLT(cast<VTSDNode>(N0.getOperand(1))->getVT())) in visitSIGN_EXTEND_INREG()
12996 return DAG.getNode(ISD::SIGN_EXTEND_INREG, SDLoc(N), VT, N0.getOperand(0), in visitSIGN_EXTEND_INREG()
13004 SDValue N00 = N0.getOperand(0); in visitSIGN_EXTEND_INREG()
13018 SDValue N00 = N0.getOperand(0); in visitSIGN_EXTEND_INREG()
13035 SDValue N00 = N0.getOperand(0); in visitSIGN_EXTEND_INREG()
13059 if (auto *ShAmt = dyn_cast<ConstantSDNode>(N0.getOperand(1))) in visitSIGN_EXTEND_INREG()
13063 unsigned InSignBits = DAG.ComputeNumSignBits(N0.getOperand(0)); in visitSIGN_EXTEND_INREG()
13065 return DAG.getNode(ISD::SRA, SDLoc(N), VT, N0.getOperand(0), in visitSIGN_EXTEND_INREG()
13066 N0.getOperand(1)); in visitSIGN_EXTEND_INREG()
13144 if (SDValue BSwap = MatchBSwapHWordLow(N0.getNode(), N0.getOperand(0), in visitSIGN_EXTEND_INREG()
13145 N0.getOperand(1), false)) in visitSIGN_EXTEND_INREG()
13153 SDValue N0 = N->getOperand(0); in visitEXTEND_VECTOR_INREG()
13170 SDValue N0 = N->getOperand(0); in visitTRUNCATE()
13181 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0.getOperand(0)); in visitTRUNCATE()
13195 if (N0.getOperand(0).getValueType().bitsLT(VT)) in visitTRUNCATE()
13196 return DAG.getNode(N0.getOpcode(), SDLoc(N), VT, N0.getOperand(0)); in visitTRUNCATE()
13198 if (N0.getOperand(0).getValueType().bitsGT(VT)) in visitTRUNCATE()
13199 return DAG.getNode(ISD::TRUNCATE, SDLoc(N), VT, N0.getOperand(0)); in visitTRUNCATE()
13202 return N0.getOperand(0); in visitTRUNCATE()
13209 SDValue X = N0.getOperand(0); in visitTRUNCATE()
13210 SDValue ExtVal = N0.getOperand(1); in visitTRUNCATE()
13234 EVT VecTy = N0.getOperand(0).getValueType(); in visitTRUNCATE()
13245 SDValue EltNo = N0->getOperand(1); in visitTRUNCATE()
13252 DAG.getBitcast(NVT, N0.getOperand(0)), in visitTRUNCATE()
13262 SDValue Cond = N0.getOperand(0); in visitTRUNCATE()
13263 SDValue TruncOp0 = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(1)); in visitTRUNCATE()
13264 SDValue TruncOp1 = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(2)); in visitTRUNCATE()
13273 SDValue Amt = N0.getOperand(1); in visitTRUNCATE()
13280 SDValue Trunc = DAG.getNode(ISD::TRUNCATE, SL, VT, N0.getOperand(0)); in visitTRUNCATE()
13313 N0.getOperand(0).getOpcode() == ISD::BUILD_VECTOR && in visitTRUNCATE()
13314 N0.getOperand(0).hasOneUse()) { in visitTRUNCATE()
13315 SDValue BuildVect = N0.getOperand(0); in visitTRUNCATE()
13331 Opnds.push_back(BuildVect.getOperand(i)); in visitTRUNCATE()
13367 SDValue X = N0.getOperand(i); in visitTRUNCATE()
13406 SDValue VecSrc = N0.getOperand(0); in visitTRUNCATE()
13440 SDValue N00 = N0.getOperand(0); in visitTRUNCATE()
13444 if (N00.getOperand(0)->getValueType(0).getVectorElementType() == in visitTRUNCATE()
13446 return DAG.getNode(ISD::EXTRACT_SUBVECTOR, SDLoc(N0->getOperand(0)), VT, in visitTRUNCATE()
13447 N00.getOperand(0), N0.getOperand(1)); in visitTRUNCATE()
13466 (isConstantOrConstantVector(N0.getOperand(0), true) || in visitTRUNCATE()
13467 isConstantOrConstantVector(N0.getOperand(1), true))) { in visitTRUNCATE()
13473 SDValue NarrowL = DAG.getNode(ISD::TRUNCATE, DL, VT, N0.getOperand(0)); in visitTRUNCATE()
13474 SDValue NarrowR = DAG.getNode(ISD::TRUNCATE, DL, VT, N0.getOperand(1)); in visitTRUNCATE()
13489 SDValue X = DAG.getNode(ISD::TRUNCATE, DL, VT, N0.getOperand(0)); in visitTRUNCATE()
13490 SDValue Y = DAG.getNode(ISD::TRUNCATE, DL, VT, N0.getOperand(1)); in visitTRUNCATE()
13492 return DAG.getNode(N0.getOpcode(), DL, VTs, X, Y, N0.getOperand(2)); in visitTRUNCATE()
13500 N0.getOperand(0).getOpcode() == ISD::ZERO_EXTEND && in visitTRUNCATE()
13501 N0.getOperand(0).getOperand(0).getScalarValueSizeInBits() <= in visitTRUNCATE()
13504 return getTruncatedUSUBSAT(VT, SrcVT, N0.getOperand(0), N0.getOperand(1), in visitTRUNCATE()
13514 SDValue Elt = N->getOperand(i); in getBuildPairElt()
13517 return Elt.getOperand(Elt.getResNo()).getNode(); in getBuildPairElt()
13568 SDValue N0 = N->getOperand(0); in foldBitcastedFPLogic()
13596 SDValue LogicOp0 = N0.getOperand(0); in foldBitcastedFPLogic()
13597 ConstantSDNode *LogicOp1 = isConstOrConstSplat(N0.getOperand(1), true); in foldBitcastedFPLogic()
13600 LogicOp0.getOperand(0).getValueType() == VT) { in foldBitcastedFPLogic()
13601 SDValue FPOp = DAG.getNode(FPOpcode, SDLoc(N), VT, LogicOp0.getOperand(0)); in foldBitcastedFPLogic()
13612 SDValue N0 = N->getOperand(0); in visitBITCAST()
13651 return DAG.getBitcast(VT, N0.getOperand(0)); in visitBITCAST()
13698 SDValue NewConv = DAG.getBitcast(VT, N0.getOperand(0)); in visitBITCAST()
13746 isa<ConstantFPSDNode>(N0.getOperand(0)) && VT.isInteger() && in visitBITCAST()
13748 unsigned OrigXWidth = N0.getOperand(1).getValueSizeInBits(); in visitBITCAST()
13751 SDValue X = DAG.getBitcast(IntXVT, N0.getOperand(1)); in visitBITCAST()
13774 SDValue Cst = DAG.getBitcast(VT, N0.getOperand(0)); in visitBITCAST()
13776 SDValue X = DAG.getBitcast(VT, N0.getOperand(1)); in visitBITCAST()
13799 SDValue Cst = DAG.getBitcast(VT, N0.getOperand(0)); in visitBITCAST()
13827 Op.getOperand(0).getValueType() == VT) in visitBITCAST()
13828 return SDValue(Op.getOperand(0)); in visitBITCAST()
13837 SDValue SV0 = PeekThroughBitcast(N0->getOperand(0)); in visitBITCAST()
13838 SDValue SV1 = PeekThroughBitcast(N0->getOperand(1)); in visitBITCAST()
13864 SDValue N0 = N->getOperand(0); in visitFREEZE()
13874 N0.getOperand(0).getValueType(), in visitFREEZE()
13875 N0.getOperand(0))); in visitFREEZE()
13973 SDValue N0 = N->getOperand(0); in visitFADDForFMACombine()
13974 SDValue N1 = N->getOperand(1); in visitFADDForFMACombine()
14028 return DAG.getNode(PreferredFusedOpcode, SL, VT, N0.getOperand(0), in visitFADDForFMACombine()
14029 N0.getOperand(1), N1); in visitFADDForFMACombine()
14035 return DAG.getNode(PreferredFusedOpcode, SL, VT, N1.getOperand(0), in visitFADDForFMACombine()
14036 N1.getOperand(1), N0); in visitFADDForFMACombine()
14044 N0.getOperand(2).getOpcode() == ISD::FMUL && N0.hasOneUse() && in visitFADDForFMACombine()
14045 N0.getOperand(2).hasOneUse()) { in visitFADDForFMACombine()
14049 N1.getOperand(2).getOpcode() == ISD::FMUL && N1.hasOneUse() && in visitFADDForFMACombine()
14050 N1.getOperand(2).hasOneUse()) { in visitFADDForFMACombine()
14055 SDValue A = FMA.getOperand(0); in visitFADDForFMACombine()
14056 SDValue B = FMA.getOperand(1); in visitFADDForFMACombine()
14057 SDValue C = FMA.getOperand(2).getOperand(0); in visitFADDForFMACombine()
14058 SDValue D = FMA.getOperand(2).getOperand(1); in visitFADDForFMACombine()
14067 SDValue N00 = N0.getOperand(0); in visitFADDForFMACombine()
14072 DAG.getNode(ISD::FP_EXTEND, SL, VT, N00.getOperand(0)), in visitFADDForFMACombine()
14073 DAG.getNode(ISD::FP_EXTEND, SL, VT, N00.getOperand(1)), in visitFADDForFMACombine()
14081 SDValue N10 = N1.getOperand(0); in visitFADDForFMACombine()
14086 DAG.getNode(ISD::FP_EXTEND, SL, VT, N10.getOperand(0)), in visitFADDForFMACombine()
14087 DAG.getNode(ISD::FP_EXTEND, SL, VT, N10.getOperand(1)), in visitFADDForFMACombine()
14105 SDValue N02 = N0.getOperand(2); in visitFADDForFMACombine()
14107 SDValue N020 = N02.getOperand(0); in visitFADDForFMACombine()
14111 return FoldFAddFMAFPExtFMul(N0.getOperand(0), N0.getOperand(1), in visitFADDForFMACombine()
14112 N020.getOperand(0), N020.getOperand(1), in visitFADDForFMACombine()
14133 SDValue N00 = N0.getOperand(0); in visitFADDForFMACombine()
14135 SDValue N002 = N00.getOperand(2); in visitFADDForFMACombine()
14139 return FoldFAddFPExtFMAFMul(N00.getOperand(0), N00.getOperand(1), in visitFADDForFMACombine()
14140 N002.getOperand(0), N002.getOperand(1), in visitFADDForFMACombine()
14149 SDValue N12 = N1.getOperand(2); in visitFADDForFMACombine()
14151 SDValue N120 = N12.getOperand(0); in visitFADDForFMACombine()
14155 return FoldFAddFMAFPExtFMul(N1.getOperand(0), N1.getOperand(1), in visitFADDForFMACombine()
14156 N120.getOperand(0), N120.getOperand(1), in visitFADDForFMACombine()
14168 SDValue N10 = N1.getOperand(0); in visitFADDForFMACombine()
14170 SDValue N102 = N10.getOperand(2); in visitFADDForFMACombine()
14174 return FoldFAddFPExtFMAFMul(N10.getOperand(0), N10.getOperand(1), in visitFADDForFMACombine()
14175 N102.getOperand(0), N102.getOperand(1), in visitFADDForFMACombine()
14187 SDValue N0 = N->getOperand(0); in visitFSUBForFMACombine()
14188 SDValue N1 = N->getOperand(1); in visitFSUBForFMACombine()
14232 return DAG.getNode(PreferredFusedOpcode, SL, VT, XY.getOperand(0), in visitFSUBForFMACombine()
14233 XY.getOperand(1), DAG.getNode(ISD::FNEG, SL, VT, Z)); in visitFSUBForFMACombine()
14243 DAG.getNode(ISD::FNEG, SL, VT, YZ.getOperand(0)), in visitFSUBForFMACombine()
14244 YZ.getOperand(1), X); in visitFSUBForFMACombine()
14269 if (N0.getOpcode() == ISD::FNEG && isContractableFMUL(N0.getOperand(0)) && in visitFSUBForFMACombine()
14270 (Aggressive || (N0->hasOneUse() && N0.getOperand(0).hasOneUse()))) { in visitFSUBForFMACombine()
14271 SDValue N00 = N0.getOperand(0).getOperand(0); in visitFSUBForFMACombine()
14272 SDValue N01 = N0.getOperand(0).getOperand(1); in visitFSUBForFMACombine()
14283 SDValue N00 = N0.getOperand(0); in visitFSUBForFMACombine()
14288 DAG.getNode(ISD::FP_EXTEND, SL, VT, N00.getOperand(0)), in visitFSUBForFMACombine()
14289 DAG.getNode(ISD::FP_EXTEND, SL, VT, N00.getOperand(1)), in visitFSUBForFMACombine()
14298 SDValue N10 = N1.getOperand(0); in visitFSUBForFMACombine()
14305 DAG.getNode(ISD::FP_EXTEND, SL, VT, N10.getOperand(0))), in visitFSUBForFMACombine()
14306 DAG.getNode(ISD::FP_EXTEND, SL, VT, N10.getOperand(1)), N0); in visitFSUBForFMACombine()
14317 SDValue N00 = N0.getOperand(0); in visitFSUBForFMACombine()
14319 SDValue N000 = N00.getOperand(0); in visitFSUBForFMACombine()
14326 DAG.getNode(ISD::FP_EXTEND, SL, VT, N000.getOperand(0)), in visitFSUBForFMACombine()
14327 DAG.getNode(ISD::FP_EXTEND, SL, VT, N000.getOperand(1)), in visitFSUBForFMACombine()
14340 SDValue N00 = N0.getOperand(0); in visitFSUBForFMACombine()
14342 SDValue N000 = N00.getOperand(0); in visitFSUBForFMACombine()
14349 DAG.getNode(ISD::FP_EXTEND, SL, VT, N000.getOperand(0)), in visitFSUBForFMACombine()
14350 DAG.getNode(ISD::FP_EXTEND, SL, VT, N000.getOperand(1)), in visitFSUBForFMACombine()
14376 isContractableAndReassociableFMUL(N0.getOperand(2)) && in visitFSUBForFMACombine()
14377 N0->hasOneUse() && N0.getOperand(2)->hasOneUse()) { in visitFSUBForFMACombine()
14378 return DAG.getNode(PreferredFusedOpcode, SL, VT, N0.getOperand(0), in visitFSUBForFMACombine()
14379 N0.getOperand(1), in visitFSUBForFMACombine()
14381 N0.getOperand(2).getOperand(0), in visitFSUBForFMACombine()
14382 N0.getOperand(2).getOperand(1), in visitFSUBForFMACombine()
14389 isContractableAndReassociableFMUL(N1.getOperand(2)) && in visitFSUBForFMACombine()
14391 SDValue N20 = N1.getOperand(2).getOperand(0); in visitFSUBForFMACombine()
14392 SDValue N21 = N1.getOperand(2).getOperand(1); in visitFSUBForFMACombine()
14395 DAG.getNode(ISD::FNEG, SL, VT, N1.getOperand(0)), N1.getOperand(1), in visitFSUBForFMACombine()
14403 SDValue N02 = N0.getOperand(2); in visitFSUBForFMACombine()
14405 SDValue N020 = N02.getOperand(0); in visitFSUBForFMACombine()
14410 PreferredFusedOpcode, SL, VT, N0.getOperand(0), N0.getOperand(1), in visitFSUBForFMACombine()
14413 DAG.getNode(ISD::FP_EXTEND, SL, VT, N020.getOperand(0)), in visitFSUBForFMACombine()
14414 DAG.getNode(ISD::FP_EXTEND, SL, VT, N020.getOperand(1)), in visitFSUBForFMACombine()
14427 SDValue N00 = N0.getOperand(0); in visitFSUBForFMACombine()
14429 SDValue N002 = N00.getOperand(2); in visitFSUBForFMACombine()
14435 DAG.getNode(ISD::FP_EXTEND, SL, VT, N00.getOperand(0)), in visitFSUBForFMACombine()
14436 DAG.getNode(ISD::FP_EXTEND, SL, VT, N00.getOperand(1)), in visitFSUBForFMACombine()
14439 DAG.getNode(ISD::FP_EXTEND, SL, VT, N002.getOperand(0)), in visitFSUBForFMACombine()
14440 DAG.getNode(ISD::FP_EXTEND, SL, VT, N002.getOperand(1)), in visitFSUBForFMACombine()
14448 if (isFusedOp(N1) && N1.getOperand(2).getOpcode() == ISD::FP_EXTEND && in visitFSUBForFMACombine()
14450 SDValue N120 = N1.getOperand(2).getOperand(0); in visitFSUBForFMACombine()
14454 SDValue N1200 = N120.getOperand(0); in visitFSUBForFMACombine()
14455 SDValue N1201 = N120.getOperand(1); in visitFSUBForFMACombine()
14458 DAG.getNode(ISD::FNEG, SL, VT, N1.getOperand(0)), N1.getOperand(1), in visitFSUBForFMACombine()
14472 if (N1.getOpcode() == ISD::FP_EXTEND && isFusedOp(N1.getOperand(0))) { in visitFSUBForFMACombine()
14473 SDValue CvtSrc = N1.getOperand(0); in visitFSUBForFMACombine()
14474 SDValue N100 = CvtSrc.getOperand(0); in visitFSUBForFMACombine()
14475 SDValue N101 = CvtSrc.getOperand(1); in visitFSUBForFMACombine()
14476 SDValue N102 = CvtSrc.getOperand(2); in visitFSUBForFMACombine()
14480 SDValue N1020 = N102.getOperand(0); in visitFSUBForFMACombine()
14481 SDValue N1021 = N102.getOperand(1); in visitFSUBForFMACombine()
14502 SDValue N0 = N->getOperand(0); in visitFMULForFMADistributiveCombine()
14503 SDValue N1 = N->getOperand(1); in visitFMULForFMADistributiveCombine()
14540 if (auto *C = isConstOrConstSplatFP(X.getOperand(1), true)) { in visitFMULForFMADistributiveCombine()
14542 return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, in visitFMULForFMADistributiveCombine()
14545 return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, in visitFMULForFMADistributiveCombine()
14563 if (auto *C0 = isConstOrConstSplatFP(X.getOperand(0), true)) { in visitFMULForFMADistributiveCombine()
14566 DAG.getNode(ISD::FNEG, SL, VT, X.getOperand(1)), Y, in visitFMULForFMADistributiveCombine()
14570 DAG.getNode(ISD::FNEG, SL, VT, X.getOperand(1)), Y, in visitFMULForFMADistributiveCombine()
14573 if (auto *C1 = isConstOrConstSplatFP(X.getOperand(1), true)) { in visitFMULForFMADistributiveCombine()
14575 return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, in visitFMULForFMADistributiveCombine()
14578 return DAG.getNode(PreferredFusedOpcode, SL, VT, X.getOperand(0), Y, in visitFMULForFMADistributiveCombine()
14594 SDValue N0 = N->getOperand(0); in visitFADD()
14595 SDValue N1 = N->getOperand(1); in visitFADD()
14644 auto *C = isConstOrConstSplatFP(FMul.getOperand(1), true); in visitFADD()
14650 SDValue B = N0.getOperand(0); in visitFADD()
14656 SDValue B = N1.getOperand(0); in visitFADD()
14668 if (N0.getOpcode() == ISD::FNEG && N0.getOperand(0) == N1) in visitFADD()
14672 if (N1.getOpcode() == ISD::FNEG && N1.getOperand(0) == N0) in visitFADD()
14684 DAG.isConstantFPBuildVectorOrConstantFP(N0.getOperand(1))) { in visitFADD()
14685 SDValue NewC = DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(1), N1); in visitFADD()
14686 return DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(0), NewC); in visitFADD()
14694 bool CFP00 = DAG.isConstantFPBuildVectorOrConstantFP(N0.getOperand(0)); in visitFADD()
14695 bool CFP01 = DAG.isConstantFPBuildVectorOrConstantFP(N0.getOperand(1)); in visitFADD()
14698 if (CFP01 && !CFP00 && N0.getOperand(0) == N1) { in visitFADD()
14699 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(1), in visitFADD()
14706 N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
14707 N0.getOperand(0) == N1.getOperand(0)) { in visitFADD()
14708 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N0.getOperand(1), in visitFADD()
14710 return DAG.getNode(ISD::FMUL, DL, VT, N0.getOperand(0), NewCFP); in visitFADD()
14715 bool CFP10 = DAG.isConstantFPBuildVectorOrConstantFP(N1.getOperand(0)); in visitFADD()
14716 bool CFP11 = DAG.isConstantFPBuildVectorOrConstantFP(N1.getOperand(1)); in visitFADD()
14719 if (CFP11 && !CFP10 && N1.getOperand(0) == N0) { in visitFADD()
14720 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N1.getOperand(1), in visitFADD()
14727 N0.getOperand(0) == N0.getOperand(1) && in visitFADD()
14728 N1.getOperand(0) == N0.getOperand(0)) { in visitFADD()
14729 SDValue NewCFP = DAG.getNode(ISD::FADD, DL, VT, N1.getOperand(1), in visitFADD()
14731 return DAG.getNode(ISD::FMUL, DL, VT, N1.getOperand(0), NewCFP); in visitFADD()
14736 bool CFP00 = DAG.isConstantFPBuildVectorOrConstantFP(N0.getOperand(0)); in visitFADD()
14738 if (!CFP00 && N0.getOperand(0) == N0.getOperand(1) && in visitFADD()
14739 (N0.getOperand(0) == N1)) { in visitFADD()
14746 bool CFP10 = DAG.isConstantFPBuildVectorOrConstantFP(N1.getOperand(0)); in visitFADD()
14748 if (!CFP10 && N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
14749 N1.getOperand(0) == N0) { in visitFADD()
14757 N0.getOperand(0) == N0.getOperand(1) && in visitFADD()
14758 N1.getOperand(0) == N1.getOperand(1) && in visitFADD()
14759 N0.getOperand(0) == N1.getOperand(0)) { in visitFADD()
14760 return DAG.getNode(ISD::FMUL, DL, VT, N0.getOperand(0), in visitFADD()
14775 SDValue Chain = N->getOperand(0); in visitSTRICT_FADD()
14776 SDValue N0 = N->getOperand(1); in visitSTRICT_FADD()
14777 SDValue N1 = N->getOperand(2); in visitSTRICT_FADD()
14802 SDValue N0 = N->getOperand(0); in visitFSUB()
14803 SDValue N1 = N->getOperand(1); in visitFSUB()
14864 if (N0 == N1->getOperand(0)) in visitFSUB()
14865 return DAG.getNode(ISD::FNEG, DL, VT, N1->getOperand(1)); in visitFSUB()
14867 if (N0 == N1->getOperand(1)) in visitFSUB()
14868 return DAG.getNode(ISD::FNEG, DL, VT, N1->getOperand(0)); in visitFSUB()
14886 SDValue N0 = N->getOperand(0); in visitFMUL()
14887 SDValue N1 = N->getOperand(1); in visitFMUL()
14919 SDValue N00 = N0.getOperand(0); in visitFMUL()
14920 SDValue N01 = N0.getOperand(1); in visitFMUL()
14933 N0.getOperand(0) == N0.getOperand(1)) { in visitFMUL()
14936 return DAG.getNode(ISD::FMUL, DL, VT, N0.getOperand(0), MulConsts); in visitFMUL()
14975 SDValue Cond = Select.getOperand(0); in visitFMUL()
14976 auto TrueOpnd = dyn_cast<ConstantFPSDNode>(Select.getOperand(1)); in visitFMUL()
14977 auto FalseOpnd = dyn_cast<ConstantFPSDNode>(Select.getOperand(2)); in visitFMUL()
14980 Cond.getOpcode() == ISD::SETCC && Cond.getOperand(0) == X && in visitFMUL()
14981 isa<ConstantFPSDNode>(Cond.getOperand(1)) && in visitFMUL()
14982 cast<ConstantFPSDNode>(Cond.getOperand(1))->isExactlyValue(0.0)) { in visitFMUL()
14983 ISD::CondCode CC = cast<CondCodeSDNode>(Cond.getOperand(2))->get(); in visitFMUL()
15022 SDValue N0 = N->getOperand(0); in visitFMA()
15023 SDValue N1 = N->getOperand(1); in visitFMA()
15024 SDValue N2 = N->getOperand(2); in visitFMA()
15077 if (N2.getOpcode() == ISD::FMUL && N0 == N2.getOperand(0) && in visitFMA()
15079 DAG.isConstantFPBuildVectorOrConstantFP(N2.getOperand(1))) { in visitFMA()
15081 DAG.getNode(ISD::FADD, DL, VT, N1, N2.getOperand(1))); in visitFMA()
15087 DAG.isConstantFPBuildVectorOrConstantFP(N0.getOperand(1))) { in visitFMA()
15088 return DAG.getNode(ISD::FMA, DL, VT, N0.getOperand(0), in visitFMA()
15089 DAG.getNode(ISD::FMUL, DL, VT, N1, N0.getOperand(1)), in visitFMA()
15111 return DAG.getNode(ISD::FMA, DL, VT, N0.getOperand(0), in visitFMA()
15125 if (N1CFP && N2.getOpcode() == ISD::FNEG && N2.getOperand(0) == N0) { in visitFMA()
15158 SDValue N0 = N->getOperand(0), N1 = N->getOperand(1); in combineRepeatedFPDivisors()
15181 if (U->getOpcode() == ISD::FDIV && U->getOperand(1) == N1) { in combineRepeatedFPDivisors()
15183 if (U->getOperand(1).getOpcode() == ISD::FSQRT && in combineRepeatedFPDivisors()
15184 U->getOperand(0) == U->getOperand(1).getOperand(0) && in combineRepeatedFPDivisors()
15207 SDValue Dividend = U->getOperand(0); in combineRepeatedFPDivisors()
15222 SDValue N0 = N->getOperand(0); in visitFDIV()
15223 SDValue N1 = N->getOperand(1); in visitFDIV()
15271 if (SDValue RV = buildRsqrtEstimate(N1.getOperand(0), Flags)) in visitFDIV()
15274 N1.getOperand(0).getOpcode() == ISD::FSQRT) { in visitFDIV()
15276 buildRsqrtEstimate(N1.getOperand(0).getOperand(0), Flags)) { in visitFDIV()
15282 N1.getOperand(0).getOpcode() == ISD::FSQRT) { in visitFDIV()
15284 buildRsqrtEstimate(N1.getOperand(0).getOperand(0), Flags)) { in visitFDIV()
15285 RV = DAG.getNode(ISD::FP_ROUND, SDLoc(N1), VT, RV, N1.getOperand(1)); in visitFDIV()
15293 if (N1.getOperand(0).getOpcode() == ISD::FSQRT) { in visitFDIV()
15294 Sqrt = N1.getOperand(0); in visitFDIV()
15295 Y = N1.getOperand(1); in visitFDIV()
15296 } else if (N1.getOperand(1).getOpcode() == ISD::FSQRT) { in visitFDIV()
15297 Sqrt = N1.getOperand(1); in visitFDIV()
15298 Y = N1.getOperand(0); in visitFDIV()
15307 A = Y.getOperand(0); in visitFDIV()
15308 else if (Y == Sqrt.getOperand(0)) in visitFDIV()
15315 DAG.getNode(ISD::FMUL, DL, VT, AA, Sqrt.getOperand(0)); in visitFDIV()
15326 if (SDValue Rsqrt = buildRsqrtEstimate(Sqrt.getOperand(0), Flags)) { in visitFDIV()
15343 if (N1.getOpcode() == ISD::FSQRT && N0 == N1.getOperand(0)) in visitFDIV()
15364 SDValue N0 = N->getOperand(0); in visitFREM()
15365 SDValue N1 = N->getOperand(1); in visitFREM()
15393 SDValue N0 = N->getOperand(0); in visitFSQRT()
15408 SDValue N1 = N->getOperand(1); in CanCombineFCOPYSIGN_EXTEND_ROUND()
15412 EVT N1Op0VT = N1->getOperand(0).getValueType(); in CanCombineFCOPYSIGN_EXTEND_ROUND()
15435 SDValue N0 = N->getOperand(0); in visitFCOPYSIGN()
15436 SDValue N1 = N->getOperand(1); in visitFCOPYSIGN()
15444 if (ConstantFPSDNode *N1C = isConstOrConstSplatFP(N->getOperand(1))) { in visitFCOPYSIGN()
15463 return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, N0.getOperand(0), N1); in visitFCOPYSIGN()
15471 return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, N0, N1.getOperand(1)); in visitFCOPYSIGN()
15476 return DAG.getNode(ISD::FCOPYSIGN, SDLoc(N), VT, N0, N1.getOperand(0)); in visitFCOPYSIGN()
15482 ConstantFPSDNode *ExponentC = isConstOrConstSplatFP(N->getOperand(1)); in visitFPOW()
15512 return DAG.getNode(ISD::FCBRT, SDLoc(N), VT, N->getOperand(0)); in visitFPOW()
15547 SDValue Sqrt = DAG.getNode(ISD::FSQRT, DL, VT, N->getOperand(0)); in visitFPOW()
15573 SDValue N0 = N->getOperand(0); in foldFPToIntToFP()
15575 N0.getOperand(0).getValueType() == VT) in foldFPToIntToFP()
15576 return DAG.getNode(ISD::FTRUNC, SDLoc(N), VT, N0.getOperand(0)); in foldFPToIntToFP()
15579 N0.getOperand(0).getValueType() == VT) in foldFPToIntToFP()
15580 return DAG.getNode(ISD::FTRUNC, SDLoc(N), VT, N0.getOperand(0)); in foldFPToIntToFP()
15586 SDValue N0 = N->getOperand(0); in visitSINT_TO_FP()
15623 N0.getOperand(0).getOpcode() == ISD::SETCC && !VT.isVector() && in visitSINT_TO_FP()
15626 return DAG.getSelect(DL, VT, N0.getOperand(0), in visitSINT_TO_FP()
15638 SDValue N0 = N->getOperand(0); in visitUINT_TO_FP()
15678 SDValue N0 = N->getOperand(0); in FoldIntToFPToInt()
15684 SDValue Src = N0.getOperand(0); in FoldIntToFPToInt()
15719 SDValue N0 = N->getOperand(0); in visitFP_TO_SINT()
15734 SDValue N0 = N->getOperand(0); in visitFP_TO_UINT()
15749 SDValue N0 = N->getOperand(0); in visitFP_ROUND()
15750 SDValue N1 = N->getOperand(1); in visitFP_ROUND()
15759 if (N0.getOpcode() == ISD::FP_EXTEND && VT == N0.getOperand(0).getValueType()) in visitFP_ROUND()
15760 return N0.getOperand(0); in visitFP_ROUND()
15774 if (N0.getOperand(0).getValueType() == MVT::f80 && VT == MVT::f16) in visitFP_ROUND()
15784 return DAG.getNode(ISD::FP_ROUND, DL, VT, N0.getOperand(0), in visitFP_ROUND()
15792 N0.getOperand(0), N1); in visitFP_ROUND()
15795 Tmp, N0.getOperand(1)); in visitFP_ROUND()
15805 SDValue N0 = N->getOperand(0); in visitFP_EXTEND()
15820 return DAG.getNode(ISD::FP16_TO_FP, SDLoc(N), VT, N0.getOperand(0)); in visitFP_EXTEND()
15826 SDValue In = N0.getOperand(0); in visitFP_EXTEND()
15830 In, N0.getOperand(1)); in visitFP_EXTEND()
15858 SDValue N0 = N->getOperand(0); in visitFCEIL()
15869 SDValue N0 = N->getOperand(0); in visitFTRUNC()
15893 SDValue N0 = N->getOperand(0); in visitFFLOOR()
15904 SDValue N0 = N->getOperand(0); in visitFNEG()
15923 return DAG.getNode(ISD::FSUB, SDLoc(N), VT, N0.getOperand(1), in visitFNEG()
15924 N0.getOperand(0)); in visitFNEG()
15934 SDValue N0 = N->getOperand(0); in visitFMinMax()
15935 SDValue N1 = N->getOperand(1); in visitFMinMax()
15960 return PropagatesNaN ? N->getOperand(1) : N->getOperand(0); in visitFMinMax()
15970 return N->getOperand(1); in visitFMinMax()
15977 return N->getOperand(0); in visitFMinMax()
15985 SDValue N0 = N->getOperand(0); in visitFABS()
15994 return N->getOperand(0); in visitFABS()
15999 return DAG.getNode(ISD::FABS, SDLoc(N), VT, N0.getOperand(0)); in visitFABS()
16008 SDValue Chain = N->getOperand(0); in visitBRCOND()
16009 SDValue N1 = N->getOperand(1); in visitBRCOND()
16010 SDValue N2 = N->getOperand(2); in visitBRCOND()
16016 N1->getOperand(0), N2); in visitBRCOND()
16029 N1.getOperand(0).getValueType())) { in visitBRCOND()
16031 Chain, N1.getOperand(2), in visitBRCOND()
16032 N1.getOperand(0), N1.getOperand(1), N2); in visitBRCOND()
16050 (N.getOperand(0).hasOneUse() && in rebuildSetCC()
16051 N.getOperand(0).getOpcode() == ISD::SRL))) { in rebuildSetCC()
16054 N = N.getOperand(0); in rebuildSetCC()
16073 SDValue Op0 = N.getOperand(0); in rebuildSetCC()
16074 SDValue Op1 = N.getOperand(1); in rebuildSetCC()
16077 SDValue AndOp1 = Op0.getOperand(1); in rebuildSetCC()
16118 SDValue Op0 = N->getOperand(0); in rebuildSetCC()
16119 SDValue Op1 = N->getOperand(1); in rebuildSetCC()
16127 Op0 = N->getOperand(0); in rebuildSetCC()
16128 Op1 = N->getOperand(1); in rebuildSetCC()
16147 CondCodeSDNode *CC = cast<CondCodeSDNode>(N->getOperand(1)); in visitBR_CC()
16148 SDValue CondLHS = N->getOperand(2), CondRHS = N->getOperand(3); in visitBR_CC()
16165 N->getOperand(0), Simp.getOperand(2), in visitBR_CC()
16166 Simp.getOperand(0), Simp.getOperand(1), in visitBR_CC()
16167 N->getOperand(4)); in visitBR_CC()
16312 SDValue Op1 = Use.getUser()->getOperand((UI.getOperandNo() + 1) & 1); in CombineToPreIndexedLoadStore()
16384 if (OtherUses[i]->getOperand(OffsetIdx).getNode() == BasePtr.getNode()) in CombineToPreIndexedLoadStore()
16386 assert(OtherUses[i]->getOperand(!OffsetIdx).getNode() == in CombineToPreIndexedLoadStore()
16400 auto *CN = cast<ConstantSDNode>(OtherUses[i]->getOperand(OffsetIdx)); in CombineToPreIndexedLoadStore()
16577 SDValue BP = LD->getOperand(1); in SplitIndexingFromLoad()
16578 SDValue Inc = LD->getOperand(2); in SplitIndexingFromLoad()
16655 SDValue Chain = LD->getOperand(0); in ForwardStoreValueToDirectLoad()
16945 if (!TLI.isTruncateFree(LS.Inst->getOperand(0).getValueType(), in addSliceGain()
17174 TLI.getRegClassFor(Use->getOperand(0).getValueType().getSimpleVT(), in canMergeExpensiveCrossRegisterBankCopy()
17175 Use->getOperand(0)->isDivergent()); in canMergeExpensiveCrossRegisterBankCopy()
17385 isa<ConstantSDNode>(User->getOperand(1))) { in SliceUpLoad()
17436 SliceInst = SliceInst.getOperand(0); in SliceUpLoad()
17458 !isa<ConstantSDNode>(V->getOperand(1)) || in CheckForMaskedLoad()
17459 !ISD::isNormalLoad(V->getOperand(0).getNode())) in CheckForMaskedLoad()
17463 LoadSDNode *LD = cast<LoadSDNode>(V->getOperand(0)); in CheckForMaskedLoad()
17475 uint64_t NotMask = ~cast<ConstantSDNode>(V->getOperand(1))->getSExtValue(); in CheckForMaskedLoad()
17623 MaskedLoad = CheckForMaskedLoad(Value.getOperand(0), Ptr, Chain); in ReduceLoadOpStoreWidth()
17626 Value.getOperand(1), ST,this)) in ReduceLoadOpStoreWidth()
17630 MaskedLoad = CheckForMaskedLoad(Value.getOperand(1), Ptr, Chain); in ReduceLoadOpStoreWidth()
17633 Value.getOperand(0), ST,this)) in ReduceLoadOpStoreWidth()
17640 if (Value.getOperand(1).getOpcode() != ISD::Constant) in ReduceLoadOpStoreWidth()
17643 SDValue N0 = Value.getOperand(0); in ReduceLoadOpStoreWidth()
17653 SDValue N1 = Value.getOperand(1); in ReduceLoadOpStoreWidth()
17813 SDNode *MulVar = AddNode.getOperand(0).getNode(); in isMulAddWithConstProfitable()
17816 if (Use->getOperand(0) == ConstNode) in isMulAddWithConstProfitable()
17817 OtherOp = Use->getOperand(1).getNode(); in isMulAddWithConstProfitable()
17819 OtherOp = Use->getOperand(0).getNode(); in isMulAddWithConstProfitable()
17848 DAG.isConstantIntBuildVectorOrConstantInt(OtherOp->getOperand(1)) && in isMulAddWithConstProfitable()
17849 OtherOp->getOperand(0).getNode() == MulVar) in isMulAddWithConstProfitable()
17973 SDValue Vec = Val.getOperand(0); in mergeStoresOfConstantsOrVecElts()
17974 SDValue Idx = Val.getOperand(1); in mergeStoresOfConstantsOrVecElts()
18263 Worklist.push_back(N->getOperand(j).getNode()); in checkMergeStoreCandidatesForDependencies()
18790 SDValue Val = StoreNodes[i].MemNode->getOperand(1); in tryStoreMergeOfLoads()
19005 EVT SVT = Value.getOperand(0).getValueType(); in visitSTORE()
19016 return DAG.getStore(Chain, SDLoc(N), Value.getOperand(0), Ptr, in visitSTORE()
19070 Value.getOperand(0).getValueType() == ST->getMemoryVT() && in visitSTORE()
19072 return DAG.getStore(Chain, SDLoc(N), Value.getOperand(0), Ptr, in visitSTORE()
19155 TLI.canCombineTruncStore(Value.getOperand(0).getValueType(), in visitSTORE()
19157 return DAG.getTruncStore(Chain, SDLoc(N), Value.getOperand(0), in visitSTORE()
19203 const BaseIndexOffset LifetimeEndBase(N->getOperand(1), SDValue(), in visitLIFETIME_END()
19207 SmallVector<SDValue, 8> Chains = {N->getOperand(0)}; in visitLIFETIME_END()
19215 Chains.push_back(Chain.getOperand(--Nops)); in visitLIFETIME_END()
19222 Chains.push_back(Chain.getOperand(0)); in visitLIFETIME_END()
19296 SDValue Op1 = Val.getOperand(0); in splitMergedValStore()
19297 SDValue Op2 = Val.getOperand(1); in splitMergedValStore()
19305 Hi = Op1.getOperand(0); in splitMergedValStore()
19311 ConstantSDNode *ShAmt = dyn_cast<ConstantSDNode>(Op1.getOperand(1)); in splitMergedValStore()
19318 !Lo.getOperand(0).getValueType().isScalarInteger() || in splitMergedValStore()
19319 Lo.getOperand(0).getValueSizeInBits() > HalfValBitSize || in splitMergedValStore()
19321 !Hi.getOperand(0).getValueType().isScalarInteger() || in splitMergedValStore()
19322 Hi.getOperand(0).getValueSizeInBits() > HalfValBitSize) in splitMergedValStore()
19327 EVT LowTy = (Lo.getOperand(0).getOpcode() == ISD::BITCAST) in splitMergedValStore()
19328 ? Lo.getOperand(0).getValueType() in splitMergedValStore()
19330 EVT HighTy = (Hi.getOperand(0).getOpcode() == ISD::BITCAST) in splitMergedValStore()
19331 ? Hi.getOperand(0).getValueType() in splitMergedValStore()
19342 Lo = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, Lo.getOperand(0)); in splitMergedValStore()
19343 Hi = DAG.getNode(ISD::ZERO_EXTEND, DL, VT, Hi.getOperand(0)); in splitMergedValStore()
19362 SDValue InsertVal = N->getOperand(1); in combineInsertEltToShuffle()
19363 SDValue Vec = N->getOperand(0); in combineInsertEltToShuffle()
19371 isa<ConstantSDNode>(InsertVal.getOperand(1))) { in combineInsertEltToShuffle()
19375 SDValue X = Vec.getOperand(0); in combineInsertEltToShuffle()
19376 SDValue Y = Vec.getOperand(1); in combineInsertEltToShuffle()
19381 SDValue InsertVal0 = InsertVal.getOperand(0); in combineInsertEltToShuffle()
19405 int Step = ArgVal.getOperand(0).getValueType().getVectorNumElements(); in combineInsertEltToShuffle()
19428 auto *ExtrIndex = cast<ConstantSDNode>(InsertVal.getOperand(1)); in combineInsertEltToShuffle()
19447 !InsertVal.getOperand(0).getValueType().isVector()) in combineInsertEltToShuffle()
19450 SDValue SubVec = InsertVal.getOperand(0); in combineInsertEltToShuffle()
19451 SDValue DestVec = N->getOperand(0); in combineInsertEltToShuffle()
19498 SDValue InVec = N->getOperand(0); in visitINSERT_VECTOR_ELT()
19499 SDValue InVal = N->getOperand(1); in visitINSERT_VECTOR_ELT()
19500 SDValue EltNo = N->getOperand(2); in visitINSERT_VECTOR_ELT()
19514 InVec == InVal.getOperand(0) && EltNo == InVal.getOperand(1)) in visitINSERT_VECTOR_ELT()
19545 InVal.getOperand(0).getValueType() == VT && in visitINSERT_VECTOR_ELT()
19546 isNullConstant(InVal.getOperand(1))) in visitINSERT_VECTOR_ELT()
19547 return InVal.getOperand(0); in visitINSERT_VECTOR_ELT()
19558 && isa<ConstantSDNode>(InVec.getOperand(2))) { in visitINSERT_VECTOR_ELT()
19563 InVec.getOperand(0), InVal, EltNo); in visitINSERT_VECTOR_ELT()
19566 VT, NewOp, InVec.getOperand(1), InVec.getOperand(2)); in visitINSERT_VECTOR_ELT()
19614 AddBuildVectorOp(Ops, CurVec.getOperand(I), I); in visitINSERT_VECTOR_ELT()
19620 AddBuildVectorOp(Ops, CurVec.getOperand(0), 0); in visitINSERT_VECTOR_ELT()
19626 if (auto *CurIdx = dyn_cast<ConstantSDNode>(CurVec.getOperand(2))) in visitINSERT_VECTOR_ELT()
19629 AddBuildVectorOp(Ops, CurVec.getOperand(1), Idx); in visitINSERT_VECTOR_ELT()
19635 CurVec = CurVec->getOperand(0); in visitINSERT_VECTOR_ELT()
19727 SDValue Vec = ExtElt->getOperand(0); in scalarizeExtractedBinop()
19728 SDValue Index = ExtElt->getOperand(1); in scalarizeExtractedBinop()
19741 SDValue Op0 = Vec.getOperand(0); in scalarizeExtractedBinop()
19742 SDValue Op1 = Vec.getOperand(1); in scalarizeExtractedBinop()
19761 SDValue VecOp = N->getOperand(0); in visitEXTRACT_VECTOR_ELT()
19762 SDValue Index = N->getOperand(1); in visitEXTRACT_VECTOR_ELT()
19774 Index == VecOp.getOperand(2)) { in visitEXTRACT_VECTOR_ELT()
19775 SDValue Elt = VecOp.getOperand(1); in visitEXTRACT_VECTOR_ELT()
19788 SDValue InOp = VecOp.getOperand(0); in visitEXTRACT_VECTOR_ELT()
19813 SDValue Elt = VecOp.getOperand(IndexVal); in visitEXTRACT_VECTOR_ELT()
19846 SDValue BCSrc = VecOp.getOperand(0); in visitEXTRACT_VECTOR_ELT()
19854 SDValue X = BCSrc.getOperand(0); in visitEXTRACT_VECTOR_ELT()
19890 SVInVec = VecOp.getOperand(0); in visitEXTRACT_VECTOR_ELT()
19892 SVInVec = VecOp.getOperand(1); in visitEXTRACT_VECTOR_ELT()
19897 SDValue InOp = SVInVec.getOperand(OrigElt); in visitEXTRACT_VECTOR_ELT()
19922 Use->getOperand(0) == VecOp && in visitEXTRACT_VECTOR_ELT()
19923 isa<ConstantSDNode>(Use->getOperand(1)); in visitEXTRACT_VECTOR_ELT()
19927 auto *CstElt = cast<ConstantSDNode>(Use->getOperand(1)); in visitEXTRACT_VECTOR_ELT()
19962 EVT BCVT = VecOp.getOperand(0).getValueType(); in visitEXTRACT_VECTOR_ELT()
19967 VecOp = VecOp.getOperand(0); in visitEXTRACT_VECTOR_ELT()
19993 VecOp.getOperand(0).getValueType() == ExtVT && in visitEXTRACT_VECTOR_ELT()
19994 ISD::isNormalLoad(VecOp.getOperand(0).getNode())) { in visitEXTRACT_VECTOR_ELT()
19999 LN0 = cast<LoadSDNode>(VecOp.getOperand(0)); in visitEXTRACT_VECTOR_ELT()
20017 VecOp = (Idx < (int)NumElts) ? VecOp.getOperand(0) : VecOp.getOperand(1); in visitEXTRACT_VECTOR_ELT()
20024 VecOp = VecOp.getOperand(0); in visitEXTRACT_VECTOR_ELT()
20035 VecOp.getOperand(0).getValueType().getVectorElementType()))) { in visitEXTRACT_VECTOR_ELT()
20045 EVT ConcatVT = VecOp.getOperand(0).getValueType(); in visitEXTRACT_VECTOR_ELT()
20050 SDValue ConcatOp = VecOp.getOperand(Elt / ConcatNumElts); in visitEXTRACT_VECTOR_ELT()
20093 SDValue In = N->getOperand(i); in reduceBuildVecExtToExtBuildVec()
20107 EVT InTy = In.getOperand(0).getValueType(); in reduceBuildVecExtToExtBuildVec()
20152 SDValue Cast = N->getOperand(i); in reduceBuildVecExtToExtBuildVec()
20160 In = Cast->getOperand(0); in reduceBuildVecExtToExtBuildVec()
20212 return Op.getOperand(0); in reduceBuildVecTruncToBitCast()
20219 SDValue In = PeekThroughBitcast(N->getOperand(i)); in reduceBuildVecTruncToBitCast()
20226 In = PeekThroughBitcast(In.getOperand(0)); in reduceBuildVecTruncToBitCast()
20237 SDValue part = PeekThroughBitcast(In.getOperand(0)); in reduceBuildVecTruncToBitCast()
20246 SDValue ShiftAmtVal = In.getOperand(1); in reduceBuildVecTruncToBitCast()
20361 unsigned ExtIndex = N->getOperand(i).getConstantOperandVal(1); in createBuildVecShuffle()
20392 SDValue Op = BV->getOperand(i); in reduceBuildVecToShuffleWithZero()
20411 SDValue Zext = BV->getOperand(ZextElt); in reduceBuildVecToShuffleWithZero()
20413 Zext.getOperand(0).getOpcode() != ISD::EXTRACT_VECTOR_ELT || in reduceBuildVecToShuffleWithZero()
20414 !isa<ConstantSDNode>(Zext.getOperand(0).getOperand(1)) || in reduceBuildVecToShuffleWithZero()
20420 SDValue Extract = Zext.getOperand(0); in reduceBuildVecToShuffleWithZero()
20424 Extract.getOperand(0).getValueSizeInBits() != VT.getSizeInBits()) in reduceBuildVecToShuffleWithZero()
20451 EVT VecVT = Extract.getOperand(0).getValueType(); in reduceBuildVecToShuffleWithZero()
20454 SDValue Shuf = TLI.buildLegalVectorShuffle(VecVT, DL, Extract.getOperand(0), in reduceBuildVecToShuffleWithZero()
20502 SDValue Op = N->getOperand(i); in reduceBuildVecToShuffle()
20519 !isa<ConstantSDNode>(Op.getOperand(1))) in reduceBuildVecToShuffle()
20521 SDValue ExtractedFromVec = Op.getOperand(0); in reduceBuildVecToShuffle()
20566 unsigned Index = N->getOperand(i).getConstantOperandVal(1); in reduceBuildVecToShuffle()
20694 L.use_empty() && L.getOperand(1).isUndef() && in reduceBuildVecToShuffle()
20695 L.getOperand(0).getValueType() == L.getValueType(); in reduceBuildVecToShuffle()
20698 L = L.getOperand(0); in reduceBuildVecToShuffle()
20703 R.use_empty() && R.getOperand(1).isUndef() && in reduceBuildVecToShuffle()
20704 R.getOperand(0).getValueType() == R.getValueType(); in reduceBuildVecToShuffle()
20707 R = R.getOperand(0); in reduceBuildVecToShuffle()
20740 SDValue Op0 = N->getOperand(0); in convertBuildVecZextToZext()
20745 Op.getOperand(0).getOpcode() == ISD::EXTRACT_VECTOR_ELT && in convertBuildVecZextToZext()
20746 Op0.getOperand(0).getOperand(0) == Op.getOperand(0).getOperand(0)) in convertBuildVecZextToZext()
20747 if (auto *C = dyn_cast<ConstantSDNode>(Op.getOperand(0).getOperand(1))) in convertBuildVecZextToZext()
20761 SDValue In = Op0.getOperand(0).getOperand(0); in convertBuildVecZextToZext()
20771 if ((Offset + i) != checkElem(N->getOperand(i))) in convertBuildVecZextToZext()
20777 Op0.getOperand(0).getOperand(1)); in convertBuildVecZextToZext()
20817 SDValue Op0 = N->getOperand(0); in visitBUILD_VECTOR()
20820 (Op0.getOperand(0) == Op.getOperand(0))) in visitBUILD_VECTOR()
20821 if (auto CNode = dyn_cast<ConstantSDNode>(Op.getOperand(1))) in visitBUILD_VECTOR()
20828 if (Offset + i != checkElem(N->getOperand(i))) { in visitBUILD_VECTOR()
20835 (Op0.getOperand(0).getValueType() == N->getValueType(0))) in visitBUILD_VECTOR()
20836 return Op0.getOperand(0); in visitBUILD_VECTOR()
20841 Op0.getOperand(0), Op0.getOperand(1)); in visitBUILD_VECTOR()
20869 EVT OpVT = N->getOperand(0).getValueType(); in combineConcatVectorOfScalars()
20887 !Op.getOperand(0).getValueType().isVector()) in combineConcatVectorOfScalars()
20888 Ops.push_back(Op.getOperand(0)); in combineConcatVectorOfScalars()
20944 SubVT = Op.getOperand(0).getValueType(); in combineConcatVectorOfConcatVectors()
20950 if (SubVT != Op.getOperand(0).getValueType()) in combineConcatVectorOfConcatVectors()
20972 EVT OpVT = N->getOperand(0).getValueType(); in combineConcatVectorOfExtracts()
20997 SDValue ExtVec = Op.getOperand(0); in combineConcatVectorOfExtracts()
21045 unsigned CastOpcode = N->getOperand(0).getOpcode(); in combineConcatVectorOfCasts()
21062 EVT SrcVT = N->getOperand(0).getOperand(0).getValueType(); in combineConcatVectorOfCasts()
21071 Op.getOperand(0).getValueType() != SrcVT) in combineConcatVectorOfCasts()
21073 SrcOps.push_back(Op.getOperand(0)); in combineConcatVectorOfCasts()
21110 return N->getOperand(0); in visitCONCAT_VECTORS()
21120 SDValue In = N->getOperand(0); in visitCONCAT_VECTORS()
21139 if (SVT == Scalar.getOperand(0).getValueType()) in visitCONCAT_VECTORS()
21140 Scalar = Scalar.getOperand(0); in visitCONCAT_VECTORS()
21150 TLI.isTypeLegal(Scalar->getOperand(0).getValueType())) in visitCONCAT_VECTORS()
21151 Scalar = Scalar->getOperand(0); in visitCONCAT_VECTORS()
21193 EVT OpSVT = Op.getOperand(0).getValueType(); in visitCONCAT_VECTORS()
21214 DAG.getNode(ISD::TRUNCATE, SDLoc(N), MinVT, Op.getOperand(i))); in visitCONCAT_VECTORS()
21250 N->getOperand(0).getValueType().getVectorMinNumElements(); in visitCONCAT_VECTORS()
21253 SDValue Op = N->getOperand(i); in visitCONCAT_VECTORS()
21264 if (Op.getOperand(0) != SingleSource) in visitCONCAT_VECTORS()
21267 SingleSource = Op.getOperand(0); in visitCONCAT_VECTORS()
21292 V.getOperand(1).getValueType() == SubVT && V.getOperand(2) == Index) { in getSubVectorSrc()
21293 return V.getOperand(1); in getSubVectorSrc()
21297 V.getOperand(0).getValueType() == SubVT && in getSubVectorSrc()
21300 return V.getOperand(SubIdx); in getSubVectorSrc()
21309 SDValue BinOp = Extract->getOperand(0); in narrowInsertExtractVectorBinOp()
21315 SDValue Bop0 = BinOp.getOperand(0), Bop1 = BinOp.getOperand(1); in narrowInsertExtractVectorBinOp()
21319 SDValue Index = Extract->getOperand(1); in narrowInsertExtractVectorBinOp()
21351 auto *ExtractIndexC = dyn_cast<ConstantSDNode>(Extract->getOperand(1)); in narrowExtractedVectorBinOp()
21358 SDValue BinOp = peekThroughBitcasts(Extract->getOperand(0)); in narrowExtractedVectorBinOp()
21367 auto *C = isConstOrConstSplatFP(BinOp.getOperand(0), /*AllowUndefs*/ true); in narrowExtractedVectorBinOp()
21411 BinOp.hasOneUse() && Extract->getOperand(0)->hasOneUse()) { in narrowExtractedVectorBinOp()
21416 BinOp.getOperand(0), NewExtIndex); in narrowExtractedVectorBinOp()
21418 BinOp.getOperand(1), NewExtIndex); in narrowExtractedVectorBinOp()
21441 return V.getOperand(ConcatOpNum); in narrowExtractedVectorBinOp()
21444 SDValue SubVecL = GetSubVector(peekThroughBitcasts(BinOp.getOperand(0))); in narrowExtractedVectorBinOp()
21445 SDValue SubVecR = GetSubVector(peekThroughBitcasts(BinOp.getOperand(1))); in narrowExtractedVectorBinOp()
21457 BinOp.getOperand(0), IndexC); in narrowExtractedVectorBinOp()
21461 BinOp.getOperand(1), IndexC); in narrowExtractedVectorBinOp()
21478 auto *Ld = dyn_cast<LoadSDNode>(Extract->getOperand(0)); in narrowExtractedVectorLoad()
21541 SDValue N0 = N->getOperand(0); in foldExtractSubvectorFromShuffleVector()
21607 SDValue Op = WideShuffleVector->getOperand(WideShufOpIdx); in foldExtractSubvectorFromShuffleVector()
21679 SDValue V = N->getOperand(0); in visitEXTRACT_SUBVECTOR()
21693 if (TLI.isExtractSubvectorCheap(NVT, V.getOperand(0).getValueType(), in visitEXTRACT_SUBVECTOR()
21696 return DAG.getNode(ISD::EXTRACT_SUBVECTOR, SDLoc(N), NVT, V.getOperand(0), in visitEXTRACT_SUBVECTOR()
21697 V.getOperand(1)); in visitEXTRACT_SUBVECTOR()
21703 if (DAG.isConstantValueOfAnyType(V.getOperand(0)) || V.hasOneUse()) in visitEXTRACT_SUBVECTOR()
21705 return DAG.getSplatVector(NVT, SDLoc(N), V.getOperand(0)); in visitEXTRACT_SUBVECTOR()
21710 V.getOperand(0).getValueType().isVector() && in visitEXTRACT_SUBVECTOR()
21712 SDValue SrcOp = V.getOperand(0); in visitEXTRACT_SUBVECTOR()
21725 V.getOperand(0), NewIndex); in visitEXTRACT_SUBVECTOR()
21744 V.getOperand(0), NewIndex); in visitEXTRACT_SUBVECTOR()
21752 V.getOperand(0), NewIndex); in visitEXTRACT_SUBVECTOR()
21762 EVT ConcatSrcVT = V.getOperand(0).getValueType(); in visitEXTRACT_SUBVECTOR()
21775 return V.getOperand(ConcatOpIdx); in visitEXTRACT_SUBVECTOR()
21792 V.getOperand(ConcatOpIdx), NewIndexC); in visitEXTRACT_SUBVECTOR()
21821 SDValue Src = V->getOperand(IdxVal); in visitEXTRACT_SUBVECTOR()
21838 EVT SmallVT = V.getOperand(1).getValueType(); in visitEXTRACT_SUBVECTOR()
21853 return DAG.getBitcast(NVT, V.getOperand(1)); in visitEXTRACT_SUBVECTOR()
21857 DAG.getBitcast(N->getOperand(0).getValueType(), V.getOperand(0)), in visitEXTRACT_SUBVECTOR()
21858 N->getOperand(1)); in visitEXTRACT_SUBVECTOR()
21876 SDValue N0 = Shuf->getOperand(0), N1 = Shuf->getOperand(1); in foldShuffleOfConcatUndefs()
21879 !N0.getOperand(1).isUndef() || !N1.getOperand(1).isUndef()) in foldShuffleOfConcatUndefs()
21913 SDValue X = N0.getOperand(0), Y = N1.getOperand(0); in foldShuffleOfConcatUndefs()
21926 SDValue N0 = N->getOperand(0); in partitionShuffleOfConcats()
21927 SDValue N1 = N->getOperand(1); in partitionShuffleOfConcats()
21932 EVT ConcatVT = N0.getOperand(0).getValueType(); in partitionShuffleOfConcats()
21944 N0 = DAG.getVectorShuffle(ConcatVT, SDLoc(N), N0.getOperand(0), in partitionShuffleOfConcats()
21945 N0.getOperand(1), in partitionShuffleOfConcats()
21977 Ops.push_back(N0.getOperand(OpIdx)); in partitionShuffleOfConcats()
21979 Ops.push_back(N1.getOperand(OpIdx - N0.getNumOperands())); in partitionShuffleOfConcats()
22006 SDValue N0 = SVN->getOperand(0); in combineShuffleOfScalars()
22007 SDValue N1 = SVN->getOperand(1); in combineShuffleOfScalars()
22043 Op = S.getOperand(Idx); in combineShuffleOfScalars()
22045 SDValue Op0 = S.getOperand(0); in combineShuffleOfScalars()
22097 SDValue N0 = SVN->getOperand(0); in combineShuffleToVectorExtend()
22149 SDValue N0 = peekThroughBitcasts(SVN->getOperand(0)); in combineTruncationShuffle()
22157 SDValue N00 = N0.getOperand(0); in combineTruncationShuffle()
22203 if (!Shuf->getOperand(1).isUndef()) in combineShuffleOfSplatVal()
22209 if (DAG.isSplatValue(Shuf->getOperand(0), /*AllowUndefs*/ false)) in combineShuffleOfSplatVal()
22210 return Shuf->getOperand(0); in combineShuffleOfSplatVal()
22212 auto *Splat = dyn_cast<ShuffleVectorSDNode>(Shuf->getOperand(0)); in combineShuffleOfSplatVal()
22245 return Shuf->getOperand(0); in combineShuffleOfSplatVal()
22254 Splat->getOperand(0), Splat->getOperand(1), in combineShuffleOfSplatVal()
22264 SDValue Op0 = SVN->getOperand(0); in combineShuffleOfBitcast()
22265 SDValue Op1 = SVN->getOperand(1); in combineShuffleOfBitcast()
22269 EVT InVT = Op0.getOperand(0).getValueType(); in combineShuffleOfBitcast()
22272 Op1.getOperand(0).getValueType() != InVT))) in combineShuffleOfBitcast()
22274 if (isAnyConstantBuildVector(Op0.getOperand(0)) && in combineShuffleOfBitcast()
22275 (Op1.isUndef() || isAnyConstantBuildVector(Op1.getOperand(0)))) in combineShuffleOfBitcast()
22299 Op0 = Op0.getOperand(0); in combineShuffleOfBitcast()
22300 Op1 = Op1.isUndef() ? DAG.getUNDEF(InVT) : Op1.getOperand(0); in combineShuffleOfBitcast()
22309 if (!OuterShuf->getOperand(1).isUndef()) in formSplatFromShuffles()
22311 auto *InnerShuf = dyn_cast<ShuffleVectorSDNode>(OuterShuf->getOperand(0)); in formSplatFromShuffles()
22312 if (!InnerShuf || !InnerShuf->getOperand(1).isUndef()) in formSplatFromShuffles()
22352 return DAG.getVectorShuffle(VT, SDLoc(OuterShuf), InnerShuf->getOperand(0), in formSplatFromShuffles()
22353 InnerShuf->getOperand(1), CombinedMask); in formSplatFromShuffles()
22390 SDValue Op0 = Shuf->getOperand(0); in replaceShuffleOfInsert()
22391 SDValue Op1 = Shuf->getOperand(1); in replaceShuffleOfInsert()
22414 auto *InsIndexC = dyn_cast<ConstantSDNode>(Op0.getOperand(2)); in replaceShuffleOfInsert()
22430 Op1, Op0.getOperand(1), NewInsIndex); in replaceShuffleOfInsert()
22439 auto *Shuf0 = dyn_cast<ShuffleVectorSDNode>(Shuf->getOperand(0)); in simplifyShuffleOfShuffle()
22440 if (!Shuf0 || !Shuf->getOperand(1).isUndef()) in simplifyShuffleOfShuffle()
22458 return Shuf->getOperand(0); in simplifyShuffleOfShuffle()
22465 SDValue N0 = N->getOperand(0); in visitVECTOR_SHUFFLE()
22466 SDValue N1 = N->getOperand(1); in visitVECTOR_SHUFFLE()
22519 SDValue L = N0.getOperand(0), R = N0.getOperand(1); in visitVECTOR_SHUFFLE()
22537 return DAG.getSplatBuildVector(VT, SDLoc(N), N0.getOperand(0)); in visitVECTOR_SHUFFLE()
22540 if (auto *Idx = dyn_cast<ConstantSDNode>(N0.getOperand(2))) in visitVECTOR_SHUFFLE()
22542 return DAG.getSplatBuildVector(VT, SDLoc(N), N0.getOperand(1)); in visitVECTOR_SHUFFLE()
22550 SDValue ConvInput = V->getOperand(0); in visitVECTOR_SHUFFLE()
22562 if (!V->getOperand(i).isUndef()) { in visitVECTOR_SHUFFLE()
22563 Base = V->getOperand(i); in visitVECTOR_SHUFFLE()
22571 if (V->getOperand(i) != Base) { in visitVECTOR_SHUFFLE()
22581 SDValue Splatted = V->getOperand(SplatIndex); in visitVECTOR_SHUFFLE()
22614 N0.getOperand(0).getValueType() == N1.getOperand(0).getValueType()))) { in visitVECTOR_SHUFFLE()
22624 N0.getOperand(0) == N0.getOperand(1)) { in visitVECTOR_SHUFFLE()
22636 SDValue UndefVec = DAG.getUNDEF(N0.getOperand(0).getValueType()); in visitVECTOR_SHUFFLE()
22638 N0.getOperand(0), UndefVec); in visitVECTOR_SHUFFLE()
22652 EVT SubVT = RHS.getOperand(0).getValueType(); in visitVECTOR_SHUFFLE()
22689 RHS.getOperand(SubVec), in visitVECTOR_SHUFFLE()
22806 SDValue SV0 = BC0->getOperand(0); in visitVECTOR_SHUFFLE()
22807 SDValue SV1 = BC0->getOperand(1); in visitVECTOR_SHUFFLE()
22868 CurrentVec = (Idx < (int)NumElts) ? OtherSVN->getOperand(0) in visitVECTOR_SHUFFLE()
22869 : OtherSVN->getOperand(1); in visitVECTOR_SHUFFLE()
22908 ? CurrentSVN->getOperand(0) in visitVECTOR_SHUFFLE()
22909 : CurrentSVN->getOperand(1); in visitVECTOR_SHUFFLE()
22956 assert(N1->getOperand(0).getValueType() == VT && in visitVECTOR_SHUFFLE()
22959 SDValue SV0 = N1->getOperand(0); in visitVECTOR_SHUFFLE()
22960 SDValue SV1 = N1->getOperand(1); in visitVECTOR_SHUFFLE()
22985 if (N->getOperand(i).getOpcode() == ISD::VECTOR_SHUFFLE && in visitVECTOR_SHUFFLE()
22986 N->isOnlyUserOf(N->getOperand(i).getNode())) { in visitVECTOR_SHUFFLE()
22989 auto *OtherSV = cast<ShuffleVectorSDNode>(N->getOperand(i)); in visitVECTOR_SHUFFLE()
22990 assert(OtherSV->getOperand(0).getValueType() == VT && in visitVECTOR_SHUFFLE()
22995 if (MergeInnerShuffle(i != 0, SVN, OtherSV, N->getOperand(1 - i), TLI, in visitVECTOR_SHUFFLE()
23017 SDValue Op00 = N0.getOperand(0); in visitVECTOR_SHUFFLE()
23018 SDValue Op01 = N0.getOperand(1); in visitVECTOR_SHUFFLE()
23019 SDValue Op10 = N1.isUndef() ? N1 : N1.getOperand(0); in visitVECTOR_SHUFFLE()
23020 SDValue Op11 = N1.isUndef() ? N1 : N1.getOperand(1); in visitVECTOR_SHUFFLE()
23093 SDValue InVal = N->getOperand(0); in visitSCALAR_TO_VECTOR()
23100 InVal->getOperand(0).getValueType().isFixedLengthVector()) { in visitSCALAR_TO_VECTOR()
23101 SDValue InVec = InVal->getOperand(0); in visitSCALAR_TO_VECTOR()
23102 SDValue EltNo = InVal->getOperand(1); in visitSCALAR_TO_VECTOR()
23146 SDValue N0 = N->getOperand(0); in visitINSERT_SUBVECTOR()
23147 SDValue N1 = N->getOperand(1); in visitINSERT_SUBVECTOR()
23148 SDValue N2 = N->getOperand(2); in visitINSERT_SUBVECTOR()
23158 N1.getOperand(1) == N2 && N1.getOperand(0).getValueType() == VT) in visitINSERT_SUBVECTOR()
23159 return N1.getOperand(0); in visitINSERT_SUBVECTOR()
23164 return DAG.getNode(ISD::SPLAT_VECTOR, SDLoc(N), VT, N1.getOperand(0)); in visitINSERT_SUBVECTOR()
23171 N1.getOperand(0).getOpcode() == ISD::EXTRACT_SUBVECTOR && in visitINSERT_SUBVECTOR()
23172 N1.getOperand(0).getOperand(1) == N2 && in visitINSERT_SUBVECTOR()
23173 N1.getOperand(0).getOperand(0).getValueType().getVectorElementCount() == in visitINSERT_SUBVECTOR()
23175 N1.getOperand(0).getOperand(0).getValueType().getSizeInBits() == in visitINSERT_SUBVECTOR()
23177 return DAG.getBitcast(VT, N1.getOperand(0).getOperand(0)); in visitINSERT_SUBVECTOR()
23185 SDValue CN0 = N0.getOperand(0); in visitINSERT_SUBVECTOR()
23186 SDValue CN1 = N1.getOperand(0); in visitINSERT_SUBVECTOR()
23202 N0.getOperand(1).getValueType() == N1.getValueType() && in visitINSERT_SUBVECTOR()
23203 N0.getOperand(2) == N2) in visitINSERT_SUBVECTOR()
23204 return DAG.getNode(ISD::INSERT_SUBVECTOR, SDLoc(N), VT, N0.getOperand(0), in visitINSERT_SUBVECTOR()
23211 N1.getOperand(0).isUndef() && isNullConstant(N1.getOperand(2))) in visitINSERT_SUBVECTOR()
23213 N1.getOperand(1), N2); in visitINSERT_SUBVECTOR()
23257 N1.getValueType() == N0.getOperand(1).getValueType()) { in visitINSERT_SUBVECTOR()
23262 N0.getOperand(0), N1, N2); in visitINSERT_SUBVECTOR()
23265 VT, NewOp, N0.getOperand(1), N0.getOperand(2)); in visitINSERT_SUBVECTOR()
23272 N0.getOperand(0).getValueType() == N1.getValueType() && in visitINSERT_SUBVECTOR()
23273 N0.getOperand(0).getValueType().isScalableVector() == in visitINSERT_SUBVECTOR()
23289 SDValue N0 = N->getOperand(0); in visitFP_TO_FP16()
23293 return N0->getOperand(0); in visitFP_TO_FP16()
23299 SDValue N0 = N->getOperand(0); in visitFP16_TO_FP()
23303 ConstantSDNode *AndConst = getAsNonOpaqueConstant(N0.getOperand(1)); in visitFP16_TO_FP()
23306 N0.getOperand(0)); in visitFP16_TO_FP()
23314 SDValue N0 = N->getOperand(0); in visitFP_TO_BF16()
23318 return N0->getOperand(0); in visitFP_TO_BF16()
23324 SDValue N0 = N->getOperand(0); in visitVECREDUCE()
23353 TLI.isTypeLegal(N0.getOperand(1).getValueType())) { in visitVECREDUCE()
23354 SDValue Vec = N0.getOperand(0); in visitVECREDUCE()
23355 SDValue Subvec = N0.getOperand(1); in visitVECREDUCE()
23357 (N0.getOperand(0).isUndef() || isNullOrNullSplat(Vec))) || in visitVECREDUCE()
23359 (N0.getOperand(0).isUndef() || isAllOnesOrAllOnesSplat(Vec)))) in visitVECREDUCE()
23372 AreAllEltsDisabled |= isNullConstant(N->getOperand(*EVLIdx)); in visitVPOp()
23375 ISD::isConstantSplatVectorAllZeros(N->getOperand(*MaskIdx).getNode()); in visitVPOp()
23395 return N->getOperand(0); in visitVPOp()
23408 SDValue LHS = N->getOperand(0); in XformToShuffleWithZero()
23409 SDValue RHS = peekThroughBitcasts(N->getOperand(1)); in XformToShuffleWithZero()
23434 SDValue Elt = RHS.getOperand(EltIdx); in XformToShuffleWithZero()
23493 SDValue N0 = N->getOperand(0); in scalarizeBinOpOfSplats()
23494 SDValue N1 = N->getOperand(1); in scalarizeBinOpOfSplats()
23546 SDValue LHS = N->getOperand(0); in SimplifyVBinOp()
23547 SDValue RHS = N->getOperand(1); in SimplifyVBinOp()
23564 LHS.getOperand(1).isUndef() && RHS.getOperand(1).isUndef() && in SimplifyVBinOp()
23566 SDValue NewBinOp = DAG.getNode(Opcode, DL, VT, LHS.getOperand(0), in SimplifyVBinOp()
23567 RHS.getOperand(0), Flags); in SimplifyVBinOp()
23568 SDValue UndefV = LHS.getOperand(1); in SimplifyVBinOp()
23579 Shuf0->hasOneUse() && Shuf0->getOperand(1).isUndef() && in SimplifyVBinOp()
23580 Shuf0->getOperand(0).getOpcode() != ISD::INSERT_VECTOR_ELT) { in SimplifyVBinOp()
23582 SDValue X = Shuf0->getOperand(0); in SimplifyVBinOp()
23588 Shuf1->hasOneUse() && Shuf1->getOperand(1).isUndef() && in SimplifyVBinOp()
23589 Shuf1->getOperand(0).getOpcode() != ISD::INSERT_VECTOR_ELT) { in SimplifyVBinOp()
23591 SDValue X = Shuf1->getOperand(0); in SimplifyVBinOp()
23602 if (LHS.getOpcode() == ISD::INSERT_SUBVECTOR && LHS.getOperand(0).isUndef() && in SimplifyVBinOp()
23603 RHS.getOpcode() == ISD::INSERT_SUBVECTOR && RHS.getOperand(0).isUndef() && in SimplifyVBinOp()
23604 LHS.getOperand(2) == RHS.getOperand(2) && in SimplifyVBinOp()
23606 SDValue X = LHS.getOperand(1); in SimplifyVBinOp()
23607 SDValue Y = RHS.getOperand(1); in SimplifyVBinOp()
23608 SDValue Z = LHS.getOperand(2); in SimplifyVBinOp()
23637 EVT NarrowVT = LHS.getOperand(0).getValueType(); in SimplifyVBinOp()
23638 if (NarrowVT == RHS.getOperand(0).getValueType() && in SimplifyVBinOp()
23644 ConcatOps.push_back(DAG.getNode(Opcode, DL, NarrowVT, LHS.getOperand(i), in SimplifyVBinOp()
23645 RHS.getOperand(i))); in SimplifyVBinOp()
23662 SDValue SCC = SimplifySelectCC(DL, N0.getOperand(0), N0.getOperand(1), N1, N2, in SimplifySelect()
23663 cast<CondCodeSDNode>(N0.getOperand(2))->get()); in SimplifySelect()
23675 SCC.getOperand(0), SCC.getOperand(1), in SimplifySelect()
23676 SCC.getOperand(4), Flags); in SimplifySelect()
23679 SCC.getOperand(2), SCC.getOperand(3)); in SimplifySelect()
23707 CC = cast<CondCodeSDNode>(TheSelect->getOperand(4))->get(); in SimplifySelectOps()
23708 CmpLHS = TheSelect->getOperand(0); in SimplifySelectOps()
23709 Zero = isConstOrConstSplatFP(TheSelect->getOperand(1)); in SimplifySelectOps()
23712 SDValue Cmp = TheSelect->getOperand(0); in SimplifySelectOps()
23714 CC = cast<CondCodeSDNode>(Cmp.getOperand(2))->get(); in SimplifySelectOps()
23715 CmpLHS = Cmp.getOperand(0); in SimplifySelectOps()
23716 Zero = isConstOrConstSplatFP(Cmp.getOperand(1)); in SimplifySelectOps()
23720 Sqrt.getOperand(0) == CmpLHS && (CC == ISD::SETOLT || in SimplifySelectOps()
23729 if (TheSelect->getOperand(0).getValueType().isVector()) return false; in SimplifySelectOps()
23746 if (LHS.getOperand(0) != RHS.getOperand(0) || in SimplifySelectOps()
23805 SDNode *CondNode = TheSelect->getOperand(0).getNode(); in SimplifySelectOps()
23816 TheSelect->getOperand(0), LLD->getBasePtr(), in SimplifySelectOps()
23825 SDNode *CondLHS = TheSelect->getOperand(0).getNode(); in SimplifySelectOps()
23826 SDNode *CondRHS = TheSelect->getOperand(1).getNode(); in SimplifySelectOps()
23838 TheSelect->getOperand(0), in SimplifySelectOps()
23839 TheSelect->getOperand(1), in SimplifySelectOps()
23841 TheSelect->getOperand(4)); in SimplifySelectOps()
23956 SDValue N0 = N->getOperand(0); in foldSelectOfBinops()
23957 SDValue N1 = N->getOperand(1); in foldSelectOfBinops()
23958 SDValue N2 = N->getOperand(2); in foldSelectOfBinops()
23979 if (N1.getOperand(1) == N2.getOperand(1)) { in foldSelectOfBinops()
23981 DAG.getSelect(DL, VT, N0, N1.getOperand(0), N2.getOperand(0)); in foldSelectOfBinops()
23982 SDValue NewBinOp = DAG.getNode(BinOpc, DL, OpVTs, NewSel, N1.getOperand(1)); in foldSelectOfBinops()
23991 if (N1.getOperand(0) == N2.getOperand(0) && in foldSelectOfBinops()
23992 VT == N1.getOperand(1).getValueType() && in foldSelectOfBinops()
23993 VT == N2.getOperand(1).getValueType()) { in foldSelectOfBinops()
23995 DAG.getSelect(DL, VT, N0, N1.getOperand(1), N2.getOperand(1)); in foldSelectOfBinops()
23996 SDValue NewBinOp = DAG.getNode(BinOpc, DL, OpVTs, N1.getOperand(0), NewSel); in foldSelectOfBinops()
24008 SDValue N0 = N->getOperand(0); in foldSignChangeInBitcast()
24016 SDValue Int = N0.getOperand(0); in foldSignChangeInBitcast()
24143 SDValue AndLHS = N0->getOperand(0); in SimplifySelectCC()
24144 auto *ConstAndRHS = dyn_cast<ConstantSDNode>(N0->getOperand(1)); in SimplifySelectCC()
24236 N0 == Count.getOperand(0) && in SimplifySelectCC()
24243 N0 == Count.getOperand(0) && in SimplifySelectCC()
24304 ConstantSDNode *C = isConstOrConstSplat(N->getOperand(1)); in BuildSDIVPow2()
24345 ConstantSDNode *C = isConstOrConstSplat(N->getOperand(1)); in BuildSREMPow2()
24607 return {false /*isVolatile*/, /*isAtomic*/ false, LN->getOperand(1), in mayAlias()
24741 C = C.getOperand(0); in GatherAllAliases()
24750 C = C.getOperand(0); in GatherAllAliases()
24759 C = C.getOperand(0); in GatherAllAliases()
24801 Chains.push_back(Chain.getOperand(--n)); in GatherAllAliases()
24944 S, BetterChain, S->getOperand(1), S->getOperand(2), S->getOperand(3))); in parallelizeChainedStores()
24966 return ST->getOperand(0) != NewChain; in parallelizeChainedStores()