Skip to content

[LangRef] Replace 'the argument' with 'the first argument' in llvm.abs description. NFC #97386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

topperc
Copy link
Collaborator

@topperc topperc commented Jul 2, 2024

Make it more clear which argument we're referring to.

Similar for vp.abs.

…s description. NFC

Make it more clear which argument we're referring to.

Similar for vp.abs.
@llvmbot
Copy link
Member

llvmbot commented Jul 2, 2024

@llvm/pr-subscribers-llvm-ir

Author: Craig Topper (topperc)

Changes

Make it more clear which argument we're referring to.

Similar for vp.abs.


Full diff: https://github.com/llvm/llvm-project/pull/97386.diff

1 Files Affected:

  • (modified) llvm/docs/LangRef.rst (+8-8)
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index e2c47204e628f..426f56d22dd79 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -14740,16 +14740,16 @@ The return type must match the first argument type.
 
 The second argument must be a constant and is a flag to indicate whether the
 result value of the '``llvm.abs``' intrinsic is a
-:ref:`poison value <poisonvalues>` if the argument is statically or dynamically
-an ``INT_MIN`` value.
+:ref:`poison value <poisonvalues>` if the first argument is statically or
+dynamically an ``INT_MIN`` value.
 
 Semantics:
 """"""""""
 
 The '``llvm.abs``' intrinsic returns the magnitude (always positive) of the
-argument or each element of a vector argument.". If the argument is ``INT_MIN``,
-then the result is also ``INT_MIN`` if ``is_int_min_poison == 0`` and
-``poison`` otherwise.
+first argument or each element of a vector argument.". If the first argument is
+``INT_MIN``, then the result is also ``INT_MIN`` if ``is_int_min_poison == 0``
+and ``poison`` otherwise.
 
 
 .. _int_smax:
@@ -20812,10 +20812,10 @@ Arguments:
 The first operand and the result have the same vector of integer type. The
 second operand is the vector mask and has the same number of elements as the
 result vector type. The third operand is the explicit vector length of the
-operation. The fourth argument must be a constant and is a flag to indicate
+operation. The fourth operand must be a constant and is a flag to indicate
 whether the result value of the '``llvm.vp.abs``' intrinsic is a
-:ref:`poison value <poisonvalues>` if the argument is statically or dynamically
-an ``INT_MIN`` value.
+:ref:`poison value <poisonvalues>` if the first argument is statically or
+dynamically an ``INT_MIN`` value.
 
 Semantics:
 """"""""""

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

:ref:`poison value <poisonvalues>` if the argument is statically or dynamically
an ``INT_MIN`` value.
:ref:`poison value <poisonvalues>` if the first argument is statically or
dynamically an ``INT_MIN`` value.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description has a weird mix of operand and argument -- should probably be argument everywhere?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOL - I just recommended that we consistently use argument on another patch as that's what the subsection is called - don't really care which we chose, just want it to be consistent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to make it consistent with preceding text and still failed.

@topperc topperc merged commit e3500ea into llvm:main Jul 2, 2024
10 checks passed
@topperc topperc deleted the pr/abs-langref branch July 2, 2024 16:26
topperc added a commit to topperc/llvm-project that referenced this pull request Jul 2, 2024
…s. NFC

Fixes inconsistencies noted in llvm#97386 and llvm#97387.

There are still more intrinsics that have the same issue. I might
submit more patches for those.
topperc added a commit that referenced this pull request Jul 2, 2024
…sics. NFC (#97437)

Fixes inconsistencies noted in #97386 and #97387.

There are still more intrinsics that have the same issue. I might submit
more patches for those.
lravenclaw pushed a commit to lravenclaw/llvm-project that referenced this pull request Jul 3, 2024
…s description. NFC (llvm#97386)

Make it more clear which argument we're referring to.

Similar for vp.abs.
lravenclaw pushed a commit to lravenclaw/llvm-project that referenced this pull request Jul 3, 2024
…sics. NFC (llvm#97437)

Fixes inconsistencies noted in llvm#97386 and llvm#97387.

There are still more intrinsics that have the same issue. I might submit
more patches for those.
kbluck pushed a commit to kbluck/llvm-project that referenced this pull request Jul 6, 2024
…s description. NFC (llvm#97386)

Make it more clear which argument we're referring to.

Similar for vp.abs.
kbluck pushed a commit to kbluck/llvm-project that referenced this pull request Jul 6, 2024
…sics. NFC (llvm#97437)

Fixes inconsistencies noted in llvm#97386 and llvm#97387.

There are still more intrinsics that have the same issue. I might submit
more patches for those.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants