From 16789b954241e67dfe31b096eab1e93f8b49e2fb Mon Sep 17 00:00:00 2001 From: Rose Date: Mon, 28 Jul 2025 19:18:03 -0400 Subject: [PATCH] Remove redundant inclusion for 0 (NFC) If Add Constant is 0, return true anyway. --- llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp index 7b49754ee7e1f..8300d38ffef63 100644 --- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp +++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp @@ -24805,15 +24805,14 @@ static bool isEquivalentMaskless(unsigned CC, unsigned width, case AArch64CC::GT: if ((AddConstant == 0) || (CompConstant == MaxUInt - 1 && AddConstant < 0) || - (AddConstant >= 0 && CompConstant < 0) || - (AddConstant <= 0 && CompConstant <= 0 && CompConstant < AddConstant)) + (AddConstant > 0 && CompConstant < 0) || + (AddConstant < 0 && CompConstant <= 0 && CompConstant < AddConstant)) return true; break; case AArch64CC::LT: case AArch64CC::GE: - if ((AddConstant == 0) || - (AddConstant >= 0 && CompConstant <= 0) || - (AddConstant <= 0 && CompConstant <= 0 && CompConstant <= AddConstant)) + if ((AddConstant == 0) || (AddConstant > 0 && CompConstant <= 0) || + (AddConstant < 0 && CompConstant <= 0 && CompConstant <= AddConstant)) return true; break; case AArch64CC::HI: @@ -24825,8 +24824,7 @@ static bool isEquivalentMaskless(unsigned CC, unsigned width, break; case AArch64CC::PL: case AArch64CC::MI: - if ((AddConstant == 0) || - (AddConstant > 0 && CompConstant <= 0) || + if ((AddConstant == 0) || (AddConstant > 0 && CompConstant <= 0) || (AddConstant < 0 && CompConstant <= AddConstant)) return true; break;