[llvm] 32b1b06 - [LangRef] Change masked-off lanes from undef to poison for llvm.vp.* intrinsics
Nuno Lopes via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 19 02:18:59 PDT 2022
Author: Nuno Lopes
Date: 2022-09-19T10:18:45+01:00
New Revision: 32b1b06b7081bd722750c6f3d528336f3f7ed34b
URL: https://github.com/llvm/llvm-project/commit/32b1b06b7081bd722750c6f3d528336f3f7ed34b
DIFF: https://github.com/llvm/llvm-project/commit/32b1b06b7081bd722750c6f3d528336f3f7ed34b.diff
LOG: [LangRef] Change masked-off lanes from undef to poison for llvm.vp.* intrinsics
As discussed in https://reviews.llvm.org/D133967
Added:
Modified:
llvm/docs/LangRef.rst
Removed:
################################################################################
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 73ab0ef1f3a69..93f30da9417e1 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -18252,7 +18252,7 @@ Semantics:
The '``llvm.vp.add``' intrinsic performs integer addition (:ref:`add <i_add>`)
of the first and second vector operand on each enabled lane. The result on
-disabled lanes is undefined.
+disabled lanes is a :ref:`poison value <poisonvalues>`.
Examples:
"""""""""
@@ -18263,7 +18263,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = add <4 x i32> %a, %b
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
.. _int_vp_sub:
@@ -18299,7 +18299,7 @@ Semantics:
The '``llvm.vp.sub``' intrinsic performs integer subtraction
(:ref:`sub <i_sub>`) of the first and second vector operand on each enabled
-lane. The result on disabled lanes is undefined.
+lane. The result on disabled lanes is a :ref:`poison value <poisonvalues>`.
Examples:
"""""""""
@@ -18310,7 +18310,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = sub <4 x i32> %a, %b
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
@@ -18347,7 +18347,7 @@ Semantics:
""""""""""
The '``llvm.vp.mul``' intrinsic performs integer multiplication
(:ref:`mul <i_mul>`) of the first and second vector operand on each enabled
-lane. The result on disabled lanes is undefined.
+lane. The result on disabled lanes is a :ref:`poison value <poisonvalues>`.
Examples:
"""""""""
@@ -18358,7 +18358,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = mul <4 x i32> %a, %b
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
.. _int_vp_sdiv:
@@ -18395,7 +18395,7 @@ Semantics:
The '``llvm.vp.sdiv``' intrinsic performs signed division (:ref:`sdiv <i_sdiv>`)
of the first and second vector operand on each enabled lane. The result on
-disabled lanes is undefined.
+disabled lanes is a :ref:`poison value <poisonvalues>`.
Examples:
"""""""""
@@ -18406,7 +18406,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = sdiv <4 x i32> %a, %b
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
.. _int_vp_udiv:
@@ -18440,7 +18440,7 @@ Semantics:
The '``llvm.vp.udiv``' intrinsic performs unsigned division
(:ref:`udiv <i_udiv>`) of the first and second vector operand on each enabled
-lane. The result on disabled lanes is undefined.
+lane. The result on disabled lanes is a :ref:`poison value <poisonvalues>`.
Examples:
"""""""""
@@ -18451,7 +18451,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = udiv <4 x i32> %a, %b
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
@@ -18489,7 +18489,7 @@ Semantics:
The '``llvm.vp.srem``' intrinsic computes the remainder of the signed division
(:ref:`srem <i_srem>`) of the first and second vector operand on each enabled
-lane. The result on disabled lanes is undefined.
+lane. The result on disabled lanes is a :ref:`poison value <poisonvalues>`.
Examples:
"""""""""
@@ -18500,7 +18500,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = srem <4 x i32> %a, %b
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
@@ -18538,7 +18538,7 @@ Semantics:
The '``llvm.vp.urem``' intrinsic computes the remainder of the unsigned division
(:ref:`urem <i_urem>`) of the first and second vector operand on each enabled
-lane. The result on disabled lanes is undefined.
+lane. The result on disabled lanes is a :ref:`poison value <poisonvalues>`.
Examples:
"""""""""
@@ -18549,7 +18549,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = urem <4 x i32> %a, %b
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
.. _int_vp_ashr:
@@ -18586,7 +18586,8 @@ Semantics:
The '``llvm.vp.ashr``' intrinsic computes the arithmetic right shift
(:ref:`ashr <i_ashr>`) of the first operand by the second operand on each
-enabled lane. The result on disabled lanes is undefined.
+enabled lane. The result on disabled lanes is a
+:ref:`poison value <poisonvalues>`.
Examples:
"""""""""
@@ -18597,7 +18598,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = ashr <4 x i32> %a, %b
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
.. _int_vp_lshr:
@@ -18635,7 +18636,8 @@ Semantics:
The '``llvm.vp.lshr``' intrinsic computes the logical right shift
(:ref:`lshr <i_lshr>`) of the first operand by the second operand on each
-enabled lane. The result on disabled lanes is undefined.
+enabled lane. The result on disabled lanes is a
+:ref:`poison value <poisonvalues>`.
Examples:
"""""""""
@@ -18646,7 +18648,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = lshr <4 x i32> %a, %b
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
.. _int_vp_shl:
@@ -18683,7 +18685,7 @@ Semantics:
The '``llvm.vp.shl``' intrinsic computes the left shift (:ref:`shl <i_shl>`) of
the first operand by the second operand on each enabled lane. The result on
-disabled lanes is undefined.
+disabled lanes is a :ref:`poison value <poisonvalues>`.
Examples:
"""""""""
@@ -18694,7 +18696,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = shl <4 x i32> %a, %b
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
.. _int_vp_or:
@@ -18731,7 +18733,7 @@ Semantics:
The '``llvm.vp.or``' intrinsic performs a bitwise or (:ref:`or <i_or>`) of the
first two operands on each enabled lane. The result on disabled lanes is
-undefined.
+a :ref:`poison value <poisonvalues>`.
Examples:
"""""""""
@@ -18742,7 +18744,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = or <4 x i32> %a, %b
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
.. _int_vp_and:
@@ -18779,7 +18781,7 @@ Semantics:
The '``llvm.vp.and``' intrinsic performs a bitwise and (:ref:`and <i_or>`) of
the first two operands on each enabled lane. The result on disabled lanes is
-undefined.
+a :ref:`poison value <poisonvalues>`.
Examples:
"""""""""
@@ -18790,7 +18792,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = and <4 x i32> %a, %b
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
.. _int_vp_xor:
@@ -18827,7 +18829,7 @@ Semantics:
The '``llvm.vp.xor``' intrinsic performs a bitwise xor (:ref:`xor <i_xor>`) of
the first two operands on each enabled lane.
-The result on disabled lanes is undefined.
+The result on disabled lanes is a :ref:`poison value <poisonvalues>`.
Examples:
"""""""""
@@ -18838,7 +18840,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = xor <4 x i32> %a, %b
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
.. _int_vp_fadd:
@@ -18875,8 +18877,8 @@ Semantics:
The '``llvm.vp.fadd``' intrinsic performs floating-point addition (:ref:`fadd <i_fadd>`)
of the first and second vector operand on each enabled lane. The result on
-disabled lanes is undefined. The operation is performed in the default
-floating-point environment.
+disabled lanes is a :ref:`poison value <poisonvalues>`. The operation is
+performed in the default floating-point environment.
Examples:
"""""""""
@@ -18887,7 +18889,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = fadd <4 x float> %a, %b
- %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> undef
+ %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> poison
.. _int_vp_fsub:
@@ -18924,8 +18926,8 @@ Semantics:
The '``llvm.vp.fsub``' intrinsic performs floating-point subtraction (:ref:`fsub <i_fsub>`)
of the first and second vector operand on each enabled lane. The result on
-disabled lanes is undefined. The operation is performed in the default
-floating-point environment.
+disabled lanes is a :ref:`poison value <poisonvalues>`. The operation is
+performed in the default floating-point environment.
Examples:
"""""""""
@@ -18936,7 +18938,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = fsub <4 x float> %a, %b
- %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> undef
+ %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> poison
.. _int_vp_fmul:
@@ -18973,8 +18975,8 @@ Semantics:
The '``llvm.vp.fmul``' intrinsic performs floating-point multiplication (:ref:`fmul <i_fmul>`)
of the first and second vector operand on each enabled lane. The result on
-disabled lanes is undefined. The operation is performed in the default
-floating-point environment.
+disabled lanes is a :ref:`poison value <poisonvalues>`. The operation is
+performed in the default floating-point environment.
Examples:
"""""""""
@@ -18985,7 +18987,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = fmul <4 x float> %a, %b
- %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> undef
+ %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> poison
.. _int_vp_fdiv:
@@ -19022,8 +19024,8 @@ Semantics:
The '``llvm.vp.fdiv``' intrinsic performs floating-point division (:ref:`fdiv <i_fdiv>`)
of the first and second vector operand on each enabled lane. The result on
-disabled lanes is undefined. The operation is performed in the default
-floating-point environment.
+disabled lanes is a :ref:`poison value <poisonvalues>`. The operation is
+performed in the default floating-point environment.
Examples:
"""""""""
@@ -19034,7 +19036,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = fdiv <4 x float> %a, %b
- %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> undef
+ %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> poison
.. _int_vp_frem:
@@ -19071,8 +19073,8 @@ Semantics:
The '``llvm.vp.frem``' intrinsic performs floating-point remainder (:ref:`frem <i_frem>`)
of the first and second vector operand on each enabled lane. The result on
-disabled lanes is undefined. The operation is performed in the default
-floating-point environment.
+disabled lanes is a :ref:`poison value <poisonvalues>`. The operation is
+performed in the default floating-point environment.
Examples:
"""""""""
@@ -19083,7 +19085,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = frem <4 x float> %a, %b
- %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> undef
+ %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> poison
.. _int_vp_fneg:
@@ -19120,7 +19122,7 @@ Semantics:
The '``llvm.vp.fneg``' intrinsic performs floating-point negation (:ref:`fneg <i_fneg>`)
of the first vector operand on each enabled lane. The result on disabled lanes
-is undefined.
+is a :ref:`poison value <poisonvalues>`.
Examples:
"""""""""
@@ -19131,7 +19133,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = fneg <4 x float> %a
- %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> undef
+ %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> poison
.. _int_vp_fabs:
@@ -19168,7 +19170,7 @@ Semantics:
The '``llvm.vp.fabs``' intrinsic performs floating-point absolute value
(:ref:`fabs <int_fabs>`) of the first vector operand on each enabled lane. The
-result on disabled lanes is undefined.
+result on disabled lanes is a :ref:`poison value <poisonvalues>`.
Examples:
"""""""""
@@ -19179,7 +19181,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = call <4 x float> @llvm.fabs.v4f32(<4 x float> %a)
- %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> undef
+ %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> poison
.. _int_vp_fma:
@@ -19216,8 +19218,8 @@ Semantics:
The '``llvm.vp.fma``' intrinsic performs floating-point fused multiply-add (:ref:`llvm.fma <int_fma>`)
of the first, second, and third vector operand on each enabled lane. The result on
-disabled lanes is undefined. The operation is performed in the default
-floating-point environment.
+disabled lanes is a :ref:`poison value <poisonvalues>`. The operation is
+performed in the default floating-point environment.
Examples:
"""""""""
@@ -19228,7 +19230,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = call <4 x float> @llvm.fma(<4 x float> %a, <4 x float> %b, <4 x float> %c)
- %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> undef
+ %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> poison
.. _int_vp_reduce_add:
@@ -20073,7 +20075,7 @@ Examples:
.. code-block:: llvm
%active.lane.mask = call <4 x i1> @llvm.get.active.lane.mask.v4i1.i64(i64 %elem0, i64 429)
- %wide.masked.load = call <4 x i32> @llvm.masked.load.v4i32.p0v4i32(<4 x i32>* %3, i32 4, <4 x i1> %active.lane.mask, <4 x i32> undef)
+ %wide.masked.load = call <4 x i32> @llvm.masked.load.v4i32.p0v4i32(<4 x i32>* %3, i32 4, <4 x i1> %active.lane.mask, <4 x i32> poison)
.. _int_experimental_vp_splice:
@@ -20123,15 +20125,15 @@ negative ``imm``) elements from indices ``[imm..evl1 - 1]``
first ``evl2 - (evl1 - imm)`` (``evl2 + imm`` for negative ``imm``) elements of
``vec2``. If ``evl1 - imm`` (``-imm``) >= ``evl2``, only the first ``evl2``
elements are considered and the remaining are ``undef``. The lanes in the result
-vector disabled by ``mask`` are ``undef``.
+vector disabled by ``mask`` are ``poison``.
Examples:
"""""""""
.. code-block:: text
- llvm.experimental.vp.splice(<A,B,C,D>, <E,F,G,H>, 1, 2, 3) ==> <B, E, F, undef> ; index
- llvm.experimental.vp.splice(<A,B,C,D>, <E,F,G,H>, -2, 3, 2) ==> <B, C, undef, undef> ; trailing elements
+ llvm.experimental.vp.splice(<A,B,C,D>, <E,F,G,H>, 1, 2, 3) ==> <B, E, F, poison> ; index
+ llvm.experimental.vp.splice(<A,B,C,D>, <E,F,G,H>, -2, 3, 2) ==> <B, C, poison, poison> ; trailing elements
.. _int_vp_load:
@@ -20174,7 +20176,7 @@ The '``llvm.vp.load``' intrinsic reads a vector from memory in the same way as
the '``llvm.masked.load``' intrinsic, where the mask is taken from the
combination of the '``mask``' and '``evl``' operands in the usual VP way.
Certain '``llvm.masked.load``' operands do not have corresponding operands in
-'``llvm.vp.load``': the '``passthru``' operand is implicitly ``undef``; the
+'``llvm.vp.load``': the '``passthru``' operand is implicitly ``poison``; the
'``alignment``' operand is taken as the ``align`` parameter attribute, if
provided. The default alignment is taken as the ABI alignment of the return
type as specified by the :ref:`datalayout string<langref_datalayout>`.
@@ -20187,7 +20189,7 @@ Examples:
%r = call <8 x i8> @llvm.vp.load.v8i8.p0(ptr align 2 %ptr, <8 x i1> %mask, i32 %evl)
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
- %also.r = call <8 x i8> @llvm.masked.load.v8i8.p0(ptr %ptr, i32 2, <8 x i1> %mask, <8 x i8> undef)
+ %also.r = call <8 x i8> @llvm.masked.load.v8i8.p0(ptr %ptr, i32 2, <8 x i1> %mask, <8 x i8> poison)
.. _int_vp_store:
@@ -20409,7 +20411,7 @@ the same way as the '``llvm.masked.gather``' intrinsic, where the mask is taken
from the combination of the '``mask``' and '``evl``' operands in the usual VP
way. Certain '``llvm.masked.gather``' operands do not have corresponding
operands in '``llvm.vp.gather``': the '``passthru``' operand is implicitly
-``undef``; the '``alignment``' operand is taken as the ``align`` parameter, if
+``poison``; the '``alignment``' operand is taken as the ``align`` parameter, if
provided. The default alignment is taken as the ABI alignment of the source
addresses as specified by the :ref:`datalayout string<langref_datalayout>`.
@@ -20421,7 +20423,7 @@ Examples:
%r = call <8 x i8> @llvm.vp.gather.v8i8.v8p0(<8 x ptr> align 8 %ptrs, <8 x i1> %mask, i32 %evl)
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
- %also.r = call <8 x i8> @llvm.masked.gather.v8i8.v8p0(<8 x ptr> %ptrs, i32 8, <8 x i1> %mask, <8 x i8> undef)
+ %also.r = call <8 x i8> @llvm.masked.gather.v8i8.v8p0(<8 x ptr> %ptrs, i32 8, <8 x i1> %mask, <8 x i8> poison)
.. _int_vp_scatter:
@@ -20521,7 +20523,7 @@ converts the remaining bits to return type. Since the source size must be larger
than the destination size, '``llvm.vp.trunc``' cannot be a *no-op cast*. It will
always truncate bits. The conversion is performed on lane positions below the
explicit vector length and where the vector mask is true. Masked-off lanes are
-undefined.
+``poison``.
Examples:
"""""""""
@@ -20532,7 +20534,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = trunc <4 x i32> %a to <4 x i16>
- %also.r = select <4 x i1> %mask, <4 x i16> %t, <4 x i16> undef
+ %also.r = select <4 x i1> %mask, <4 x i16> %t, <4 x i16> poison
.. _int_vp_zext:
@@ -20573,7 +20575,7 @@ The '``llvm.vp.zext``' intrinsic fill the high order bits of the value with zero
bits until it reaches the size of the return type. When zero extending from i1,
the result will always be either 0 or 1. The conversion is performed on lane
positions below the explicit vector length and where the vector mask is true.
-Masked-off lanes are undefined.
+Masked-off lanes are ``poison``.
Examples:
"""""""""
@@ -20584,7 +20586,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = zext <4 x i16> %a to <4 x i32>
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
.. _int_vp_sext:
@@ -20625,7 +20627,7 @@ The '``llvm.vp.sext``' intrinsic performs a sign extension by copying the sign
bit (highest order bit) of the value until it reaches the size of the return
type. When sign extending from i1, the result will always be either -1 or 0.
The conversion is performed on lane positions below the explicit vector length
-and where the vector mask is true. Masked-off lanes are undefined.
+and where the vector mask is true. Masked-off lanes are ``poison``.
Examples:
"""""""""
@@ -20636,7 +20638,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = sext <4 x i16> %a to <4 x i32>
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
.. _int_vp_fptrunc:
@@ -20681,7 +20683,7 @@ The '``llvm.vp.fptrunc``' intrinsic casts a ``value`` from a larger
This instruction is assumed to execute in the default :ref:`floating-point
environment <floatenv>`. The conversion is performed on lane positions below the
explicit vector length and where the vector mask is true. Masked-off lanes are
-undefined.
+``poison``.
Examples:
"""""""""
@@ -20692,7 +20694,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = fptrunc <4 x double> %a to <4 x float>
- %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> undef
+ %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> poison
.. _int_vp_fpext:
@@ -20737,7 +20739,7 @@ The '``llvm.vp.fpext``' intrinsic extends the ``value`` from a smaller
*no-op cast* because it always changes bits. Use ``bitcast`` to make a
*no-op cast* for a floating-point cast.
The conversion is performed on lane positions below the explicit vector length
-and where the vector mask is true. Masked-off lanes are undefined.
+and where the vector mask is true. Masked-off lanes are ``poison``.
Examples:
"""""""""
@@ -20748,7 +20750,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = fpext <4 x float> %a to <4 x double>
- %also.r = select <4 x i1> %mask, <4 x double> %t, <4 x double> undef
+ %also.r = select <4 x i1> %mask, <4 x double> %t, <4 x double> poison
.. _int_vp_fptoui:
@@ -20791,7 +20793,7 @@ Semantics:
The '``llvm.vp.fptoui``' intrinsic converts its :ref:`floating-point
<t_floating>` operand into the nearest (rounding towards zero) unsigned integer
value where the lane position is below the explicit vector length and the
-vector mask is true. Masked-off lanes are undefined. On enabled lanes where
+vector mask is true. Masked-off lanes are ``poison``. On enabled lanes where
conversion takes place and the value cannot fit in the return type, the result
on that lane is a :ref:`poison value <poisonvalues>`.
@@ -20804,7 +20806,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = fptoui <4 x float> %a to <4 x i32>
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
.. _int_vp_fptosi:
@@ -20847,7 +20849,7 @@ Semantics:
The '``llvm.vp.fptosi``' intrinsic converts its :ref:`floating-point
<t_floating>` operand into the nearest (rounding towards zero) signed integer
value where the lane position is below the explicit vector length and the
-vector mask is true. Masked-off lanes are undefined. On enabled lanes where
+vector mask is true. Masked-off lanes are ``poison``. On enabled lanes where
conversion takes place and the value cannot fit in the return type, the result
on that lane is a :ref:`poison value <poisonvalues>`.
@@ -20860,7 +20862,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = fptosi <4 x float> %a to <4 x i32>
- %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> undef
+ %also.r = select <4 x i1> %mask, <4 x i32> %t, <4 x i32> poison
.. _int_vp_uitofp:
@@ -20905,7 +20907,7 @@ integer quantity and converts it to the corresponding floating-point value. If
the value cannot be exactly represented, it is rounded using the default
rounding mode. The conversion is performed on lane positions below the
explicit vector length and where the vector mask is true. Masked-off lanes are
-undefined.
+``poison``.
Examples:
"""""""""
@@ -20916,7 +20918,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = uitofp <4 x i32> %a to <4 x float>
- %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> undef
+ %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> poison
.. _int_vp_sitofp:
@@ -20961,7 +20963,7 @@ integer quantity and converts it to the corresponding floating-point value. If
the value cannot be exactly represented, it is rounded using the default
rounding mode. The conversion is performed on lane positions below the
explicit vector length and where the vector mask is true. Masked-off lanes are
-undefined.
+``poison``.
Examples:
"""""""""
@@ -20972,7 +20974,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = sitofp <4 x i32> %a to <4 x float>
- %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> undef
+ %also.r = select <4 x i1> %mask, <4 x float> %t, <4 x float> poison
.. _int_vp_ptrtoint:
@@ -21018,7 +21020,7 @@ If ``value`` is smaller than return type, then a zero extension is done. If
the same size, then nothing is done (*no-op cast*) other than a type
change.
The conversion is performed on lane positions below the explicit vector length
-and where the vector mask is true. Masked-off lanes are undefined.
+and where the vector mask is true. Masked-off lanes are ``poison``.
Examples:
"""""""""
@@ -21029,7 +21031,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = ptrtoint <4 x ptr> %a to <4 x i8>
- %also.r = select <4 x i1> %mask, <4 x i8> %t, <4 x i8> undef
+ %also.r = select <4 x i1> %mask, <4 x i8> %t, <4 x i8> poison
.. _int_vp_inttoptr:
@@ -21073,7 +21075,7 @@ integer ``value``. If ``value`` is larger than the size of a pointer, then a
truncation is done. If ``value`` is smaller than the size of a pointer, then a
zero extension is done. If they are the same size, nothing is done (*no-op cast*).
The conversion is performed on lane positions below the explicit vector length
-and where the vector mask is true. Masked-off lanes are undefined.
+and where the vector mask is true. Masked-off lanes are ``poison``.
Examples:
"""""""""
@@ -21084,7 +21086,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = inttoptr <4 x i32> %a to <4 x ptr>
- %also.r = select <4 x i1> %mask, <4 x ptr> %t, <4 x ptr> undef
+ %also.r = select <4 x i1> %mask, <4 x ptr> %t, <4 x ptr> poison
.. _int_vp_fcmp:
@@ -21131,7 +21133,7 @@ The '``llvm.vp.fcmp``' compares its first two operands according to the
condition code given as the third operand. The operands are compared element by
element on each enabled lane, where the the semantics of the comparison are
defined :ref:`according to the condition code <fcmp_md_cc_sem>`. Masked-off
-lanes are undefined.
+lanes are ``poison``.
Examples:
"""""""""
@@ -21142,7 +21144,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = fcmp oeq <4 x float> %a, %b
- %also.r = select <4 x i1> %mask, <4 x i1> %t, <4 x i1> undef
+ %also.r = select <4 x i1> %mask, <4 x i1> %t, <4 x i1> poison
.. _int_vp_icmp:
@@ -21189,7 +21191,7 @@ The '``llvm.vp.icmp``' compares its first two operands according to the
condition code given as the third operand. The operands are compared element by
element on each enabled lane, where the the semantics of the comparison are
defined :ref:`according to the condition code <icmp_md_cc_sem>`. Masked-off
-lanes are undefined.
+lanes are ``poison``.
Examples:
"""""""""
@@ -21200,7 +21202,7 @@ Examples:
;; For all lanes below %evl, %r is lane-wise equivalent to %also.r
%t = icmp ne <4 x i32> %a, %b
- %also.r = select <4 x i1> %mask, <4 x i1> %t, <4 x i1> undef
+ %also.r = select <4 x i1> %mask, <4 x i1> %t, <4 x i1> poison
.. _int_mload_mstore:
@@ -21335,7 +21337,7 @@ The semantics of this operation are equivalent to a sequence of conditional scal
::
- %res = call <4 x double> @llvm.masked.gather.v4f64.v4p0(<4 x ptr> %ptrs, i32 8, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x double> undef)
+ %res = call <4 x double> @llvm.masked.gather.v4f64.v4p0(<4 x ptr> %ptrs, i32 8, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x double> poison)
;; The gather with all-true mask is equivalent to the following instruction sequence
%ptr0 = extractelement <4 x ptr> %ptrs, i32 0
@@ -21348,10 +21350,10 @@ The semantics of this operation are equivalent to a sequence of conditional scal
%val2 = load double, ptr %ptr2, align 8
%val3 = load double, ptr %ptr3, align 8
- %vec0 = insertelement <4 x double>undef, %val0, 0
- %vec01 = insertelement <4 x double>%vec0, %val1, 1
- %vec012 = insertelement <4 x double>%vec01, %val2, 2
- %vec0123 = insertelement <4 x double>%vec012, %val3, 3
+ %vec0 = insertelement <4 x double> poison, %val0, 0
+ %vec01 = insertelement <4 x double> %vec0, %val1, 1
+ %vec012 = insertelement <4 x double> %vec01, %val2, 2
+ %vec0123 = insertelement <4 x double> %vec012, %val3, 3
.. _int_mscatter:
@@ -21453,7 +21455,7 @@ The '``llvm.masked.expandload``' intrinsic is designed for reading multiple scal
; Load several elements from array B and expand them in a vector.
; The number of loaded elements is equal to the number of '1' elements in the Mask.
- %Tmp = call <8 x double> @llvm.masked.expandload.v8f64(ptr %Bptr, <8 x i1> %Mask, <8 x double> undef)
+ %Tmp = call <8 x double> @llvm.masked.expandload.v8f64(ptr %Bptr, <8 x i1> %Mask, <8 x double> poison)
; Store the result in A
call void @llvm.masked.store.v8f64.p0(<8 x double> %Tmp, ptr %Aptr, i32 8, <8 x i1> %Mask)
@@ -21510,7 +21512,7 @@ The '``llvm.masked.compressstore``' intrinsic is designed for compressing data i
.. code-block:: llvm
; Load elements from A.
- %Tmp = call <8 x double> @llvm.masked.load.v8f64.p0(ptr %Aptr, i32 8, <8 x i1> %Mask, <8 x double> undef)
+ %Tmp = call <8 x double> @llvm.masked.load.v8f64.p0(ptr %Aptr, i32 8, <8 x i1> %Mask, <8 x double> poison)
; Store all selected elements consecutively in array B
call <void> @llvm.masked.compressstore.v8f64(<8 x double> %Tmp, ptr %Bptr, <8 x i1> %Mask)
More information about the llvm-commits
mailing list