================
@@ -115,4 +115,16 @@ MLIR_APFLOAT_WRAPPERS_EXPORT uint64_t
_mlir_apfloat_convert_to_int(
val.convertToInteger(result, llvm::RoundingMode::NearestTiesToEven,
&isExact);
return result.getZExtValue();
}
+
+MLIR_APFLOAT_WRAPPERS_EXPORT uint64_t _mlir_apfloat_convert_from_int(
+ int32_t semantics, int32_t inputWidth, bool isUnsigned, uint64_t a) {
+ llvm::APInt val(inputWidth, a, /*isSigned=*/!isUnsigned);
----------------
makslevental wrote:
lol
https://github.com/llvm/llvm-project/pull/169284
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits