hotspot/src/share/vm/opto/library_call.cpp
changeset 41323 ddd5600d4762
parent 41052 3362c4368286
child 41330 8b2580e63aa0
equal deleted inserted replaced
41321:463ff7705f2f 41323:ddd5600d4762
   315   bool inline_squareToLen();
   315   bool inline_squareToLen();
   316   bool inline_mulAdd();
   316   bool inline_mulAdd();
   317   bool inline_montgomeryMultiply();
   317   bool inline_montgomeryMultiply();
   318   bool inline_montgomerySquare();
   318   bool inline_montgomerySquare();
   319   bool inline_vectorizedMismatch();
   319   bool inline_vectorizedMismatch();
       
   320   bool inline_fma(vmIntrinsics::ID id);
   320 
   321 
   321   bool inline_profileBoolean();
   322   bool inline_profileBoolean();
   322   bool inline_isCompileConstant();
   323   bool inline_isCompileConstant();
   323 };
   324 };
   324 
   325 
   822   case vmIntrinsics::_isCompileConstant:
   823   case vmIntrinsics::_isCompileConstant:
   823     return inline_isCompileConstant();
   824     return inline_isCompileConstant();
   824 
   825 
   825   case vmIntrinsics::_hasNegatives:
   826   case vmIntrinsics::_hasNegatives:
   826     return inline_hasNegatives();
   827     return inline_hasNegatives();
       
   828 
       
   829   case vmIntrinsics::_fmaD:
       
   830   case vmIntrinsics::_fmaF:
       
   831     return inline_fma(intrinsic_id());
   827 
   832 
   828   default:
   833   default:
   829     // If you get here, it may be that someone has added a new intrinsic
   834     // If you get here, it may be that someone has added a new intrinsic
   830     // to the list in vmSymbols.hpp without implementing it here.
   835     // to the list in vmSymbols.hpp without implementing it here.
   831 #ifndef PRODUCT
   836 #ifndef PRODUCT
  6655   Node* instof_false = generate_guard(bool_instof, NULL, PROB_MIN);
  6660   Node* instof_false = generate_guard(bool_instof, NULL, PROB_MIN);
  6656 
  6661 
  6657   return instof_false;  // even if it is NULL
  6662   return instof_false;  // even if it is NULL
  6658 }
  6663 }
  6659 
  6664 
       
  6665 //-------------inline_fma-----------------------------------
       
  6666 bool LibraryCallKit::inline_fma(vmIntrinsics::ID id) {
       
  6667   Node *a = NULL;
       
  6668   Node *b = NULL;
       
  6669   Node *c = NULL;
       
  6670   Node* result = NULL;
       
  6671   switch (id) {
       
  6672   case vmIntrinsics::_fmaD:
       
  6673     assert(callee()->signature()->size() == 6, "fma has 3 parameters of size 2 each.");
       
  6674     // no receiver since it is static method
       
  6675     a = round_double_node(argument(0));
       
  6676     b = round_double_node(argument(2));
       
  6677     c = round_double_node(argument(4));
       
  6678     result = _gvn.transform(new FmaDNode(control(), a, b, c));
       
  6679     break;
       
  6680   case vmIntrinsics::_fmaF:
       
  6681     assert(callee()->signature()->size() == 3, "fma has 3 parameters of size 1 each.");
       
  6682     a = argument(0);
       
  6683     b = argument(1);
       
  6684     c = argument(2);
       
  6685     result = _gvn.transform(new FmaFNode(control(), a, b, c));
       
  6686     break;
       
  6687   default:
       
  6688     fatal_unexpected_iid(id);  break;
       
  6689   }
       
  6690   set_result(result);
       
  6691   return true;
       
  6692 }
       
  6693 
  6660 bool LibraryCallKit::inline_profileBoolean() {
  6694 bool LibraryCallKit::inline_profileBoolean() {
  6661   Node* counts = argument(1);
  6695   Node* counts = argument(1);
  6662   const TypeAryPtr* ary = NULL;
  6696   const TypeAryPtr* ary = NULL;
  6663   ciArray* aobj = NULL;
  6697   ciArray* aobj = NULL;
  6664   if (counts->is_Con()
  6698   if (counts->is_Con()