1.1 --- a/src/share/vm/opto/library_call.cpp Fri Mar 02 13:13:25 2012 -0800 1.2 +++ b/src/share/vm/opto/library_call.cpp Mon Mar 05 18:10:31 2012 -0800 1.3 @@ -338,8 +338,27 @@ 1.4 break; 1.5 1.6 case vmIntrinsics::_bitCount_i: 1.7 + if (!Matcher::has_match_rule(Op_PopCountI)) return NULL; 1.8 + break; 1.9 + 1.10 case vmIntrinsics::_bitCount_l: 1.11 - if (!UsePopCountInstruction) return NULL; 1.12 + if (!Matcher::has_match_rule(Op_PopCountL)) return NULL; 1.13 + break; 1.14 + 1.15 + case vmIntrinsics::_numberOfLeadingZeros_i: 1.16 + if (!Matcher::match_rule_supported(Op_CountLeadingZerosI)) return NULL; 1.17 + break; 1.18 + 1.19 + case vmIntrinsics::_numberOfLeadingZeros_l: 1.20 + if (!Matcher::match_rule_supported(Op_CountLeadingZerosL)) return NULL; 1.21 + break; 1.22 + 1.23 + case vmIntrinsics::_numberOfTrailingZeros_i: 1.24 + if (!Matcher::match_rule_supported(Op_CountTrailingZerosI)) return NULL; 1.25 + break; 1.26 + 1.27 + case vmIntrinsics::_numberOfTrailingZeros_l: 1.28 + if (!Matcher::match_rule_supported(Op_CountTrailingZerosL)) return NULL; 1.29 break; 1.30 1.31 case vmIntrinsics::_Reference_get: 1.32 @@ -416,14 +435,12 @@ 1.33 return kit.transfer_exceptions_into_jvms(); 1.34 } 1.35 1.36 - if (PrintIntrinsics) { 1.37 + // The intrinsic bailed out 1.38 + if (PrintIntrinsics || PrintInlining NOT_PRODUCT( || PrintOptoInlining) ) { 1.39 if (jvms->has_method()) { 1.40 // Not a root compile. 1.41 - tty->print("Did not inline intrinsic %s%s at bci:%d in", 1.42 - vmIntrinsics::name_at(intrinsic_id()), 1.43 - (is_virtual() ? " (virtual)" : ""), kit.bci()); 1.44 - kit.caller()->print_short_name(tty); 1.45 - tty->print_cr(" (%d bytes)", kit.caller()->code_size()); 1.46 + const char* msg = is_virtual() ? "failed to inline (intrinsic, virtual)" : "failed to inline (intrinsic)"; 1.47 + CompileTask::print_inlining(kit.callee(), jvms->depth() - 1, kit.bci(), msg); 1.48 } else { 1.49 // Root compile 1.50 tty->print("Did not generate intrinsic %s%s at bci:%d in", 1.51 @@ -5453,4 +5470,3 @@ 1.52 push(result); 1.53 return true; 1.54 } 1.55 -