[llvm] 7d3d9fe - [DAG] TargetLowering::BuildUDIV - use APInt as const ref. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 4 04:15:23 PST 2021
Author: Simon Pilgrim
Date: 2021-03-04T12:15:08Z
New Revision: 7d3d9fe8cdf5f884c1babab0c3bf3aa858bb5a1f
URL: https://github.com/llvm/llvm-project/commit/7d3d9fe8cdf5f884c1babab0c3bf3aa858bb5a1f
DIFF: https://github.com/llvm/llvm-project/commit/7d3d9fe8cdf5f884c1babab0c3bf3aa858bb5a1f.diff
LOG: [DAG] TargetLowering::BuildUDIV - use APInt as const ref. NFCI.
Fixes clang-tidy warning.
Added:
Modified:
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index a18d6a88b2a1..d31b289f6fe9 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -5257,7 +5257,7 @@ SDValue TargetLowering::BuildUDIV(SDNode *N, SelectionDAG &DAG,
return false;
// FIXME: We should use a narrower constant when the upper
// bits are known to be zero.
- APInt Divisor = C->getAPIntValue();
+ const APInt& Divisor = C->getAPIntValue();
APInt::mu magics = Divisor.magicu();
unsigned PreShift = 0, PostShift = 0;
More information about the llvm-commits
mailing list