diff -r 4d428c5b4cb3 -r 3288958bf319 src/share/vm/opto/subnode.cpp --- a/src/share/vm/opto/subnode.cpp Thu Feb 28 15:40:09 2008 -0800 +++ b/src/share/vm/opto/subnode.cpp Fri Feb 29 09:57:18 2008 -0800 @@ -614,6 +614,13 @@ const TypeOopPtr* p0 = r0->isa_oopptr(); const TypeOopPtr* p1 = r1->isa_oopptr(); if (p0 && p1) { + Node* in1 = in(1)->uncast(); + Node* in2 = in(2)->uncast(); + AllocateNode* alloc1 = AllocateNode::Ideal_allocation(in1, NULL); + AllocateNode* alloc2 = AllocateNode::Ideal_allocation(in2, NULL); + if (MemNode::detect_ptr_independence(in1, alloc1, in2, alloc2, NULL)) { + return TypeInt::CC_GT; // different pointers + } ciKlass* klass0 = p0->klass(); bool xklass0 = p0->klass_is_exact(); ciKlass* klass1 = p1->klass();