[llvm] [IR] Fix typo in trunc nuw semantics; NFC (PR #87285)

Jacob Lifshay via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 1 16:31:17 PDT 2024


https://github.com/programmerjake updated https://github.com/llvm/llvm-project/pull/87285

>From ba6e2bb14347436ad310a70400d5d6959e4e88dd Mon Sep 17 00:00:00 2001
From: Jacob Lifshay <programmerjake at gmail.com>
Date: Mon, 1 Apr 2024 15:08:27 -0700
Subject: [PATCH] [IR] Fix typo in trunc nuw semantics; NFC

---
 llvm/docs/LangRef.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 1d4ff5238226c2..fbdd4c641fc94a 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -11445,7 +11445,7 @@ and converts the remaining bits to ``ty2``. Since the source size must
 be larger than the destination size, ``trunc`` cannot be a *no-op cast*.
 It will always truncate bits.
 
-If the ``nuw`` keyword is present, and any of the truncated bits are zero,
+If the ``nuw`` keyword is present, and any of the truncated bits are non-zero,
 the result is a :ref:`poison value <poisonvalues>`. If the ``nsw`` keyword
 is present, and any of the truncated bits are not the same as the top bit
 of the truncation result, the result is a :ref:`poison value <poisonvalues>`.



More information about the llvm-commits mailing list