================
@@ -16946,6 +16946,73 @@ SDValue SITargetLowering::performAddCombine(SDNode *N,
   return SDValue();
 }
 
+// Try to fold saturating add with dot product intrinsic into dot instruction
+// with clamp. Matches patterns like:
+// uaddsat(dot4(..., 0), c) -> dot4(..., c) clamp
+// uaddsat(dot2(..., 0), c) -> dot2(..., c) clamp
+SDValue SITargetLowering::performSatAddCombine(SDNode *N,
----------------
addmisol wrote:

No, performSatAddCombine is currently not being called because 
ISD::UADDSAT/ISD::SADDSAT are not registered with setTargetDAGCombine. Without 
that registration, the DAG combiner never visits these nodes.

  Should I:
  1. Remove performSatAddCombine since the main paths are already covered, or
  2. Add setTargetDAGCombine({..., ISD::UADDSAT, ISD::SADDSAT, ..}) to make it 
functional?

https://github.com/llvm/llvm-project/pull/187945
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to