< prev index next >
src/share/vm/opto/mulnode.cpp
Print this page
@@ -153,10 +153,22 @@
const Type *zero = add_id(); // The multiplicative zero
if( t1->higher_equal( zero ) ) return zero;
if( t2->higher_equal( zero ) ) return zero;
}
+ // Code pattern on return from a call that returns an __Value. Can
+ // be optimized away if the return value turns out to be an oop.
+ if (op == Op_AndX &&
+ in(1) != NULL &&
+ in(1)->Opcode() == Op_CastP2X &&
+ in(1)->in(1) != NULL &&
+ phase->type(in(1)->in(1))->isa_oopptr() &&
+ t2->isa_intptr_t()->_lo >= 0 &&
+ t2->isa_intptr_t()->_hi <= MinObjAlignmentInBytesMask) {
+ return add_id();
+ }
+
// Either input is BOTTOM ==> the result is the local BOTTOM
if( t1 == Type::BOTTOM || t2 == Type::BOTTOM )
return bottom_type();
#if defined(IA32)
< prev index next >