SDValue VectorProcTargetLowering::LowerConstant(SDValue Op, SelectionDAG &DAG) const { DebugLoc dl = Op.getDebugLoc(); EVT PtrVT = Op.getValueType(); ConstantSDNode *C = cast<ConstantSDNode>(Op); if (C->getAPIntValue().abs().ult(0x4000)) { // Don't need to convert to constant pool reference. This will fit in // the immediate field of a single instruction, sign extended (15 bits). return SDValue(); } SDValue CPIdx = DAG.getConstantPool(C->getConstantIntValue(), MVT::i32); return DAG.getLoad(MVT::i32, dl, DAG.getEntryNode(), CPIdx, MachinePointerInfo::getConstantPool(), false, false, false, 4); }