[llvm] [AMDGPU][DAGCombiner][GlobalISel] Prevent FMA contraction when multiply cannot be eliminated (PR #169735)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 1 09:06:38 PST 2025
================
@@ -6208,6 +6208,102 @@ static bool hasMoreUses(const MachineInstr &MI0, const MachineInstr &MI1,
MRI.use_instr_nodbg_end());
}
+/// Check if all uses of a multiply instruction can be contracted into FMAs.
+/// This prevents creating FMAs when the multiply has other uses that can't
+/// be contracted, which would duplicate the multiply computation.
+static bool allMulUsesCanBeContracted(const MachineInstr &MulMI,
----------------
arsenm wrote:
I doubt any of the globalisel path is covered in existing tests
https://github.com/llvm/llvm-project/pull/169735
More information about the llvm-commits
mailing list