[llvm-branch-commits] [mlir] [mlir][arith] Add support for `sitofp`, `uitofp` to `ArithToAPFloat` (PR #169284)

Maksim Levental via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Nov 24 09:01:00 PST 2025


================
@@ -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


More information about the llvm-branch-commits mailing list