hotspot/src/share/vm/opto/mulnode.cpp
changeset 392 0b3167e2f2de
parent 1 489c9b5090e2
child 670 ddf3e9583f2f
--- a/hotspot/src/share/vm/opto/mulnode.cpp	Tue Apr 29 19:45:22 2008 -0700
+++ b/hotspot/src/share/vm/opto/mulnode.cpp	Wed May 07 08:06:46 2008 -0700
@@ -365,6 +365,25 @@
 }
 
 //=============================================================================
+//------------------------------Value------------------------------------------
+const Type *MulHiLNode::Value( PhaseTransform *phase ) const {
+  // Either input is TOP ==> the result is TOP
+  const Type *t1 = phase->type( in(1) );
+  const Type *t2 = phase->type( in(2) );
+  if( t1 == Type::TOP ) return Type::TOP;
+  if( t2 == Type::TOP ) return Type::TOP;
+
+  // Either input is BOTTOM ==> the result is the local BOTTOM
+  const Type *bot = bottom_type();
+  if( (t1 == bot) || (t2 == bot) ||
+      (t1 == Type::BOTTOM) || (t2 == Type::BOTTOM) )
+    return bot;
+
+  // It is not worth trying to constant fold this stuff!
+  return TypeLong::LONG;
+}
+
+//=============================================================================
 //------------------------------mul_ring---------------------------------------
 // Supplied function returns the product of the inputs IN THE CURRENT RING.
 // For the logical operations the ring's MUL is really a logical AND function.