[llvm] 57412c3 - [GlobalISel] Update the documentation of abd. (#164594)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 22 05:20:30 PDT 2025
Author: David Green
Date: 2025-10-22T13:20:26+01:00
New Revision: 57412c3485c5614348015f37ce69be0f378fcad9
URL: https://github.com/llvm/llvm-project/commit/57412c3485c5614348015f37ce69be0f378fcad9
DIFF: https://github.com/llvm/llvm-project/commit/57412c3485c5614348015f37ce69be0f378fcad9.diff
LOG: [GlobalISel] Update the documentation of abd. (#164594)
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 and so produce different results. Update the
description of the instruction to avoid misunderstandings.
Added:
Modified:
llvm/docs/GlobalISel/GenericOpcode.rst
Removed:
################################################################################
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
diff erence (signed and unsigned), e.g. abs(x-y).
+Compute the absolute
diff erence (signed and unsigned), e.g. trunc(abs(ext(x)-ext(y)).
.. code-block:: none
More information about the llvm-commits
mailing list