================
@@ -7048,24 +7071,65 @@ static SDValue combineF16AddWithNeg(SDNode *N, 
SelectionDAG &DAG,
     return SDValue();
   }
 
-  SDLoc DL(N);
-  return DAG.getNode(getF16SubOpc(AddIntrinsicID), DL, N->getValueType(0),
-                     SubOp1, SubOp2);
+  return DAG.getNode(Opc, SDLoc(N), VT, SubOp1, SubOp2);
+}
+
+static bool isSupportedFAdd(EVT VT, Intrinsic::ID IID, APFloat::roundingMode 
RM,
+                            const NVPTXSubtarget &STI) {
+  if (VT.isVector() && VT.getVectorElementCount() != ElementCount::getFixed(2))
+    return false;
+
+  const bool IsSat = nvvm::FAddShouldSaturate(IID);
+  switch (VT.getScalarType().getSimpleVT().SimpleTy) {
+  case MVT::f16:
+    return RM == APFloat::rmNearestTiesToEven;
----------------
durga4github wrote:

let us have this result in a variable and reuse below. 
```
bool IsRN = RM == APFloat::rmNearestTiesToEven;
```


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

Reply via email to