From dc25e0c4a8d9fa596c4e58c36ebcbd72ff8546ab Mon Sep 17 00:00:00 2001 From: "plind44@gmail.com" Date: Wed, 18 Dec 2013 04:27:48 +0000 Subject: [PATCH] Make offsets to inner allocated objects aligned in allocation folding. Folded allocations marked for double alignment is not aligned if old dominator size is used for offset to inner object. TEST=mjsunit/big-array-literal on MIPS BUG= R=hpayer@chromium.org Review URL: https://codereview.chromium.org/103963005 Patch from Dusan Milosavljevic . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18332 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/hydrogen-instructions.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc index e7ad219..7f07ed5 100644 --- a/src/hydrogen-instructions.cc +++ b/src/hydrogen-instructions.cc @@ -3495,11 +3495,18 @@ void HAllocate::HandleSideEffectDominator(GVNFlag side_effect, dominator_allocate->clear_next_map_word_ = clear_next_map_word_; // After that replace the dominated allocate instruction. + HInstruction* inner_offset = HConstant::CreateAndInsertBefore( + zone, + context(), + dominator_size_constant, + Representation::None(), + this); + HInstruction* dominated_allocate_instr = HInnerAllocatedObject::New(zone, context(), dominator_allocate, - dominator_size, + inner_offset, type()); dominated_allocate_instr->InsertBefore(this); DeleteAndReplaceWith(dominated_allocate_instr); -- 2.7.4