[llvm] d77aafb - [PowerPC] Remove an unnecessary cast (NFC) (#156599)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 3 07:48:40 PDT 2025
Author: Kazu Hirata
Date: 2025-09-03T07:48:36-07:00
New Revision: d77aafbeee174449d590aaef656ea7f5ea001303
URL: https://github.com/llvm/llvm-project/commit/d77aafbeee174449d590aaef656ea7f5ea001303
DIFF: https://github.com/llvm/llvm-project/commit/d77aafbeee174449d590aaef656ea7f5ea001303.diff
LOG: [PowerPC] Remove an unnecessary cast (NFC) (#156599)
getSExtValue already returns int64_t.
Added:
Modified:
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
index eb9b376b4f62e..fa104e4f69d7f 100644
--- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -2698,7 +2698,7 @@ bool llvm::isIntS34Immediate(SDNode *N, int64_t &Imm) {
if (!isa<ConstantSDNode>(N))
return false;
- Imm = (int64_t)cast<ConstantSDNode>(N)->getSExtValue();
+ Imm = cast<ConstantSDNode>(N)->getSExtValue();
return isInt<34>(Imm);
}
bool llvm::isIntS34Immediate(SDValue Op, int64_t &Imm) {
More information about the llvm-commits
mailing list