diff options
| author | Ben Cheng <bccheng@android.com> | 2010-03-17 23:32:26 -0700 |
|---|---|---|
| committer | Ben Cheng <bccheng@android.com> | 2010-03-17 23:32:26 -0700 |
| commit | 58ece73d25c78a05b94c820c5ec65b8a2edca81f (patch) | |
| tree | 267d46277484f65cc3968474f44a7deb5c4d7651 /vm/compiler/codegen/arm/LocalOptimizations.c | |
| parent | 312752642a4539788952260fc517d286f6a6202e (diff) | |
Bug fix for JIT peephole optimization.
Bug: 2520500
Change-Id: I36dbd8b3a6d13c40f9735df4918ab02b5f053b07
Diffstat (limited to 'vm/compiler/codegen/arm/LocalOptimizations.c')
| -rw-r--r-- | vm/compiler/codegen/arm/LocalOptimizations.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vm/compiler/codegen/arm/LocalOptimizations.c b/vm/compiler/codegen/arm/LocalOptimizations.c index 9f616b836..fbeceef4d 100644 --- a/vm/compiler/codegen/arm/LocalOptimizations.c +++ b/vm/compiler/codegen/arm/LocalOptimizations.c @@ -105,11 +105,13 @@ static void applyLoadStoreElimination(CompilationUnit *cUnit, moveLIR = dvmCompilerRegCopyNoInsert( cUnit, checkLIR->operands[0], nativeRegId); /* - * Insertion is guaranteed to succeed since checkLIR - * is never the first LIR on the list + * Insert the converted checkLIR instruction after the + * the original checkLIR since the optimization is + * scannng in the top-down order and the new instruction + * will need to be checked. */ - dvmCompilerInsertLIRBefore((LIR *) checkLIR, - (LIR *) moveLIR); + dvmCompilerInsertLIRAfter((LIR *) checkLIR, + (LIR *) moveLIR); } checkLIR->isNop = true; continue; |
