Skip to content

[LangRef] Update the position of some parameters in the vp intrinsic of abs/cttz/ctlz #117519

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
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions llvm/docs/LangRef.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21522,9 +21522,9 @@ This is an overloaded intrinsic.

::

declare <16 x i32> @llvm.vp.abs.v16i32 (<16 x i32> <op>, <16 x i1> <mask>, i32 <vector_length>, i1 <is_int_min_poison>)
declare <vscale x 4 x i32> @llvm.vp.abs.nxv4i32 (<vscale x 4 x i32> <op>, <vscale x 4 x i1> <mask>, i32 <vector_length>, i1 <is_int_min_poison>)
declare <256 x i64> @llvm.vp.abs.v256i64 (<256 x i64> <op>, <256 x i1> <mask>, i32 <vector_length>, i1 <is_int_min_poison>)
declare <16 x i32> @llvm.vp.abs.v16i32 (<16 x i32> <op>, i1 <is_int_min_poison>, <16 x i1> <mask>, i32 <vector_length>)
declare <vscale x 4 x i32> @llvm.vp.abs.nxv4i32 (<vscale x 4 x i32> <op>, i1 <is_int_min_poison>, <vscale x 4 x i1> <mask>, i32 <vector_length>)
declare <256 x i64> @llvm.vp.abs.v256i64 (<256 x i64> <op>, i1 <is_int_min_poison>, <256 x i1> <mask>, i32 <vector_length>)

Overview:
"""""""""
Expand All @@ -21536,12 +21536,12 @@ Arguments:
""""""""""

The first argument and the result have the same vector of integer type. The
second argument is the vector mask and has the same number of elements as the
result vector type. The third argument is the explicit vector length of the
operation. The fourth argument 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 first argument is statically or
dynamically an ``INT_MIN`` value.
second argument 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 first argument is statically or dynamically an ``INT_MIN`` value. The
third argument is the vector mask and has the same number of elements as the
result vector type. The fourth argument is the explicit vector length of the
operation.

Semantics:
""""""""""
Expand All @@ -21554,7 +21554,7 @@ Examples:

.. code-block:: llvm

%r = call <4 x i32> @llvm.vp.abs.v4i32(<4 x i32> %a, <4 x i1> %mask, i32 %evl, i1 false)
%r = call <4 x i32> @llvm.vp.abs.v4i32(<4 x i32> %a, i1 false, <4 x i1> %mask, i32 %evl)
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r

%t = call <4 x i32> @llvm.abs.v4i32(<4 x i32> %a, i1 false)
Expand Down Expand Up @@ -25260,9 +25260,9 @@ This is an overloaded intrinsic.

::

declare <16 x i32> @llvm.vp.ctlz.v16i32 (<16 x i32> <op>, <16 x i1> <mask>, i32 <vector_length>, i1 <is_zero_poison>)
declare <vscale x 4 x i32> @llvm.vp.ctlz.nxv4i32 (<vscale x 4 x i32> <op>, <vscale x 4 x i1> <mask>, i32 <vector_length>, i1 <is_zero_poison>)
declare <256 x i64> @llvm.vp.ctlz.v256i64 (<256 x i64> <op>, <256 x i1> <mask>, i32 <vector_length>, i1 <is_zero_poison>)
declare <16 x i32> @llvm.vp.ctlz.v16i32 (<16 x i32> <op>, i1 <is_zero_poison>, <16 x i1> <mask>, i32 <vector_length>)
declare <vscale x 4 x i32> @llvm.vp.ctlz.nxv4i32 (<vscale x 4 x i32> <op>, i1 <is_zero_poison>, <vscale x 4 x i1> <mask>, i32 <vector_length>)
declare <256 x i64> @llvm.vp.ctlz.v256i64 (<256 x i64> <op>, i1 <is_zero_poison>, <256 x i1> <mask>, i32 <vector_length>)

Overview:
"""""""""
Expand All @@ -25274,11 +25274,11 @@ Arguments:
""""""""""

The first argument and the result have the same vector of integer type. The
second argument is the vector mask and has the same number of elements as the
result vector type. The third argument is the explicit vector length of the
operation. The fourth argument is a constant flag that indicates whether the
intrinsic returns a valid result if the first argument is zero. If the first
argument is zero and the fourth argument is true, the result is poison.
second argument is a constant flag that indicates whether the intrinsic returns
a valid result if the first argument is zero. The third argument is the vector
mask and has the same number of elements as the result vector type. the fourth
argument is the explicit vector length of the operation. If the first argument
is zero and the second argument is true, the result is poison.

Semantics:
""""""""""
Expand All @@ -25291,7 +25291,7 @@ Examples:

