[llvm] [AMDGPU][SplitModule] Fix unintentional integer division (PR #117586)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 26 07:58:00 PST 2024


================
@@ -1101,9 +1101,9 @@ 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;
----------------
arsenm wrote:

static_cast 

https://github.com/llvm/llvm-project/pull/117586


More information about the llvm-commits mailing list