# HG changeset patch # User goetz # Date 1392890712 -3600 # Node ID 7c462558a08a81515513b3ca25ad7faf7c5c0563 # Parent 2444afebe07bd47757461f822e6ad5bf3b00b002 8035394: PPC64: Make usage of intrinsic dsqrt depend on processor recognition. Reviewed-by: kvn diff -r 2444afebe07b -r 7c462558a08a src/cpu/ppc/vm/ppc.ad --- a/src/cpu/ppc/vm/ppc.ad Thu Feb 20 10:48:57 2014 +0100 +++ b/src/cpu/ppc/vm/ppc.ad Thu Feb 20 11:05:12 2014 +0100 @@ -2076,6 +2076,8 @@ return false; switch (opcode) { + case Op_SqrtD: + return VM_Version::has_fsqrt(); case Op_CountLeadingZerosI: case Op_CountLeadingZerosL: case Op_CountTrailingZerosI: @@ -8740,7 +8742,7 @@ ins_pipe(pipe_class_default); %} -// VM_Version::has_sqrt() decides if this node will be used. +// VM_Version::has_fsqrt() decides if this node will be used. // Sqrt float double precision instruct sqrtD_reg(regD dst, regD src) %{ match(Set dst (SqrtD src)); diff -r 2444afebe07b -r 7c462558a08a src/share/vm/opto/library_call.cpp --- a/src/share/vm/opto/library_call.cpp Thu Feb 20 10:48:57 2014 +0100 +++ b/src/share/vm/opto/library_call.cpp Thu Feb 20 11:05:12 2014 +0100 @@ -1937,7 +1937,7 @@ runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dlog10), "LOG10"); // These intrinsics are supported on all hardware - case vmIntrinsics::_dsqrt: return Matcher::has_match_rule(Op_SqrtD) ? inline_math(id) : false; + case vmIntrinsics::_dsqrt: return Matcher::match_rule_supported(Op_SqrtD) ? inline_math(id) : false; case vmIntrinsics::_dabs: return Matcher::has_match_rule(Op_AbsD) ? inline_math(id) : false; case vmIntrinsics::_dexp: return Matcher::has_match_rule(Op_ExpD) ? inline_exp() :