ART: Fix run-jdwp-tests.sh

Fix for running with the RI.

Follow-up to commits 1fc309a2a78795ac68d264b6cfafc2f1154e551c
and d0d25fecd72c6a9ec591a416ff76a0970a3a844e.

Bug: 116674705
Test: mmma external/apache-harmony/jdwp && m vogar && art/tools/run-jdwp-tests.sh --mode=jvm
Change-Id: Ie17fdb96df45f0d4dbab32f2ee3b03414a1c5819
diff --git a/tools/run-jdwp-tests.sh b/tools/run-jdwp-tests.sh
index 13f756c..20e5c64 100755
--- a/tools/run-jdwp-tests.sh
+++ b/tools/run-jdwp-tests.sh
@@ -311,16 +311,16 @@
   vm_args="$vm_args --vm-arg $plugin"
 fi
 
-# Because we're running debuggable, we discard any AOT code.
-# Therefore we run de2oat with 'quicken' to avoid spending time compiling.
-vm_args="$vm_args --vm-arg -Xcompiler-option --vm-arg --compiler-filter=quicken"
-debuggee_args="$debuggee_args -Xcompiler-option --compiler-filter=quicken"
-
-if $instant_jit; then
-  debuggee_args="$debuggee_args -Xjitthreshold:0"
-fi
-
 if [[ $mode != "ri" ]]; then
+  # Because we're running debuggable, we discard any AOT code.
+  # Therefore we run de2oat with 'quicken' to avoid spending time compiling.
+  vm_args="$vm_args --vm-arg -Xcompiler-option --vm-arg --compiler-filter=quicken"
+  debuggee_args="$debuggee_args -Xcompiler-option --compiler-filter=quicken"
+
+  if $instant_jit; then
+    debuggee_args="$debuggee_args -Xjitthreshold:0"
+  fi
+
   vm_args="$vm_args --vm-arg -Xusejit:$use_jit"
   debuggee_args="$debuggee_args -Xusejit:$use_jit"
 fi