[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
================
@@ -15495,6 +15461,36 @@ unsigned SITargetLowering::getFusedOpcode(const SelectionDAG &DAG,
return 0;
}
+// Check if an FADD node should be contracted into a fused operation.
+// Returns true if the FADD has only one use, or if all uses are contractable
+// FADD/FSUB operations that would allow the FADD to be eliminated.
+static bool shouldContractFAdd(SDValue FAdd, SelectionDAG &DAG) {
+ if (FAdd->hasOneUse())
----------------
arsenm wrote:
If you're going to search the user list anyway, might as well skip this
https://github.com/llvm/llvm-project/pull/169735
More information about the llvm-commits
mailing list