Fix script when using --verify-soft-fail and --jit.

We were wrongly passing --assume-verified as compiler filter.

Also remove some obsolete code in the verifier exposed by
636-wrong-static-access.

Test: 636-wrong-static-access
Bug: 177799064
Change-Id: I2ff15089b114bb7c482381c0f9364db869b1902d
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index ae71ad3..7faf9c2 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -5239,17 +5239,6 @@
       }
     }
 
-    if (verifier.HasInstructionThatWillThrow()) {
-      // The dead code after the throw is not verified and might be invalid. This may cause
-      // the JIT compiler to crash since it assumes that all the code is valid.
-      set_dont_compile = true;
-      if (aot_mode) {
-        // Make HasInstructionThatWillThrow a soft error to trigger
-        // re-verification at runtime.
-        result.kind = FailureKind::kSoftFailure;
-      }
-    }
-
     if (method != nullptr) {
       verifier_callback->SetDontCompile(method, set_dont_compile);
       verifier_callback->SetMustCountLocks(method, must_count_locks);
diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar
index 66dc3c1..75a0f69 100755
--- a/test/etc/run-test-jar
+++ b/test/etc/run-test-jar
@@ -789,34 +789,29 @@
 
 if [ "$INTERPRETER" = "y" ]; then
     INT_OPTS="${INT_OPTS} -Xint"
-    if [ "$VERIFY" = "y" ] ; then
-      INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=quicken"
-      COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=quicken"
-    elif [ "$VERIFY" = "s" ]; then
-      INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=extract"
-      COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=extract"
-      DEX_VERIFY="${DEX_VERIFY} -Xverify:softfail"
-    else # VERIFY = "n"
-      INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=assume-verified"
-      COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=assume-verified"
-      DEX_VERIFY="${DEX_VERIFY} -Xverify:none"
-    fi
 fi
 
 if [ "$JIT" = "y" ]; then
     INT_OPTS="${INT_OPTS} -Xusejit:true"
-    if [ "$VERIFY" = "y" ] ; then
-      INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=quicken"
-      COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=quicken"
-    else
-      INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=assume-verified"
-      COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=assume-verified"
-      DEX_VERIFY="${DEX_VERIFY} -Xverify:none"
-    fi
 else
     INT_OPTS="${INT_OPTS} -Xusejit:false"
 fi
 
+if [ "$INTERPRETER" = "y" ] || [ "$JIT" = "y" ]; then
+  if [ "$VERIFY" = "y" ] ; then
+    INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=verify"
+    COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=verify"
+  elif [ "$VERIFY" = "s" ]; then
+    INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=extract"
+    COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=extract"
+    DEX_VERIFY="${DEX_VERIFY} -Xverify:softfail"
+  else # VERIFY = "n"
+    INT_OPTS="${INT_OPTS} -Xcompiler-option --compiler-filter=assume-verified"
+    COMPILE_FLAGS="${COMPILE_FLAGS} --compiler-filter=assume-verified"
+    DEX_VERIFY="${DEX_VERIFY} -Xverify:none"
+  fi
+fi
+
 JNI_OPTS="-Xjnigreflimit:512 -Xcheck:jni"
 
 COMPILE_FLAGS="${COMPILE_FLAGS} --runtime-arg -Xnorelocate"