[llvm] [LangRef] Clarify the `nsz` semantic for `{u, s}itofp` (PR #201557)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 4 05:05:18 PDT 2026
https://github.com/paperchalice created https://github.com/llvm/llvm-project/pull/201557
`nsz` has special semantic in `{u,s}itofp`, which falls into the "unless otherwise mentioned" in `nsz` doc, this PR clarifies it in LangRef.
>From 0e3891369056f5f3c450bd943df1c231fc23445e Mon Sep 17 00:00:00 2001
From: PaperChalice <liujunchang97 at outlook.com>
Date: Thu, 4 Jun 2026 19:58:09 +0800
Subject: [PATCH] [LangRef] Clarify the `nsz` semantic for {u,s}itofp
---
llvm/docs/LangRef.rst | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 4bc684c23ea4f..83c07f16e6a29 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -13145,6 +13145,9 @@ the default rounding mode.
If the ``nneg`` flag is set, and the ``uitofp`` argument is negative,
the result is a poison value.
+if the '``nsz``' flag is set and the input value is 0, the sign bit of
+the result is non-deterministic.
+
Example:
""""""""
@@ -13192,6 +13195,9 @@ quantity and converts it to the corresponding floating-point value. If the
value cannot be exactly represented, it is rounded using the default rounding
mode.
+if the '``nsz``' flag is set and the input value is 0, the sign bit of
+the result is non-deterministic.
+
Example:
""""""""
More information about the llvm-commits
mailing list