From ab510a98d2bc86ca7574e8ab186c1d90c8c6b27f Mon Sep 17 00:00:00 2001 From: David Green Date: Wed, 22 Oct 2025 11:13:03 +0100 Subject: [PATCH] [GlobalISel] Update the documentation of abd. The abd nodes do not perform the same as abs(x-y), although they are often mistaken to do so. They extend into a larger bit size before performing the sub / abs. Update the description of the instruction to avoid misunderstandings. --- llvm/docs/GlobalISel/GenericOpcode.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/docs/GlobalISel/GenericOpcode.rst b/llvm/docs/GlobalISel/GenericOpcode.rst index b055327466739..661a11537cf57 100644 --- a/llvm/docs/GlobalISel/GenericOpcode.rst +++ b/llvm/docs/GlobalISel/GenericOpcode.rst @@ -504,7 +504,7 @@ undefined. G_ABDS, G_ABDU ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Compute the absolute difference (signed and unsigned), e.g. abs(x-y). +Compute the absolute difference (signed and unsigned), e.g. trunc(abs(ext(x)-ext(y)). .. code-block:: none