[llvm] [AMDGPU][SplitModule] Fix unintentional integer division (PR #117586)
Pierre van Houtryve via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 25 23:12:34 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) {
----------------
Pierre-vh wrote:
I think this needs to be reversed, so `Ratio > LargeFnOverlapForMerge`
https://github.com/llvm/llvm-project/pull/117586
More information about the llvm-commits
mailing list