diff options
author | 2025-01-02 09:58:57 +0000 | |
---|---|---|
committer | 2025-01-02 07:25:57 -0800 | |
commit | 6cf6c027e70a43922e2bd5e6f62414f9951ab232 (patch) | |
tree | c6c7b2a27063e04fabde6afe9ab86afcc84ff0cf | |
parent | ffa1f7611b9bfe6f9a8bbf268773e03ff2ab4f7b (diff) |
Rename `AsAddOrSub()` - add suffix `OrNull`.
Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Change-Id: I89d00710a4492fcca02dd12879702730c25779b3
-rw-r--r-- | compiler/optimizing/instruction_simplifier.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc index 703f6c77e8..69a880c242 100644 --- a/compiler/optimizing/instruction_simplifier.cc +++ b/compiler/optimizing/instruction_simplifier.cc @@ -3562,7 +3562,7 @@ bool InstructionSimplifierVisitor::TryHandleAssociativeAndCommutativeOperation( return true; } -static HBinaryOperation* AsAddOrSub(HInstruction* binop) { +static HBinaryOperation* AsAddOrSubOrNull(HInstruction* binop) { return (binop->IsAdd() || binop->IsSub()) ? binop->AsBinaryOperation() : nullptr; } @@ -3607,9 +3607,9 @@ bool InstructionSimplifierVisitor::TrySubtractionChainSimplification( return false; } - HBinaryOperation* y = (AsAddOrSub(left) != nullptr) + HBinaryOperation* y = (AsAddOrSubOrNull(left) != nullptr) ? left->AsBinaryOperation() - : AsAddOrSub(right); + : AsAddOrSubOrNull(right); // If y has more than one use, we do not perform the optimization because // it might increase code size (e.g. if the new constant is no longer // encodable as an immediate operand in the target ISA). |