Merge "Fix LoadValue{Wide} to free temp when reg classes are not matched"
diff --git a/compiler/dex/quick/gen_loadstore.cc b/compiler/dex/quick/gen_loadstore.cc
index 39b40a0..d314601 100644
--- a/compiler/dex/quick/gen_loadstore.cc
+++ b/compiler/dex/quick/gen_loadstore.cc
@@ -149,8 +149,9 @@
// Wrong register class, realloc, copy and transfer ownership.
RegStorage new_reg = AllocTypedTemp(rl_src.fp, op_kind);
OpRegCopy(new_reg, rl_src.reg);
- // Clobber the old reg.
+ // Clobber the old regs and free it.
Clobber(rl_src.reg);
+ FreeTemp(rl_src.reg);
// ...and mark the new one live.
rl_src.reg = new_reg;
MarkLive(rl_src);
@@ -232,8 +233,9 @@
// Wrong register class, realloc, copy and transfer ownership.
RegStorage new_regs = AllocTypedTempWide(rl_src.fp, op_kind);
OpRegCopyWide(new_regs, rl_src.reg);
- // Clobber the old regs.
+ // Clobber the old regs and free it.
Clobber(rl_src.reg);
+ FreeTemp(rl_src.reg);
// ...and mark the new ones live.
rl_src.reg = new_regs;
MarkLive(rl_src);