[llvm] [AggressiveInstCombine] Fold i64 x i64 -> i128 multiply-by-parts (PR #156879)

David Green via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 28 07:09:18 PDT 2025


================
@@ -1428,6 +1428,259 @@ static bool foldLibCalls(Instruction &I, TargetTransformInfo &TTI,
   return false;
 }
 
+/// Match low part of 128-bit multiplication.
+static bool foldMul128Low(Instruction &I, const DataLayout &DL,
+                          DominatorTree &DT) {
+  auto *Ty = I.getType();
+  if (!Ty->isIntegerTy(64))
----------------
davemgreen wrote:

What would happen if this was generalized to more types? Would it trigger a lot more, and would those be profitable for smaller types? It would help make this more generic.

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


More information about the llvm-commits mailing list