Update compiler/ implications to use (D)CHECK_IMPLIES
Follow-up to aosp/1988868 in which we added the (D)CHECK_IMPLIES
macro. This CL uses it on compiler/ occurrences found by a regex.
Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b
Change-Id: If63aed969bfb8b31d6fbbcb3bca2b04314c894b7
diff --git a/compiler/optimizing/code_generator_arm64.cc b/compiler/optimizing/code_generator_arm64.cc
index 548b2d4..fc1c07d 100644
--- a/compiler/optimizing/code_generator_arm64.cc
+++ b/compiler/optimizing/code_generator_arm64.cc
@@ -2418,9 +2418,9 @@
// operand. Note that VIXL would still manage if it was passed by generating
// the extension as a separate instruction.
// `HNeg` also does not support extension. See comments in `ShifterOperandSupportsExtension()`.
- DCHECK(!right_operand.IsExtendedRegister() ||
- (kind != HInstruction::kAnd && kind != HInstruction::kOr && kind != HInstruction::kXor &&
- kind != HInstruction::kNeg));
+ DCHECK_IMPLIES(right_operand.IsExtendedRegister(),
+ kind != HInstruction::kAnd && kind != HInstruction::kOr &&
+ kind != HInstruction::kXor && kind != HInstruction::kNeg);
switch (kind) {
case HInstruction::kAdd:
__ Add(out, left, right_operand);
@@ -7169,7 +7169,7 @@
// For JIT, the slow path is considered part of the compiled method,
// so JIT should pass null as `debug_name`.
- DCHECK(!GetCompilerOptions().IsJitCompiler() || debug_name == nullptr);
+ DCHECK_IMPLIES(GetCompilerOptions().IsJitCompiler(), debug_name == nullptr);
if (debug_name != nullptr && GetCompilerOptions().GenerateAnyDebugInfo()) {
std::ostringstream oss;
oss << "BakerReadBarrierThunk";