summaryrefslogtreecommitdiff
path: root/compiler/optimizing
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing')
-rw-r--r--compiler/optimizing/intrinsics_arm64.cc3
-rw-r--r--compiler/optimizing/ssa_liveness_analysis_test.cc4
2 files changed, 6 insertions, 1 deletions
diff --git a/compiler/optimizing/intrinsics_arm64.cc b/compiler/optimizing/intrinsics_arm64.cc
index 934ba1b9fb..807d6cf54f 100644
--- a/compiler/optimizing/intrinsics_arm64.cc
+++ b/compiler/optimizing/intrinsics_arm64.cc
@@ -1560,7 +1560,10 @@ void IntrinsicCodeGeneratorARM64::VisitStringEquals(HInvoke* invoke) {
// Load `count` field of the argument string and check if it matches the const string.
// Also compares the compression style, if differs return false.
__ Ldr(temp, MemOperand(arg.X(), count_offset));
+ // Temporarily release temp1 as we may not be able to embed the flagged count in CMP immediate.
+ scratch_scope.Release(temp1);
__ Cmp(temp, Operand(mirror::String::GetFlaggedCount(const_string_length, is_compressed)));
+ temp1 = scratch_scope.AcquireW();
__ B(&return_false, ne);
} else {
// Load `count` fields of this and argument strings.
diff --git a/compiler/optimizing/ssa_liveness_analysis_test.cc b/compiler/optimizing/ssa_liveness_analysis_test.cc
index cc48d3196b..1916c73ca4 100644
--- a/compiler/optimizing/ssa_liveness_analysis_test.cc
+++ b/compiler/optimizing/ssa_liveness_analysis_test.cc
@@ -32,6 +32,7 @@ class SsaLivenessAnalysisTest : public testing::Test {
: pool_(),
allocator_(&pool_),
graph_(CreateGraph(&allocator_)),
+ compiler_options_(),
instruction_set_(kRuntimeISA) {
std::string error_msg;
instruction_set_features_ =
@@ -39,7 +40,7 @@ class SsaLivenessAnalysisTest : public testing::Test {
codegen_ = CodeGenerator::Create(graph_,
instruction_set_,
*instruction_set_features_,
- CompilerOptions());
+ compiler_options_);
CHECK(codegen_ != nullptr) << instruction_set_ << " is not a supported target architecture.";
// Create entry block.
entry_ = new (&allocator_) HBasicBlock(graph_);
@@ -59,6 +60,7 @@ class SsaLivenessAnalysisTest : public testing::Test {
ArenaPool pool_;
ArenaAllocator allocator_;
HGraph* graph_;
+ CompilerOptions compiler_options_;
InstructionSet instruction_set_;
std::unique_ptr<const InstructionSetFeatures> instruction_set_features_;
std::unique_ptr<CodeGenerator> codegen_;