Fix read of uninitialized memory in InlineIndexOf

The are two flavors of IndexOf that we treat as an intrinsic: a
zero-based verion with 2 args and a 3-arg version that also takes
a start position.  The same code is used for both, but Valgrind
reminded us that we shouldn't try loading a RegLocation for the
non-extent 3rd arg in the 2 argument version.

We got lucky in that the bug was benign - the generated code would
still be correct.

Change-Id: I0bc7798c8034d35007ffe6d6d62f9ceb91fc44fd
diff --git a/compiler/dex/quick/x86/target_x86.cc b/compiler/dex/quick/x86/target_x86.cc
index ef8be3c..78a2169 100644
--- a/compiler/dex/quick/x86/target_x86.cc
+++ b/compiler/dex/quick/x86/target_x86.cc
@@ -948,7 +948,7 @@
 
   RegLocation rl_obj = info->args[0];
   RegLocation rl_char = info->args[1];
-  RegLocation rl_start = info->args[2];
+  RegLocation rl_start;  // Note: only present in III flavor or IndexOf.
 
   uint32_t char_value =
     rl_char.is_const ? mir_graph_->ConstantValue(rl_char.orig_sreg) : 0;
@@ -1007,6 +1007,7 @@
     // We have to handle an empty string.  Use special instruction JECXZ.
     length_compare = NewLIR0(kX86Jecxz8);
   } else {
+    rl_start = info->args[2];
     // We have to offset by the start index.
     if (rl_start.is_const) {
       start_value = mir_graph_->ConstantValue(rl_start.orig_sreg);