OLD | NEW |
1 //===-- SelectionDAGBuilder.cpp - Selection-DAG building ------------------===// | 1 //===-- SelectionDAGBuilder.cpp - Selection-DAG building ------------------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This implements routines for translating from LLVM IR into SelectionDAG IR. | 10 // This implements routines for translating from LLVM IR into SelectionDAG IR. |
(...skipping 4750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4761 DAG.setRoot(DAG.getNode(ISD::EH_SJLJ_LONGJMP, dl, MVT::Other, | 4761 DAG.setRoot(DAG.getNode(ISD::EH_SJLJ_LONGJMP, dl, MVT::Other, |
4762 getRoot(), getValue(I.getArgOperand(0)))); | 4762 getRoot(), getValue(I.getArgOperand(0)))); |
4763 return 0; | 4763 return 0; |
4764 } | 4764 } |
4765 case Intrinsic::eh_sjlj_dispatch_setup: { | 4765 case Intrinsic::eh_sjlj_dispatch_setup: { |
4766 DAG.setRoot(DAG.getNode(ISD::EH_SJLJ_DISPATCHSETUP, dl, MVT::Other, | 4766 DAG.setRoot(DAG.getNode(ISD::EH_SJLJ_DISPATCHSETUP, dl, MVT::Other, |
4767 getRoot(), getValue(I.getArgOperand(0)))); | 4767 getRoot(), getValue(I.getArgOperand(0)))); |
4768 return 0; | 4768 return 0; |
4769 } | 4769 } |
4770 | 4770 |
| 4771 #if defined(TARGET_ENABLED_X86) |
4771 case Intrinsic::x86_mmx_pslli_w: | 4772 case Intrinsic::x86_mmx_pslli_w: |
4772 case Intrinsic::x86_mmx_pslli_d: | 4773 case Intrinsic::x86_mmx_pslli_d: |
4773 case Intrinsic::x86_mmx_pslli_q: | 4774 case Intrinsic::x86_mmx_pslli_q: |
4774 case Intrinsic::x86_mmx_psrli_w: | 4775 case Intrinsic::x86_mmx_psrli_w: |
4775 case Intrinsic::x86_mmx_psrli_d: | 4776 case Intrinsic::x86_mmx_psrli_d: |
4776 case Intrinsic::x86_mmx_psrli_q: | 4777 case Intrinsic::x86_mmx_psrli_q: |
4777 case Intrinsic::x86_mmx_psrai_w: | 4778 case Intrinsic::x86_mmx_psrai_w: |
4778 case Intrinsic::x86_mmx_psrai_d: { | 4779 case Intrinsic::x86_mmx_psrai_d: { |
4779 SDValue ShAmt = getValue(I.getArgOperand(1)); | 4780 SDValue ShAmt = getValue(I.getArgOperand(1)); |
4780 if (isa<ConstantSDNode>(ShAmt)) { | 4781 if (isa<ConstantSDNode>(ShAmt)) { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4821 ShOps[1] = DAG.getConstant(0, MVT::i32); | 4822 ShOps[1] = DAG.getConstant(0, MVT::i32); |
4822 ShAmt = DAG.getNode(ISD::BUILD_VECTOR, dl, ShAmtVT, &ShOps[0], 2); | 4823 ShAmt = DAG.getNode(ISD::BUILD_VECTOR, dl, ShAmtVT, &ShOps[0], 2); |
4823 EVT DestVT = TLI.getValueType(I.getType()); | 4824 EVT DestVT = TLI.getValueType(I.getType()); |
4824 ShAmt = DAG.getNode(ISD::BITCAST, dl, DestVT, ShAmt); | 4825 ShAmt = DAG.getNode(ISD::BITCAST, dl, DestVT, ShAmt); |
4825 Res = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, DestVT, | 4826 Res = DAG.getNode(ISD::INTRINSIC_WO_CHAIN, dl, DestVT, |
4826 DAG.getConstant(NewIntrinsic, MVT::i32), | 4827 DAG.getConstant(NewIntrinsic, MVT::i32), |
4827 getValue(I.getArgOperand(0)), ShAmt); | 4828 getValue(I.getArgOperand(0)), ShAmt); |
4828 setValue(&I, Res); | 4829 setValue(&I, Res); |
4829 return 0; | 4830 return 0; |
4830 } | 4831 } |
| 4832 #endif // TARGET_ENABLED_X86 |
4831 case Intrinsic::convertff: | 4833 case Intrinsic::convertff: |
4832 case Intrinsic::convertfsi: | 4834 case Intrinsic::convertfsi: |
4833 case Intrinsic::convertfui: | 4835 case Intrinsic::convertfui: |
4834 case Intrinsic::convertsif: | 4836 case Intrinsic::convertsif: |
4835 case Intrinsic::convertuif: | 4837 case Intrinsic::convertuif: |
4836 case Intrinsic::convertss: | 4838 case Intrinsic::convertss: |
4837 case Intrinsic::convertsu: | 4839 case Intrinsic::convertsu: |
4838 case Intrinsic::convertus: | 4840 case Intrinsic::convertus: |
4839 case Intrinsic::convertuu: { | 4841 case Intrinsic::convertuu: { |
4840 ISD::CvtCode Code = ISD::CVT_INVALID; | 4842 ISD::CvtCode Code = ISD::CVT_INVALID; |
(...skipping 1993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6834 EVT VT = ValueVTs[vti]; | 6836 EVT VT = ValueVTs[vti]; |
6835 unsigned NumRegisters = TLI.getNumRegisters(*DAG.getContext(), VT); | 6837 unsigned NumRegisters = TLI.getNumRegisters(*DAG.getContext(), VT); |
6836 for (unsigned i = 0, e = NumRegisters; i != e; ++i) | 6838 for (unsigned i = 0, e = NumRegisters; i != e; ++i) |
6837 FuncInfo.PHINodesToUpdate.push_back(std::make_pair(MBBI++, Reg+i)); | 6839 FuncInfo.PHINodesToUpdate.push_back(std::make_pair(MBBI++, Reg+i)); |
6838 Reg += NumRegisters; | 6840 Reg += NumRegisters; |
6839 } | 6841 } |
6840 } | 6842 } |
6841 } | 6843 } |
6842 ConstantsOut.clear(); | 6844 ConstantsOut.clear(); |
6843 } | 6845 } |
OLD | NEW |