[llvm] [AMDGPU][SplitModule] Fix unintentional integer division (PR #117586)
Fraser Cormack via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 26 02:30:18 PST 2024
================
@@ -1101,7 +1101,7 @@ void RecursiveSearchSplitting::pickPartition(unsigned Depth, unsigned Idx,
// Check if the amount of code in common makes it worth it.
assert(SimilarDepsCost && Entry.CostExcludingGraphEntryPoints);
const double Ratio =
- SimilarDepsCost / Entry.CostExcludingGraphEntryPoints;
+ (double)SimilarDepsCost / Entry.CostExcludingGraphEntryPoints;
assert(Ratio >= 0.0 && Ratio <= 1.0);
if (LargeFnOverlapForMerge > Ratio) {
----------------
frasercrmck wrote:
Yep good spot, thanks
https://github.com/llvm/llvm-project/pull/117586
More information about the llvm-commits
mailing list