< prev index next >

src/hotspot/share/opto/memnode.cpp

Print this page

        

@@ -3539,11 +3539,11 @@
 // an initialization.  Returns zero if a check fails.
 // On success, returns the (constant) offset to which the store applies,
 // within the initialized memory.
 intptr_t InitializeNode::can_capture_store(StoreNode* st, PhaseTransform* phase, bool can_reshape) {
   const int FAIL = 0;
-  if (st->is_unaligned_access()) {
+  if (st->is_unaligned_access() || ((get_store_offset(st, phase) % BytesPerInt) != 0)) {
     return FAIL;
   }
   if (st->req() != MemNode::ValueIn + 1)
     return FAIL;                // an inscrutable StoreNode (card mark?)
   Node* ctl = st->in(MemNode::Control);
< prev index next >