[Mlir-commits] [mlir] [mlir][arith] Improve `extf` folder (PR #80232)

Diego Caballero llvmlistbot at llvm.org
Thu Feb 1 21:08:49 PST 2024


================
@@ -1258,6 +1259,21 @@ static bool checkWidthChangeCast(TypeRange inputs, TypeRange outputs) {
                                      srcType.getIntOrFloatBitWidth());
 }
 
+/// Attempts to convert `sourceValue` to an APFloat value with
+/// `targetSemantics`, without any information loss or rounding. Return
+/// std::nullopt on failure.
+static std::optional<APFloat>
----------------
dcaballe wrote:

Return something like `FailureOr<APFloat>` instead?

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


More information about the Mlir-commits mailing list