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

Jacob Lifshay via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 1 15:08:59 PDT 2024


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

None

>From 86612b89f053195a10d13fff55f865be2090be22 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] Fix typo in trunc nuw semantics

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