summaryrefslogtreecommitdiff
path: root/src/compiler/codegen
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/codegen')
-rw-r--r--src/compiler/codegen/MethodBitcode.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/codegen/MethodBitcode.cc b/src/compiler/codegen/MethodBitcode.cc
index 864372a544..a8da1cde44 100644
--- a/src/compiler/codegen/MethodBitcode.cc
+++ b/src/compiler/codegen/MethodBitcode.cc
@@ -2279,7 +2279,10 @@ void cvtBinOp(CompilationUnit* cUnit, OpKind op, llvm::Instruction* inst)
Instruction::Code dalvikOp = getDalvikOpcode(op, false, rlDest.wide);
RegLocation rlSrc2;
if (constRhs != NULL) {
- DCHECK_EQ(dalvikOp, Instruction::NOT_LONG);
+ // ir_builder converts NOT_LONG to xor src, -1. Restore
+ DCHECK_EQ(dalvikOp, Instruction::XOR_LONG);
+ DCHECK_EQ(-1L, constRhs->getSExtValue());
+ dalvikOp = Instruction::NOT_LONG;
rlSrc2 = rlSrc1;
} else {
rlSrc2 = getLoc(cUnit, rhs);