Lines Matching refs:CurDAG
276 Val = CurDAG->getTargetConstant(Immed, dl, MVT::i32); in SelectArithImmed()
277 Shift = CurDAG->getTargetConstant(ShVal, dl, MVT::i32); in SelectArithImmed()
310 return SelectArithImmed(CurDAG->getConstant(Immed, SDLoc(N), MVT::i32), Val, in SelectNegArithImmed()
357 Shift = CurDAG->getTargetConstant(ShVal, SDLoc(N), MVT::i32); in SelectShiftedRegister()
475 SDValue LaneIdxVal = CurDAG->getTargetConstant(LaneIdx, dl, MVT::i64); in tryMLAV64LaneV128()
498 ReplaceNode(N, CurDAG->getMachineNode(MLAOpc, dl, N->getValueType(0), Ops)); in tryMLAV64LaneV128()
512 SDValue LaneIdxVal = CurDAG->getTargetConstant(LaneIdx, dl, MVT::i64); in tryMULLV64LaneV128()
543 ReplaceNode(N, CurDAG->getMachineNode(SMULLOpc, dl, N->getValueType(0), Ops)); in tryMULLV64LaneV128()
551 static SDValue narrowIfNeeded(SelectionDAG *CurDAG, SDValue N) { in narrowIfNeeded() argument
556 SDValue SubReg = CurDAG->getTargetConstant(AArch64::sub_32, dl, MVT::i32); in narrowIfNeeded()
557 MachineSDNode *Node = CurDAG->getMachineNode(TargetOpcode::EXTRACT_SUBREG, in narrowIfNeeded()
597 Reg = narrowIfNeeded(CurDAG, Reg); in SelectArithExtendedRegister()
598 Shift = CurDAG->getTargetConstant(getArithExtendImm(Ext, ShiftVal), SDLoc(N), in SelectArithExtendedRegister()
631 const DataLayout &DL = CurDAG->getDataLayout(); in SelectAddrModeIndexed7S()
635 Base = CurDAG->getTargetFrameIndex(FI, TLI->getPointerTy(DL)); in SelectAddrModeIndexed7S()
636 OffImm = CurDAG->getTargetConstant(0, dl, MVT::i64); in SelectAddrModeIndexed7S()
643 if (CurDAG->isBaseWithConstantOffset(N)) { in SelectAddrModeIndexed7S()
652 Base = CurDAG->getTargetFrameIndex(FI, TLI->getPointerTy(DL)); in SelectAddrModeIndexed7S()
654 OffImm = CurDAG->getTargetConstant(RHSC >> Scale, dl, MVT::i64); in SelectAddrModeIndexed7S()
665 OffImm = CurDAG->getTargetConstant(0, dl, MVT::i64); in SelectAddrModeIndexed7S()
675 const DataLayout &DL = CurDAG->getDataLayout(); in SelectAddrModeIndexed()
679 Base = CurDAG->getTargetFrameIndex(FI, TLI->getPointerTy(DL)); in SelectAddrModeIndexed()
680 OffImm = CurDAG->getTargetConstant(0, dl, MVT::i64); in SelectAddrModeIndexed()
702 if (CurDAG->isBaseWithConstantOffset(N)) { in SelectAddrModeIndexed()
710 Base = CurDAG->getTargetFrameIndex(FI, TLI->getPointerTy(DL)); in SelectAddrModeIndexed()
712 OffImm = CurDAG->getTargetConstant(RHSC >> Scale, dl, MVT::i64); in SelectAddrModeIndexed()
728 OffImm = CurDAG->getTargetConstant(0, dl, MVT::i64); in SelectAddrModeIndexed()
740 if (!CurDAG->isBaseWithConstantOffset(N)) in SelectAddrModeUnscaled()
753 Base = CurDAG->getTargetFrameIndex( in SelectAddrModeUnscaled()
754 FI, TLI->getPointerTy(CurDAG->getDataLayout())); in SelectAddrModeUnscaled()
756 OffImm = CurDAG->getTargetConstant(RHSC, SDLoc(N), MVT::i64); in SelectAddrModeUnscaled()
763 static SDValue Widen(SelectionDAG *CurDAG, SDValue N) { in Widen() argument
765 SDValue SubReg = CurDAG->getTargetConstant(AArch64::sub_32, dl, MVT::i32); in Widen()
767 CurDAG->getMachineNode(TargetOpcode::IMPLICIT_DEF, dl, MVT::i64), 0); in Widen()
768 MachineSDNode *Node = CurDAG->getMachineNode( in Widen()
790 Offset = narrowIfNeeded(CurDAG, N.getOperand(0).getOperand(0)); in SelectExtendedSHL()
791 SignExtend = CurDAG->getTargetConstant(Ext == AArch64_AM::SXTW, dl, in SelectExtendedSHL()
795 SignExtend = CurDAG->getTargetConstant(0, dl, MVT::i32); in SelectExtendedSHL()
838 DoShift = CurDAG->getTargetConstant(true, dl, MVT::i32); in SelectAddrModeWRO()
846 DoShift = CurDAG->getTargetConstant(true, dl, MVT::i32); in SelectAddrModeWRO()
851 DoShift = CurDAG->getTargetConstant(false, dl, MVT::i32); in SelectAddrModeWRO()
859 Offset = narrowIfNeeded(CurDAG, LHS.getOperand(0)); in SelectAddrModeWRO()
860 SignExtend = CurDAG->getTargetConstant(Ext == AArch64_AM::SXTW, dl, in SelectAddrModeWRO()
871 Offset = narrowIfNeeded(CurDAG, RHS.getOperand(0)); in SelectAddrModeWRO()
872 SignExtend = CurDAG->getTargetConstant(Ext == AArch64_AM::SXTW, dl, in SelectAddrModeWRO()
938 CurDAG->getMachineNode(AArch64::MOVi64imm, DL, MVT::i64, Ops); in SelectAddrModeXRO()
941 N = CurDAG->getNode(ISD::ADD, DL, MVT::i64, LHS, MOVIV); in SelectAddrModeXRO()
951 DoShift = CurDAG->getTargetConstant(true, DL, MVT::i32); in SelectAddrModeXRO()
959 DoShift = CurDAG->getTargetConstant(true, DL, MVT::i32); in SelectAddrModeXRO()
966 SignExtend = CurDAG->getTargetConstant(false, DL, MVT::i32); in SelectAddrModeXRO()
967 DoShift = CurDAG->getTargetConstant(false, DL, MVT::i32); in SelectAddrModeXRO()
1006 CurDAG->getTargetConstant(RegClassIDs[Regs.size() - 2], DL, MVT::i32)); in createTuple()
1011 Ops.push_back(CurDAG->getTargetConstant(SubRegs[i], DL, MVT::i32)); in createTuple()
1015 CurDAG->getMachineNode(TargetOpcode::REG_SEQUENCE, DL, MVT::Untyped, Ops); in createTuple()
1037 ReplaceNode(N, CurDAG->getMachineNode(Opc, dl, VT, Ops)); in SelectTable()
1111 SDValue Offset = CurDAG->getTargetConstant(OffsetVal, dl, MVT::i64); in tryIndexedLoad()
1113 SDNode *Res = CurDAG->getMachineNode(Opcode, dl, MVT::i64, DstVT, in tryIndexedLoad()
1118 SDValue SubReg = CurDAG->getTargetConstant(AArch64::sub_32, dl, MVT::i32); in tryIndexedLoad()
1120 SDValue(CurDAG->getMachineNode( in tryIndexedLoad()
1122 CurDAG->getTargetConstant(0, dl, MVT::i64), LoadedVal, in tryIndexedLoad()
1130 CurDAG->RemoveDeadNode(N); in tryIndexedLoad()
1145 SDNode *Ld = CurDAG->getMachineNode(Opc, dl, ResTys, Ops); in SelectLoad()
1149 CurDAG->getTargetExtractSubreg(SubRegIdx + i, dl, VT, SuperReg)); in SelectLoad()
1152 CurDAG->RemoveDeadNode(N); in SelectLoad()
1168 SDNode *Ld = CurDAG->getMachineNode(Opc, dl, ResTys, Ops); in SelectPostLoad()
1180 CurDAG->getTargetExtractSubreg(SubRegIdx + i, dl, VT, SuperReg)); in SelectPostLoad()
1184 CurDAG->RemoveDeadNode(N); in SelectPostLoad()
1198 SDNode *St = CurDAG->getMachineNode(Opc, dl, N->getValueType(0), Ops); in SelectStore()
1219 SDNode *St = CurDAG->getMachineNode(Opc, dl, ResTys, Ops); in SelectPostStore()
1270 WidenVector(*CurDAG)); in SelectLoadLane()
1279 SDValue Ops[] = {RegSeq, CurDAG->getTargetConstant(LaneNo, dl, MVT::i64), in SelectLoadLane()
1281 SDNode *Ld = CurDAG->getMachineNode(Opc, dl, ResTys, Ops); in SelectLoadLane()
1288 SDValue NV = CurDAG->getTargetExtractSubreg(QSubs[i], dl, WideVT, SuperReg); in SelectLoadLane()
1290 NV = NarrowVector(NV, *CurDAG); in SelectLoadLane()
1295 CurDAG->RemoveDeadNode(N); in SelectLoadLane()
1309 WidenVector(*CurDAG)); in SelectPostLoadLane()
1320 CurDAG->getTargetConstant(LaneNo, dl, in SelectPostLoadLane()
1325 SDNode *Ld = CurDAG->getMachineNode(Opc, dl, ResTys, Ops); in SelectPostLoadLane()
1334 Narrow ? NarrowVector(SuperReg, *CurDAG) : SuperReg); in SelectPostLoadLane()
1340 SDValue NV = CurDAG->getTargetExtractSubreg(QSubs[i], dl, WideVT, in SelectPostLoadLane()
1343 NV = NarrowVector(NV, *CurDAG); in SelectPostLoadLane()
1350 CurDAG->RemoveDeadNode(N); in SelectPostLoadLane()
1364 WidenVector(*CurDAG)); in SelectStoreLane()
1371 SDValue Ops[] = {RegSeq, CurDAG->getTargetConstant(LaneNo, dl, MVT::i64), in SelectStoreLane()
1373 SDNode *St = CurDAG->getMachineNode(Opc, dl, MVT::Other, Ops); in SelectStoreLane()
1394 WidenVector(*CurDAG)); in SelectPostStoreLane()
1404 SDValue Ops[] = {RegSeq, CurDAG->getTargetConstant(LaneNo, dl, MVT::i64), in SelectPostStoreLane()
1408 SDNode *St = CurDAG->getMachineNode(Opc, dl, ResTys, Ops); in SelectPostStoreLane()
1418 static bool isBitfieldExtractOpFromAnd(SelectionDAG *CurDAG, SDNode *N, in isBitfieldExtractOpFromAnd() argument
1462 Opd0 = Widen(CurDAG, Op0->getOperand(0).getOperand(0)); in isBitfieldExtractOpFromAnd()
1669 SDValue Opd0 = Widen(CurDAG, Op.getOperand(0)); in tryBitfieldExtractOpFromSExt()
1672 SDValue Ops[] = {Opd0, CurDAG->getTargetConstant(Immr, dl, VT), in tryBitfieldExtractOpFromSExt()
1673 CurDAG->getTargetConstant(Imms, dl, VT)}; in tryBitfieldExtractOpFromSExt()
1674 CurDAG->SelectNodeTo(N, AArch64::SBFMXri, VT, Ops); in tryBitfieldExtractOpFromSExt()
1678 static bool isBitfieldExtractOp(SelectionDAG *CurDAG, SDNode *N, unsigned &Opc, in isBitfieldExtractOp() argument
1691 return isBitfieldExtractOpFromAnd(CurDAG, N, Opc, Opd0, Immr, Imms, in isBitfieldExtractOp()
1722 if (!isBitfieldExtractOp(CurDAG, N, Opc, Opd0, Immr, Imms)) in tryBitfieldExtractOp()
1731 SDValue Ops64[] = {Opd0, CurDAG->getTargetConstant(Immr, dl, MVT::i64), in tryBitfieldExtractOp()
1732 CurDAG->getTargetConstant(Imms, dl, MVT::i64)}; in tryBitfieldExtractOp()
1734 SDNode *BFM = CurDAG->getMachineNode(Opc, dl, MVT::i64, Ops64); in tryBitfieldExtractOp()
1735 SDValue SubReg = CurDAG->getTargetConstant(AArch64::sub_32, dl, MVT::i32); in tryBitfieldExtractOp()
1736 ReplaceNode(N, CurDAG->getMachineNode(TargetOpcode::EXTRACT_SUBREG, dl, in tryBitfieldExtractOp()
1741 SDValue Ops[] = {Opd0, CurDAG->getTargetConstant(Immr, dl, VT), in tryBitfieldExtractOp()
1742 CurDAG->getTargetConstant(Imms, dl, VT)}; in tryBitfieldExtractOp()
1743 CurDAG->SelectNodeTo(N, Opc, VT, Ops); in tryBitfieldExtractOp()
1956 static SDValue getLeftShift(SelectionDAG *CurDAG, SDValue Op, int ShlAmount) { in getLeftShift() argument
1968 ShiftNode = CurDAG->getMachineNode( in getLeftShift()
1970 CurDAG->getTargetConstant(BitWidth - ShlAmount, dl, VT), in getLeftShift()
1971 CurDAG->getTargetConstant(BitWidth - 1 - ShlAmount, dl, VT)); in getLeftShift()
1976 ShiftNode = CurDAG->getMachineNode( in getLeftShift()
1977 UBFMOpc, dl, VT, Op, CurDAG->getTargetConstant(ShrAmount, dl, VT), in getLeftShift()
1978 CurDAG->getTargetConstant(BitWidth - 1, dl, VT)); in getLeftShift()
1986 static bool isBitfieldPositioningOp(SelectionDAG *CurDAG, SDValue Op, in isBitfieldPositioningOp() argument
1996 CurDAG->computeKnownBits(Op, KnownZero, KnownOne); in isBitfieldPositioningOp()
2033 Src = getLeftShift(CurDAG, Op, ShlImm - ShiftAmount); in isBitfieldPositioningOp()
2047 static bool tryBitfieldInsertOpFromOrAndImm(SDNode *N, SelectionDAG *CurDAG) { in tryBitfieldInsertOpFromOrAndImm() argument
2076 CurDAG->computeKnownBits(And, KnownZero, KnownOne); in tryBitfieldInsertOpFromOrAndImm()
2124 SDNode *MOVI = CurDAG->getMachineNode( in tryBitfieldInsertOpFromOrAndImm()
2125 MOVIOpc, DL, VT, CurDAG->getTargetConstant(BFIImm, DL, VT)); in tryBitfieldInsertOpFromOrAndImm()
2129 CurDAG->getTargetConstant(ImmR, DL, VT), in tryBitfieldInsertOpFromOrAndImm()
2130 CurDAG->getTargetConstant(ImmS, DL, VT)}; in tryBitfieldInsertOpFromOrAndImm()
2132 CurDAG->SelectNodeTo(N, Opc, VT, Ops); in tryBitfieldInsertOpFromOrAndImm()
2137 SelectionDAG *CurDAG) { in tryBitfieldInsertOpFromOr() argument
2182 if (isBitfieldExtractOp(CurDAG, OrOpd0, BFXOpc, Src, ImmR, ImmS, in tryBitfieldInsertOpFromOr()
2201 } else if (isBitfieldPositioningOp(CurDAG, OrOpd0Val, in tryBitfieldInsertOpFromOr()
2218 CurDAG->computeKnownBits(OrOpd1Val, KnownZero, KnownOne); in tryBitfieldInsertOpFromOr()
2241 SDValue Ops[] = {Dst, Src, CurDAG->getTargetConstant(ImmR, DL, VT), in tryBitfieldInsertOpFromOr()
2242 CurDAG->getTargetConstant(ImmS, DL, VT)}; in tryBitfieldInsertOpFromOr()
2244 CurDAG->SelectNodeTo(N, Opc, VT, Ops); in tryBitfieldInsertOpFromOr()
2277 SDNode *LSR = CurDAG->getMachineNode( in tryBitfieldInsertOpFromOr()
2278 ShiftOpc, DL, VT, Src, CurDAG->getTargetConstant(LSB, DL, VT), in tryBitfieldInsertOpFromOr()
2279 CurDAG->getTargetConstant(BitWidth - 1, DL, VT)); in tryBitfieldInsertOpFromOr()
2287 CurDAG->getTargetConstant(ImmR, DL, VT), in tryBitfieldInsertOpFromOr()
2288 CurDAG->getTargetConstant(ImmS, DL, VT)}; in tryBitfieldInsertOpFromOr()
2290 CurDAG->SelectNodeTo(N, Opc, VT, Ops); in tryBitfieldInsertOpFromOr()
2306 CurDAG->SelectNodeTo(N, TargetOpcode::IMPLICIT_DEF, N->getValueType(0)); in tryBitfieldInsertOp()
2310 if (tryBitfieldInsertOpFromOr(N, NUsefulBits, CurDAG)) in tryBitfieldInsertOp()
2313 return tryBitfieldInsertOpFromOrAndImm(N, CurDAG); in tryBitfieldInsertOp()
2329 if (!isBitfieldPositioningOp(CurDAG, SDValue(N, 0), /*BiggerPattern=*/false, in tryBitfieldInsertInZeroOp()
2339 SDValue Ops[] = {Op0, CurDAG->getTargetConstant(ImmR, DL, VT), in tryBitfieldInsertInZeroOp()
2340 CurDAG->getTargetConstant(ImmS, DL, VT)}; in tryBitfieldInsertInZeroOp()
2342 CurDAG->SelectNodeTo(N, Opc, VT, Ops); in tryBitfieldInsertInZeroOp()
2386 FixedPos = CurDAG->getTargetConstant(FBits, SDLoc(N), MVT::i32); in SelectCVTFixedPosOperand()
2432 ReplaceNode(N, CurDAG->getMachineNode( in tryReadRegister()
2434 CurDAG->getTargetConstant(Reg, DL, MVT::i32), in tryReadRegister()
2449 ReplaceNode(N, CurDAG->getMachineNode( in tryReadRegister()
2451 CurDAG->getTargetConstant(Reg, DL, MVT::i32), in tryReadRegister()
2471 N, CurDAG->getMachineNode(AArch64::MSR, DL, MVT::Other, in tryWriteRegister()
2472 CurDAG->getTargetConstant(Reg, DL, MVT::i32), in tryWriteRegister()
2496 ReplaceNode(N, CurDAG->getMachineNode( in tryWriteRegister()
2498 CurDAG->getTargetConstant(Reg, DL, MVT::i32), in tryWriteRegister()
2499 CurDAG->getTargetConstant(Immed, DL, MVT::i16), in tryWriteRegister()
2514 ReplaceNode(N, CurDAG->getMachineNode( in tryWriteRegister()
2516 CurDAG->getTargetConstant(Reg, DL, MVT::i32), in tryWriteRegister()
2542 SDNode *CmpSwap = CurDAG->getMachineNode( in SelectCMP_SWAP()
2544 CurDAG->getVTList(RegTy, MVT::i32, MVT::Other), Ops); in SelectCMP_SWAP()
2552 CurDAG->RemoveDeadNode(N); in SelectCMP_SWAP()
2558 DEBUG(Node->dump(CurDAG)); in Select()
2563 DEBUG(errs() << "== "; Node->dump(CurDAG); errs() << "\n"); in Select()
2657 SDValue Extract = CurDAG->getTargetExtractSubreg(SubReg, SDLoc(Node), VT, in Select()
2660 DEBUG(Extract->dumpr(CurDAG)); in Select()
2671 SDValue New = CurDAG->getCopyFromReg( in Select()
2672 CurDAG->getEntryNode(), SDLoc(Node), AArch64::WZR, MVT::i32); in Select()
2676 SDValue New = CurDAG->getCopyFromReg( in Select()
2677 CurDAG->getEntryNode(), SDLoc(Node), AArch64::XZR, MVT::i64); in Select()
2690 SDValue TFI = CurDAG->getTargetFrameIndex( in Select()
2691 FI, TLI->getPointerTy(CurDAG->getDataLayout())); in Select()
2693 SDValue Ops[] = { TFI, CurDAG->getTargetConstant(0, DL, MVT::i32), in Select()
2694 CurDAG->getTargetConstant(Shifter, DL, MVT::i32) }; in Select()
2695 CurDAG->SelectNodeTo(Node, AArch64::ADDXri, MVT::i64, Ops); in Select()
2711 SDNode *Ld = CurDAG->getMachineNode(Op, DL, MVT::i64, MVT::i64, in Select()
2734 SDNode *St = CurDAG->getMachineNode(Op, DL, MVT::i32, MVT::Other, Ops); in Select()