hotspot/src/share/vm/prims/whitebox.cpp
changeset 40370 2f564c75bcde
parent 40369 9fe6781cbe39
child 41084 fc5db29fa08e
--- a/hotspot/src/share/vm/prims/whitebox.cpp	Fri Aug 05 13:37:53 2016 -0700
+++ b/hotspot/src/share/vm/prims/whitebox.cpp	Sat Aug 06 11:52:37 2016 -0700
@@ -679,7 +679,7 @@
 WB_END
 
 WB_ENTRY(jboolean, WB_IsIntrinsicAvailable(JNIEnv* env, jobject o, jobject method, jobject compilation_context, jint compLevel))
-  if (compLevel < CompLevel_none || compLevel > TieredStopAtLevel) {
+  if (compLevel < CompLevel_none || compLevel > MIN2((CompLevel) TieredStopAtLevel, CompLevel_highest_tier)) {
     return false; // Intrinsic is not available on a non-existent compilation level.
   }
   jmethodID method_id, compilation_context_id;