summaryrefslogtreecommitdiff
path: root/compiler/utils/arm/assembler_thumb2.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-07-01 11:46:48 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2015-07-01 11:46:49 +0000
commitc7657e93b6b045eaff18190b8133361652bf8c1c (patch)
tree333b935a74e61b54acfa903112c44fc009fb48ea /compiler/utils/arm/assembler_thumb2.cc
parent2b252dc15995a708aead33aab6d307205d860a88 (diff)
parent2bcb43111edf7bf99fe409ff3e9c76a285e54c25 (diff)
Merge "Use CompareAndBranchIf(Non)Zero when applicable."
Diffstat (limited to 'compiler/utils/arm/assembler_thumb2.cc')
-rw-r--r--compiler/utils/arm/assembler_thumb2.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/utils/arm/assembler_thumb2.cc b/compiler/utils/arm/assembler_thumb2.cc
index f9e1ac672e..2dde0149a6 100644
--- a/compiler/utils/arm/assembler_thumb2.cc
+++ b/compiler/utils/arm/assembler_thumb2.cc
@@ -3341,7 +3341,7 @@ void Thumb2Assembler::dmb(DmbOptions flavor) {
void Thumb2Assembler::CompareAndBranchIfZero(Register r, Label* label) {
- if (CanRelocateBranches() && IsLowRegister(r)) {
+ if (CanRelocateBranches() && IsLowRegister(r) && !label->IsBound()) {
cbz(r, label);
} else {
cmp(r, ShifterOperand(0));
@@ -3351,7 +3351,7 @@ void Thumb2Assembler::CompareAndBranchIfZero(Register r, Label* label) {
void Thumb2Assembler::CompareAndBranchIfNonZero(Register r, Label* label) {
- if (CanRelocateBranches() && IsLowRegister(r)) {
+ if (CanRelocateBranches() && IsLowRegister(r) && !label->IsBound()) {
cbnz(r, label);
} else {
cmp(r, ShifterOperand(0));