Fix arm32 code generator when used with baseline compilation.
A shift with zero can happen in baseline as we don't run
instruction simplification.
Also move baseline testing to AOT to catch such regressions.
Test: test.py --baseline
Change-Id: I9fa7af8e058135688ec44d907da7a6da27a6311e
diff --git a/compiler/optimizing/code_generator_arm_vixl.cc b/compiler/optimizing/code_generator_arm_vixl.cc
index c8db3d6..6469c69 100644
--- a/compiler/optimizing/code_generator_arm_vixl.cc
+++ b/compiler/optimizing/code_generator_arm_vixl.cc
@@ -4972,8 +4972,11 @@
__ Lsrs(o_h, high, 1);
__ Rrx(o_l, low);
}
+ } else if (shift_value == 0) {
+ __ Mov(o_l, low);
+ __ Mov(o_h, high);
} else {
- DCHECK(0 <= shift_value && shift_value < 32) << shift_value;
+ DCHECK(0 < shift_value && shift_value < 32) << shift_value;
if (op->IsShl()) {
__ Lsl(o_h, high, shift_value);
__ Orr(o_h, o_h, Operand(low, ShiftType::LSR, 32 - shift_value));
diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar
index e993fda..bcd35e6 100755
--- a/test/etc/run-test-jar
+++ b/test/etc/run-test-jar
@@ -322,6 +322,7 @@
shift
elif [ "x$1" = "x--baseline" ]; then
FLAGS="${FLAGS} -Xcompiler-option --baseline"
+ COMPILE_FLAGS="${COMPILE_FLAGS} --baseline"
shift
elif [ "x$1" = "x--jvm" ]; then
USE_JVM="y"
diff --git a/test/knownfailures.json b/test/knownfailures.json
index e78e002..dc8acd7 100644
--- a/test/knownfailures.json
+++ b/test/knownfailures.json
@@ -1214,5 +1214,14 @@
"Doesn't work with profiles because the run-test is not setup to",
"support both. It also needs full verification, so no interp-ac.",
"Requires zip, which isn't available on device"]
+ },
+ {
+ "tests": ["004-ReferenceMap",
+ "449-checker-bce",
+ "466-get-live-vreg",
+ "563-checker-fakestring",
+ "575-checker-string-init-alias"],
+ "variant": "baseline",
+ "description": [ "Working as intended tests that don't pass with baseline." ]
}
]