# HG changeset patch # User kvn # Date 1327507804 28800 # Node ID 94f0ce74d48e15d9c26bf1b6e2af6aafc82cb0b9 # Parent 52474ec73861184d0b4051e373491c8d42b51f2d# Parent cf407b7d3d7819aa964ea3b32f2c231c543c068a Merge diff -r cf407b7d3d78 -r 94f0ce74d48e src/share/vm/opto/memnode.cpp --- a/src/share/vm/opto/memnode.cpp Wed Jan 25 09:31:47 2012 +0100 +++ b/src/share/vm/opto/memnode.cpp Wed Jan 25 08:10:04 2012 -0800 @@ -1764,7 +1764,8 @@ const Type* LoadBNode::Value(PhaseTransform *phase) const { Node* mem = in(MemNode::Memory); Node* value = can_see_stored_value(mem,phase); - if (value != NULL && value->is_Con()) { + if (value != NULL && value->is_Con() && + !value->bottom_type()->higher_equal(_type)) { // If the input to the store does not fit with the load's result type, // it must be truncated. We can't delay until Ideal call since // a singleton Value is needed for split_thru_phi optimization. @@ -1793,7 +1794,8 @@ const Type* LoadUBNode::Value(PhaseTransform *phase) const { Node* mem = in(MemNode::Memory); Node* value = can_see_stored_value(mem,phase); - if (value != NULL && value->is_Con()) { + if (value != NULL && value->is_Con() && + !value->bottom_type()->higher_equal(_type)) { // If the input to the store does not fit with the load's result type, // it must be truncated. We can't delay until Ideal call since // a singleton Value is needed for split_thru_phi optimization. @@ -1822,7 +1824,8 @@ const Type* LoadUSNode::Value(PhaseTransform *phase) const { Node* mem = in(MemNode::Memory); Node* value = can_see_stored_value(mem,phase); - if (value != NULL && value->is_Con()) { + if (value != NULL && value->is_Con() && + !value->bottom_type()->higher_equal(_type)) { // If the input to the store does not fit with the load's result type, // it must be truncated. We can't delay until Ideal call since // a singleton Value is needed for split_thru_phi optimization. @@ -1853,7 +1856,8 @@ const Type* LoadSNode::Value(PhaseTransform *phase) const { Node* mem = in(MemNode::Memory); Node* value = can_see_stored_value(mem,phase); - if (value != NULL && value->is_Con()) { + if (value != NULL && value->is_Con() && + !value->bottom_type()->higher_equal(_type)) { // If the input to the store does not fit with the load's result type, // it must be truncated. We can't delay until Ideal call since // a singleton Value is needed for split_thru_phi optimization.