aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/opto/parse2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/vm/opto/parse2.cpp')
-rw-r--r--src/share/vm/opto/parse2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/share/vm/opto/parse2.cpp b/src/share/vm/opto/parse2.cpp
index 541f26dd5..4982a1d76 100644
--- a/src/share/vm/opto/parse2.cpp
+++ b/src/share/vm/opto/parse2.cpp
@@ -1278,9 +1278,9 @@ void Parse::sharpen_type_after_if(BoolTest::mask btest,
// or the narrowOop equivalent.
const Type* obj_type = _gvn.type(obj);
const TypeOopPtr* tboth = obj_type->join(con_type)->isa_oopptr();
- if (tboth != NULL && tboth != obj_type && tboth->higher_equal(obj_type)) {
+ if (tboth != NULL && tboth->klass_is_exact() && tboth != obj_type &&
+ tboth->higher_equal(obj_type)) {
// obj has to be of the exact type Foo if the CmpP succeeds.
- assert(tboth->klass_is_exact(), "klass should be exact");
int obj_in_map = map()->find_edge(obj);
JVMState* jvms = this->jvms();
if (obj_in_map >= 0 &&