From 085b733d15ec09afa27b85358acb89d9bc02e843 Mon Sep 17 00:00:00 2001 From: Maxim Kazantsev Date: Tue, 24 Feb 2015 15:07:55 +0600 Subject: [PATCH] ART: AddVectorReduce should store result in memory carefully When generating AddVectorReduce, in some cirsumstances we add value reduced from vector directly to memory. We must ensure that local LIR optimizations are aware about it. Change-Id: I8fe19939f67dcd184b08f63026b0da18007d34b8 --- compiler/dex/quick/x86/target_x86.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/dex/quick/x86/target_x86.cc b/compiler/dex/quick/x86/target_x86.cc index 8f97d1e7c..dbe48488a 100755 --- a/compiler/dex/quick/x86/target_x86.cc +++ b/compiler/dex/quick/x86/target_x86.cc @@ -2202,6 +2202,7 @@ void X86Mir2Lir::GenAddReduceVector(MIR* mir) { StoreFinalValue(rl_dest, rl_result); } else { // Do the addition directly to memory. + ScopedMemRefType mem_ref_type(this, ResourceMask::kDalvikReg); OpMemReg(kOpAdd, rl_result, temp.GetReg()); } } -- 2.11.0