Lines Matching defs:Op

67   bool SelectInlineAsmMemoryOperand(const SDValue &Op,
185 SDValue Op = N->getOperand(0);
186 EVT VT = Op.getValueType();
188 if (ShtAmt > VT.getScalarSizeInBits() / 2 || Op.getOpcode() != ISD::ADD)
192 if (Op.getOperand(1).getOpcode() == AArch64ISD::MOVIshift)
194 Op.getOperand(1).getConstantOperandVal(0)
195 << Op.getOperand(1).getConstantOperandVal(1));
196 else if (Op.getOperand(1).getOpcode() == AArch64ISD::DUP &&
197 isa<ConstantSDNode>(Op.getOperand(1).getOperand(0)))
199 Op.getOperand(1).getConstantOperandVal(0));
206 Res1 = Op.getOperand(0);
396 unsigned Op);
398 unsigned Op, unsigned MaxIdx, unsigned Scale,
563 const SDValue &Op, const InlineAsm::ConstraintCode ConstraintID,
575 SDLoc dl(Op);
579 dl, Op.getValueType(),
580 Op, RC), 0);
2069 unsigned Op) {
2080 SDNode *Intrinsic = CurDAG->getMachineNode(Op, DL, MVT::Untyped, Ops);
2118 unsigned BaseReg, unsigned Op) {
2138 SDNode *Mov = CurDAG->getMachineNode(Op, DL, {MVT::Untyped, MVT::Other}, Ops);
2152 unsigned Op, unsigned MaxIdx,
2174 SDNode *Mov = CurDAG->getMachineNode(Op, DL, {MVT::Untyped, MVT::Other}, Ops);
2592 SDValue Op = N->getOperand(0);
2593 if (Op->getOpcode() == ISD::TRUNCATE) {
2594 Op = Op->getOperand(0);
2595 VT = Op->getValueType(0);
2600 if (!isOpcWithIntImmediate(Op.getNode(), ISD::SRL, ShiftImm) &&
2601 !isOpcWithIntImmediate(Op.getNode(), ISD::SRA, ShiftImm))
2609 Opd0 = Op.getOperand(0);
2731 SDValue Op = N->getOperand(0);
2732 if (!isOpcWithIntImmediate(Op.getNode(), ISD::SRA, ShiftImm))
2737 SDValue Opd0 = Widen(CurDAG, Op.getOperand(0));
2849 static void getUsefulBits(SDValue Op, APInt &UsefulBits, unsigned Depth = 0);
2851 static void getUsefulBitsFromAndWithImmediate(SDValue Op, APInt &UsefulBits,
2854 cast<const ConstantSDNode>(Op.getOperand(1).getNode())->getZExtValue();
2857 getUsefulBits(Op, UsefulBits, Depth + 1);
2860 static void getUsefulBitsFromBitfieldMoveOpd(SDValue Op, APInt &UsefulBits,
2871 getUsefulBits(Op, OpUsefulBits, Depth + 1);
2879 getUsefulBits(Op, OpUsefulBits, Depth + 1);
2887 static void getUsefulBitsFromUBFM(SDValue Op, APInt &UsefulBits,
2890 cast<const ConstantSDNode>(Op.getOperand(1).getNode())->getZExtValue();
2892 cast<const ConstantSDNode>(Op.getOperand(2).getNode())->getZExtValue();
2894 getUsefulBitsFromBitfieldMoveOpd(Op, UsefulBits, Imm, MSB, Depth);
2897 static void getUsefulBitsFromOrWithShiftedReg(SDValue Op, APInt &UsefulBits,
2900 cast<const ConstantSDNode>(Op.getOperand(2).getNode())->getZExtValue();
2909 getUsefulBits(Op, Mask, Depth + 1);
2917 getUsefulBits(Op, Mask, Depth + 1);
2925 static void getUsefulBitsFromBFM(SDValue Op, SDValue Orig, APInt &UsefulBits,
2928 cast<const ConstantSDNode>(Op.getOperand(2).getNode())->getZExtValue();
2930 cast<const ConstantSDNode>(Op.getOperand(3).getNode())->getZExtValue();
2939 getUsefulBits(Op, ResultUsefulBits, Depth + 1);
2949 if (Op.getOperand(1) == Orig) {
2955 if (Op.getOperand(0) == Orig)
2967 if (Op.getOperand(1) == Orig) {
2973 if (Op.getOperand(0) == Orig)
3028 static void getUsefulBits(SDValue Op, APInt &UsefulBits, unsigned Depth) {
3033 unsigned Bitwidth = Op.getScalarValueSizeInBits();
3040 for (SDNode *Node : Op.getNode()->users()) {
3043 getUsefulBitsForUse(Node, UsefulBitsForUse, Op, Depth);
3052 /// Create a machine node performing a notional SHL of Op by ShlAmount. If
3054 /// 0, return Op unchanged.
3055 static SDValue getLeftShift(SelectionDAG *CurDAG, SDValue Op, int ShlAmount) {
3057 return Op;
3059 EVT VT = Op.getValueType();
3060 SDLoc dl(Op);
3068 UBFMOpc, dl, VT, Op,
3076 UBFMOpc, dl, VT, Op, CurDAG->getTargetConstant(ShrAmount, dl, VT),
3084 static bool isBitfieldPositioningOpFromAnd(SelectionDAG *CurDAG, SDValue Op,
3091 static bool isBitfieldPositioningOpFromShl(SelectionDAG *CurDAG, SDValue Op,
3099 static bool isBitfieldPositioningOp(SelectionDAG *CurDAG, SDValue Op,
3102 EVT VT = Op.getValueType();
3107 KnownBits Known = CurDAG->computeKnownBits(Op);
3115 switch (Op.getOpcode()) {
3119 return isBitfieldPositioningOpFromAnd(CurDAG, Op, BiggerPattern,
3122 return isBitfieldPositioningOpFromShl(CurDAG, Op, BiggerPattern,
3129 static bool isBitfieldPositioningOpFromAnd(SelectionDAG *CurDAG, SDValue Op,
3136 EVT VT = Op.getValueType();
3142 if (!isOpcWithIntImmediate(Op.getNode(), ISD::AND, AndImm))
3154 SDValue AndOp0 = Op.getOperand(0);
3194 // - For "(and (any_extend(shl val, N)), shifted-mask)", the`and` Op
3196 // `any_extend` Op (undefined higher bits) indicates missed combination
3219 static bool isSeveralBitsPositioningOpFromShl(const uint64_t ShlImm, SDValue Op,
3224 assert(Op.getOpcode() == ISD::SHL &&
3225 "Op.getNode() should be a SHL node to call this function");
3226 assert(isIntImmediateEq(Op.getOperand(1), ShlImm) &&
3227 "Op.getNode() should shift ShlImm to call this function");
3230 SDValue Op0 = Op.getOperand(0);
3251 static bool isBitfieldPositioningOpFromShl(SelectionDAG *CurDAG, SDValue Op,
3258 EVT VT = Op.getValueType();
3264 if (!isOpcWithIntImmediate(Op.getNode(), ISD::SHL, ShlImm))
3267 if (!BiggerPattern && !Op.hasOneUse())
3270 if (isSeveralBitsPositioningOpFromShl(ShlImm, Op, Src, DstLSB, Width))
3279 Src = getLeftShift(CurDAG, Op.getOperand(0), ShlImm - DstLSB);
4748 unsigned Op =
4754 SDNode *Ld = CurDAG->getMachineNode(Op, DL, MVT::i64, MVT::i64,
4766 unsigned Op =
4777 SDNode *St = CurDAG->getMachineNode(Op, DL, MVT::i32, MVT::Other, Ops);
5652 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5656 SelectDestructiveMultiIntrinsic(Node, 2, false, Op);
5659 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5663 SelectDestructiveMultiIntrinsic(Node, 4, false, Op);
5666 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5670 SelectDestructiveMultiIntrinsic(Node, 2, false, Op);
5673 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5677 SelectDestructiveMultiIntrinsic(Node, 4, false, Op);
5680 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5684 SelectDestructiveMultiIntrinsic(Node, 2, true, Op);
5687 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5691 SelectDestructiveMultiIntrinsic(Node, 4, true, Op);
5694 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5698 SelectDestructiveMultiIntrinsic(Node, 2, true, Op);
5701 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5705 SelectDestructiveMultiIntrinsic(Node, 4, true, Op);
5708 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5712 SelectDestructiveMultiIntrinsic(Node, 2, false, Op);
5715 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5719 SelectDestructiveMultiIntrinsic(Node, 4, false, Op);
5722 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5726 SelectDestructiveMultiIntrinsic(Node, 2, true, Op);
5729 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5733 SelectDestructiveMultiIntrinsic(Node, 4, true, Op);
5736 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
5740 SelectDestructiveMultiIntrinsic(Node, 2, false, Op);
5743 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
5747 SelectDestructiveMultiIntrinsic(Node, 4, false, Op);
5750 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
5754 SelectDestructiveMultiIntrinsic(Node, 2, true, Op);
5757 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
5761 SelectDestructiveMultiIntrinsic(Node, 4, true, Op);
5764 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int1>(
5768 SelectWhilePair(Node, Op);
5771 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int1>(
5775 SelectWhilePair(Node, Op);
5778 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int1>(
5782 SelectWhilePair(Node, Op);
5785 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int1>(
5789 SelectWhilePair(Node, Op);
5792 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int1>(
5796 SelectWhilePair(Node, Op);
5799 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int1>(
5803 SelectWhilePair(Node, Op);
5806 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int1>(
5810 SelectWhilePair(Node, Op);
5813 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int1>(
5817 SelectWhilePair(Node, Op);
5820 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5824 SelectDestructiveMultiIntrinsic(Node, 2, false, Op);
5827 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5831 SelectDestructiveMultiIntrinsic(Node, 2, false, Op);
5834 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
5838 SelectDestructiveMultiIntrinsic(Node, 2, false, Op);
5841 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5845 SelectDestructiveMultiIntrinsic(Node, 4, false, Op);
5848 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5852 SelectDestructiveMultiIntrinsic(Node, 4, false, Op);
5855 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
5859 SelectDestructiveMultiIntrinsic(Node, 4, false, Op);
5862 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5866 SelectDestructiveMultiIntrinsic(Node, 2, false, Op);
5869 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5873 SelectDestructiveMultiIntrinsic(Node, 2, false, Op);
5876 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
5880 SelectDestructiveMultiIntrinsic(Node, 2, false, Op);
5883 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5887 SelectDestructiveMultiIntrinsic(Node, 4, false, Op);
5890 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5894 SelectDestructiveMultiIntrinsic(Node, 4, false, Op);
5897 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
5901 SelectDestructiveMultiIntrinsic(Node, 4, false, Op);
5904 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5908 SelectDestructiveMultiIntrinsic(Node, 2, true, Op);
5911 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5915 SelectDestructiveMultiIntrinsic(Node, 2, true, Op);
5918 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
5922 SelectDestructiveMultiIntrinsic(Node, 2, true, Op);
5925 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5929 SelectDestructiveMultiIntrinsic(Node, 4, true, Op);
5932 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5936 SelectDestructiveMultiIntrinsic(Node, 4, true, Op);
5939 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
5943 SelectDestructiveMultiIntrinsic(Node, 4, true, Op);
5946 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
5950 SelectDestructiveMultiIntrinsic(Node, 2, true, Op);
5953 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
5957 SelectDestructiveMultiIntrinsic(Node, 4, true, Op);
5960 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
5964 SelectDestructiveMultiIntrinsic(Node, 2, true, Op);
5967 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
5971 SelectDestructiveMultiIntrinsic(Node, 4, true, Op);
5974 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5978 SelectDestructiveMultiIntrinsic(Node, 2, true, Op);
5981 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5985 SelectDestructiveMultiIntrinsic(Node, 2, true, Op);
5988 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
5992 SelectDestructiveMultiIntrinsic(Node, 2, true, Op);
5995 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
5999 SelectDestructiveMultiIntrinsic(Node, 4, true, Op);
6002 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
6006 SelectDestructiveMultiIntrinsic(Node, 4, true, Op);
6009 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
6013 SelectDestructiveMultiIntrinsic(Node, 4, true, Op);
6016 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
6020 SelectDestructiveMultiIntrinsic(Node, 2, false, Op);
6023 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
6027 SelectDestructiveMultiIntrinsic(Node, 4, false, Op);
6030 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
6034 SelectDestructiveMultiIntrinsic(Node, 2, false, Op);
6037 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
6041 SelectDestructiveMultiIntrinsic(Node, 4, false, Op);
6044 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
6048 SelectDestructiveMultiIntrinsic(Node, 2, true, Op);
6051 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
6055 SelectDestructiveMultiIntrinsic(Node, 4, true, Op);
6058 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
6062 SelectDestructiveMultiIntrinsic(Node, 2, true, Op);
6065 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
6069 SelectDestructiveMultiIntrinsic(Node, 4, true, Op);
6102 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
6106 SelectClamp(Node, 2, Op);
6109 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
6113 SelectClamp(Node, 2, Op);
6116 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
6120 SelectClamp(Node, 2, Op);
6126 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
6130 SelectClamp(Node, 4, Op);
6133 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
6137 SelectClamp(Node, 4, Op);
6140 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::FP>(
6144 SelectClamp(Node, 4, Op);
6150 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
6154 SelectDestructiveMultiIntrinsic(Node, 2, false, Op);
6157 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
6161 SelectDestructiveMultiIntrinsic(Node, 4, false, Op);
6164 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::AnyType>(
6168 SelectUnaryMultiIntrinsic(Node, 2, /*IsTupleInput=*/false, Op);
6175 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::AnyType>(
6179 SelectUnaryMultiIntrinsic(Node, 4, /*IsTupleInput=*/true, Op);
6186 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::AnyType>(
6190 SelectUnaryMultiIntrinsic(Node, 2, /*IsTupleInput=*/false, Op);
6197 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::AnyType>(
6201 SelectUnaryMultiIntrinsic(Node, 4, /*IsTupleInput=*/true, Op);
6208 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::AnyType>(
6212 SelectDestructiveMultiIntrinsic(Node, 2, true, Op, /*HasPred=*/true);
6215 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::AnyType>(
6219 SelectDestructiveMultiIntrinsic(Node, 4, true, Op, /*HasPred=*/true);
6246 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
6250 SelectUnaryMultiIntrinsic(Node, 2, /*IsTupleInput=*/false, Op);
6253 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
6257 SelectUnaryMultiIntrinsic(Node, 2, /*IsTupleInput=*/false, Op);
6260 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
6264 SelectUnaryMultiIntrinsic(Node, 4, /*IsTupleInput=*/true, Op);
6267 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::Int>(
6271 SelectUnaryMultiIntrinsic(Node, 4, /*IsTupleInput=*/true, Op);
6274 if (auto Op = SelectOpcodeFromVT<SelectTypeKind::AnyType>(
6278 SelectPExtPair(Node, Op);