Lines Matching refs:Op
161 SDValue LanaiTargetLowering::LowerOperation(SDValue Op,
163 switch (Op.getOpcode()) {
165 return LowerMUL(Op, DAG);
167 return LowerBR_CC(Op, DAG);
169 return LowerConstantPool(Op, DAG);
171 return LowerGlobalAddress(Op, DAG);
173 return LowerBlockAddress(Op, DAG);
175 return LowerJumpTable(Op, DAG);
177 return LowerSELECT_CC(Op, DAG);
179 return LowerSETCC(Op, DAG);
181 return LowerSETCCE(Op, DAG);
183 return LowerSRL_PARTS(Op, DAG);
185 return LowerVASTART(Op, DAG);
187 return LowerDYNAMIC_STACKALLOC(Op, DAG);
189 return LowerRETURNADDR(Op, DAG);
191 return LowerFRAMEADDR(Op, DAG);
269 SDValue Op, std::string &Constraint, std::vector<SDValue> &Ops,
281 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
284 Op.getValueType());
291 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
293 Result = DAG.getTargetConstant(0, SDLoc(C), Op.getValueType());
299 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
302 Op.getValueType());
308 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
311 Op.getValueType());
317 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
320 Result = DAG.getTargetConstant(Val, SDLoc(C), Op.getValueType());
326 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
329 Result = DAG.getTargetConstant(Val, SDLoc(C), Op.getValueType());
343 TargetLowering::LowerAsmOperandForConstraint(Op, Constraint, Ops, DAG);
855 SDValue LanaiTargetLowering::LowerBR_CC(SDValue Op, SelectionDAG &DAG) const {
856 SDValue Chain = Op.getOperand(0);
857 SDValue Cond = Op.getOperand(1);
858 SDValue LHS = Op.getOperand(2);
859 SDValue RHS = Op.getOperand(3);
860 SDValue Dest = Op.getOperand(4);
861 SDLoc DL(Op);
868 return DAG.getNode(LanaiISD::BR_CC, DL, Op.getValueType(), Chain, Dest,
872 SDValue LanaiTargetLowering::LowerMUL(SDValue Op, SelectionDAG &DAG) const {
873 EVT VT = Op->getValueType(0);
877 ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op->getOperand(1));
926 SDLoc DL(Op);
927 SDValue V = Op->getOperand(0);
948 SDValue Op =
951 Res = DAG.getNode(ISD::ADD, DL, VT, Res, Op);
953 Res = DAG.getNode(ISD::SUB, DL, VT, Res, Op);
958 SDValue LanaiTargetLowering::LowerSETCCE(SDValue Op, SelectionDAG &DAG) const {
959 SDValue LHS = Op.getOperand(0);
960 SDValue RHS = Op.getOperand(1);
961 SDValue Carry = Op.getOperand(2);
962 SDValue Cond = Op.getOperand(3);
963 SDLoc DL(Op);
968 return DAG.getNode(LanaiISD::SETCC, DL, Op.getValueType(), TargetCC, Flag);
971 SDValue LanaiTargetLowering::LowerSETCC(SDValue Op, SelectionDAG &DAG) const {
972 SDValue LHS = Op.getOperand(0);
973 SDValue RHS = Op.getOperand(1);
974 SDValue Cond = Op.getOperand(2);
975 SDLoc DL(Op);
982 return DAG.getNode(LanaiISD::SETCC, DL, Op.getValueType(), TargetCC, Flag);
985 SDValue LanaiTargetLowering::LowerSELECT_CC(SDValue Op,
987 SDValue LHS = Op.getOperand(0);
988 SDValue RHS = Op.getOperand(1);
989 SDValue TrueV = Op.getOperand(2);
990 SDValue FalseV = Op.getOperand(3);
991 SDValue Cond = Op.getOperand(4);
992 SDLoc DL(Op);
999 SDVTList VTs = DAG.getVTList(Op.getValueType(), MVT::Glue);
1004 SDValue LanaiTargetLowering::LowerVASTART(SDValue Op, SelectionDAG &DAG) const {
1008 SDLoc DL(Op);
1014 const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
1015 return DAG.getStore(Op.getOperand(0), DL, FI, Op.getOperand(1),
1019 SDValue LanaiTargetLowering::LowerDYNAMIC_STACKALLOC(SDValue Op,
1021 SDValue Chain = Op.getOperand(0);
1022 SDValue Size = Op.getOperand(1);
1023 SDLoc DL(Op);
1054 SDValue LanaiTargetLowering::LowerRETURNADDR(SDValue Op,
1060 EVT VT = Op.getValueType();
1061 SDLoc DL(Op);
1062 unsigned Depth = cast<ConstantSDNode>(Op.getOperand(0))->getZExtValue();
1064 SDValue FrameAddr = LowerFRAMEADDR(Op, DAG);
1078 SDValue LanaiTargetLowering::LowerFRAMEADDR(SDValue Op,
1083 EVT VT = Op.getValueType();
1084 SDLoc DL(Op);
1086 unsigned Depth = cast<ConstantSDNode>(Op.getOperand(0))->getZExtValue();
1128 SDValue LanaiTargetLowering::LowerConstantPool(SDValue Op,
1130 SDLoc DL(Op);
1131 ConstantPoolSDNode *N = cast<ConstantPoolSDNode>(Op);
1161 SDValue LanaiTargetLowering::LowerGlobalAddress(SDValue Op,
1163 SDLoc DL(Op);
1164 const GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
1165 int64_t Offset = cast<GlobalAddressSDNode>(Op)->getOffset();
1195 SDValue LanaiTargetLowering::LowerBlockAddress(SDValue Op,
1197 SDLoc DL(Op);
1198 const BlockAddress *BA = cast<BlockAddressSDNode>(Op)->getBlockAddress();
1211 SDValue LanaiTargetLowering::LowerJumpTable(SDValue Op,
1213 SDLoc DL(Op);
1214 JumpTableSDNode *JT = cast<JumpTableSDNode>(Op);
1238 SDValue LanaiTargetLowering::LowerSRL_PARTS(SDValue Op,
1240 MVT VT = Op.getSimpleValueType();
1242 SDLoc dl(Op);
1243 SDValue ShOpLo = Op.getOperand(0);
1244 SDValue ShOpHi = Op.getOperand(1);
1245 SDValue ShAmt = Op.getOperand(2);