OSDN Git Service

SetConstantWide should mark both SSA regs as constant
authorSerguei Katkov <serguei.i.katkov@intel.com>
Tue, 15 Jul 2014 10:25:46 +0000 (17:25 +0700)
committerSerguei Katkov <serguei.i.katkov@intel.com>
Mon, 21 Jul 2014 04:43:42 +0000 (11:43 +0700)
Without this change user have no chances to get the highest part
of wide reg using utility functions.

Change-Id: I2f56229ffb98276768a77c1e4a2913f288999328
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
compiler/dex/mir_optimization.cc

index 869c48f..d1a2f8e 100644 (file)
@@ -37,6 +37,7 @@ void MIRGraph::SetConstant(int32_t ssa_reg, int value) {
 
 void MIRGraph::SetConstantWide(int ssa_reg, int64_t value) {
   is_constant_v_->SetBit(ssa_reg);
+  is_constant_v_->SetBit(ssa_reg + 1);
   constant_values_[ssa_reg] = Low32Bits(value);
   constant_values_[ssa_reg + 1] = High32Bits(value);
 }