[llvm] [AArch64] Remove an unnecessary cast (NFC) (PR #155134)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 23 20:26:37 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/155134
Val is already of int64_t.
>From f06869d1061a0331e2ca5ecfd91f5cdf37f312c4 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 23 Aug 2025 20:06:21 -0700
Subject: [PATCH] [AArch64] Remove an unnecessary cast (NFC)
Val is already of int64_t.
---
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index fbd8f7a979d66..d70a46b0e8939 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -18309,7 +18309,7 @@ bool AArch64TargetLowering::shouldConvertConstantLoadToIntImm(const APInt &Imm,
if (Val == 0 || AArch64_AM::isLogicalImmediate(Val, BitSize))
return true;
- if ((int64_t)Val < 0)
+ if (Val < 0)
Val = ~Val;
if (BitSize == 32)
Val &= (1LL << 32) - 1;
More information about the llvm-commits
mailing list