.. code-block:: llvm

%r = call <4 x i32> @llvm.vp.ctlz.v4i32(<4 x i32> %a, <4 x i1> %mask, i32 %evl, i1 false)
%r = call <4 x i32> @llvm.vp.ctlz.v4i32(<4 x i32> %a, , i1 false, <4 x i1> %mask, i32 %evl)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: There is an extra , here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry, fix in #117542

;; For all lanes below %evl, %r is lane-wise equivalent to %also.r

%t = call <4 x i32> @llvm.ctlz.v4i32(<4 x i32> %a, i1 false)
Expand All @@ -25309,9 +25309,9 @@ This is an overloaded intrinsic.

::

declare <16 x i32> @llvm.vp.cttz.v16i32 (<16 x i32> <op>, <16 x i1> <mask>, i32 <vector_length>, i1 <is_zero_poison>)
declare <vscale x 4 x i32> @llvm.vp.cttz.nxv4i32 (<vscale x 4 x i32> <op>, <vscale x 4 x i1> <mask>, i32 <vector_length>, i1 <is_zero_poison>)
declare <256 x i64> @llvm.vp.cttz.v256i64 (<256 x i64> <op>, <256 x i1> <mask>, i32 <vector_length>, i1 <is_zero_poison>)
declare <16 x i32> @llvm.vp.cttz.v16i32 (<16 x i32> <op>, i1 <is_zero_poison>, <16 x i1> <mask>, i32 <vector_length>)
declare <vscale x 4 x i32> @llvm.vp.cttz.nxv4i32 (<vscale x 4 x i32> <op>, i1 <is_zero_poison>, <vscale x 4 x i1> <mask>, i32 <vector_length>)
declare <256 x i64> @llvm.vp.cttz.v256i64 (<256 x i64> <op>, i1 <is_zero_poison>, <256 x i1> <mask>, i32 <vector_length>)

Overview:
"""""""""
Expand All @@ -25323,11 +25323,11 @@ Arguments:
""""""""""

The first argument and the result have the same vector of integer type. The
second argument is the vector mask and has the same number of elements as the
result vector type. The third argument is the explicit vector length of the
operation. The fourth argument is a constant flag that indicates whether the
intrinsic returns a valid result if the first argument is zero. If the first
argument is zero and the fourth argument is true, the result is poison.
second argument is a constant flag that indicates whether the intrinsic
returns a valid result if the first argument is zero. The third argument is
the vector mask and has the same number of elements as the result vector type.
The fourth argument is the explicit vector length of the operation. If the
first argument is zero and the second argument is true, the result is poison.

Semantics:
""""""""""
Expand All @@ -25340,7 +25340,7 @@ Examples:

.. code-block:: llvm

%r = call <4 x i32> @llvm.vp.cttz.v4i32(<4 x i32> %a, <4 x i1> %mask, i32 %evl, i1 false)
%r = call <4 x i32> @llvm.vp.cttz.v4i32(<4 x i32> %a, i1 false, <4 x i1> %mask, i32 %evl)
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r

%t = call <4 x i32> @llvm.cttz.v4i32(<4 x i32> %a, i1 false)
Expand Down
Loading