[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:16:24 PDT 2026
https://github.com/paperchalice updated https://github.com/llvm/llvm-project/pull/201557
>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 1/2] [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:
""""""""
>From 033f8b74367ed3be03f501085ecb4f97b5882436 Mon Sep 17 00:00:00 2001
From: PaperChalice <liujunchang97 at outlook.com>
Date: Thu, 4 Jun 2026 20:16:08 +0800
Subject: [PATCH 2/2] if -> If
---
llvm/docs/LangRef.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 83c07f16e6a29..8250a9f9b5ca5 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -13145,7 +13145,7 @@ 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
+If the '``nsz``' flag is set and the input value is 0, the sign bit of
the result is non-deterministic.
@@ -13195,7 +13195,7 @@ 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
+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