[llvm] 1f3c38f - [Support] Remove an unnecessary cast (NFC) (#154048)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 17 23:46:23 PDT 2025
Author: Kazu Hirata
Date: 2025-08-17T23:46:20-07:00
New Revision: 1f3c38f1258cc5ae2af5006ba8edfdb38dcd42c5
URL: https://github.com/llvm/llvm-project/commit/1f3c38f1258cc5ae2af5006ba8edfdb38dcd42c5
DIFF: https://github.com/llvm/llvm-project/commit/1f3c38f1258cc5ae2af5006ba8edfdb38dcd42c5.diff
LOG: [Support] Remove an unnecessary cast (NFC) (#154048)
qp is already of uint64_t.
Added:
Modified:
llvm/lib/Support/APInt.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index 1547f48bc7ac0..0c0e1d042e75d 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/lib/Support/APInt.cpp
@@ -1377,7 +1377,7 @@ static void KnuthDiv(uint32_t *u, uint32_t *v, uint32_t *q, uint32_t* r,
// the true value, and a "borrow" to the left should be remembered.
int64_t borrow = 0;
for (unsigned i = 0; i < n; ++i) {
- uint64_t p = uint64_t(qp) * uint64_t(v[i]);
+ uint64_t p = qp * uint64_t(v[i]);
int64_t subres = int64_t(u[j+i]) - borrow - Lo_32(p);
u[j+i] = Lo_32(subres);
borrow = Hi_32(p) - Hi_32(subres);
More information about the llvm-commits
mailing list