src/hotspot/share/opto/library_call.cpp
changeset 48396 3c9975e46464
parent 47587 bf73ca31add9
child 48404 177e1783d886
equal deleted inserted replaced
48395:919780ab7acc 48396:3c9975e46464
  1787 
  1787 
  1788   case vmIntrinsics::_dexp:
  1788   case vmIntrinsics::_dexp:
  1789     return StubRoutines::dexp() != NULL ?
  1789     return StubRoutines::dexp() != NULL ?
  1790       runtime_math(OptoRuntime::Math_D_D_Type(), StubRoutines::dexp(),  "dexp") :
  1790       runtime_math(OptoRuntime::Math_D_D_Type(), StubRoutines::dexp(),  "dexp") :
  1791       runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dexp),  "EXP");
  1791       runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dexp),  "EXP");
  1792   case vmIntrinsics::_dpow:
  1792   case vmIntrinsics::_dpow: {
  1793     return StubRoutines::dpow() != NULL ?
  1793     Node* exp = round_double_node(argument(2));
  1794       runtime_math(OptoRuntime::Math_DD_D_Type(), StubRoutines::dpow(), "dpow") :
  1794     const TypeD* d = _gvn.type(exp)->isa_double_constant();
       
  1795     if (d != NULL && d->getd() == 2.0) {
       
  1796       // Special case: pow(x, 2.0) => x * x
       
  1797       Node* base = round_double_node(argument(0));
       
  1798       set_result(_gvn.transform(new MulDNode(base, base)));
       
  1799       return true;
       
  1800     }
       
  1801     return StubRoutines::dexp() != NULL ?
       
  1802       runtime_math(OptoRuntime::Math_DD_D_Type(), StubRoutines::dpow(),  "dpow") :
  1795       runtime_math(OptoRuntime::Math_DD_D_Type(), FN_PTR(SharedRuntime::dpow),  "POW");
  1803       runtime_math(OptoRuntime::Math_DD_D_Type(), FN_PTR(SharedRuntime::dpow),  "POW");
       
  1804   }
  1796 #undef FN_PTR
  1805 #undef FN_PTR
  1797 
  1806 
  1798    // These intrinsics are not yet correctly implemented
  1807    // These intrinsics are not yet correctly implemented
  1799   case vmIntrinsics::_datan2:
  1808   case vmIntrinsics::_datan2:
  1800     return false;
  1809     return false;