[llvm] [Reassociate] Use uint64_t for repeat count (PR #94232)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 09:15:54 PDT 2024


================
@@ -562,7 +469,8 @@ static bool LinearizeExprTree(Instruction *I,
                "In leaf map but not visited!");
 
         // Update the number of paths to the leaf.
-        IncorporateWeight(It->second, Weight, Opcode);
+        It->second += Weight;
+        assert(It->second >= Weight && "Weight overflows");
----------------
dtcxzyw wrote:

See https://github.com/llvm/llvm-project/blob/374f6554c3e409e4b9b5fd0ec90c5272768f5ab9/llvm/lib/Support/APInt.cpp#L1905-L1909

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


More information about the llvm-commits mailing list