Merge "X86 Long Min/Max: Avoid calling SRegToVReg with -1"
diff --git a/compiler/dex/quick/x86/int_x86.cc b/compiler/dex/quick/x86/int_x86.cc
index 07034cb..acf5599 100755
--- a/compiler/dex/quick/x86/int_x86.cc
+++ b/compiler/dex/quick/x86/int_x86.cc
@@ -858,6 +858,11 @@
RegLocation rl_dest = InlineTargetWide(info);
int res_vreg, src1_vreg, src2_vreg;
+ if (rl_dest.s_reg_low == INVALID_SREG) {
+ // Result is unused, the code is dead. Inlining successful, no code generated.
+ return true;
+ }
+
/*
* If the result register is the same as the second element, then we
* need to be careful. The reason is that the first copy will