@@ -23910,21 +23910,23 @@ Examples:
23910
23910
%active.lane.mask = call <4 x i1> @llvm.get.active.lane.mask.v4i1.i64(i64 %elem0, i64 429)
23911
23911
%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)
23912
23912
23913
- .. _int_experimental_get_noalias_lane_mask:
23914
23913
23915
- '``llvm.experimental.get.noalias.lane.mask.*``' Intrinsics
23916
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23914
+ .. _int_experimental_loop_dependence_war_mask:
23915
+ .. _int_experimental_loop_dependence_raw_mask:
23916
+
23917
+ '``llvm.experimental.loop.dependence.raw.mask.*``' and '``llvm.experimental.loop.dependence.war.mask.*``' Intrinsics
23918
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
23917
23919
23918
23920
Syntax:
23919
23921
"""""""
23920
23922
This is an overloaded intrinsic.
23921
23923
23922
23924
::
23923
23925
23924
- declare <4 x i1> @llvm.experimental.get.noalias.lane .mask.v4i1(ptr %ptrA, ptr %ptrB, i64 immarg %elementSize, i1 immarg %writeAfterRead )
23925
- declare <8 x i1> @llvm.experimental.get.noalias.lane .mask.v8i1(ptr %ptrA, ptr %ptrB, i64 immarg %elementSize, i1 immarg %writeAfterRead )
23926
- declare <16 x i1> @llvm.experimental.get.noalias.lane .mask.v16i1(ptr %ptrA, ptr %ptrB, i64 immarg %elementSize, i1 immarg %writeAfterRead )
23927
- declare <vscale x 16 x i1> @llvm.experimental.get.noalias.lane .mask.nxv16i1(ptr %ptrA, ptr %ptrB, i64 immarg %elementSize, i1 immarg %writeAfterRead )
23926
+ declare <4 x i1> @llvm.experimental.loop.dependence.raw .mask.v4i1(ptr %ptrA, ptr %ptrB, i64 immarg %elementSize)
23927
+ declare <8 x i1> @llvm.experimental.loop.dependence.war .mask.v8i1(ptr %ptrA, ptr %ptrB, i64 immarg %elementSize)
23928
+ declare <16 x i1> @llvm.experimental.loop.dependence.raw .mask.v16i1(ptr %ptrA, ptr %ptrB, i64 immarg %elementSize)
23929
+ declare <vscale x 16 x i1> @llvm.experimental.loop.dependence.war .mask.nxv16i1(ptr %ptrA, ptr %ptrB, i64 immarg %elementSize)
23928
23930
23929
23931
23930
23932
Overview:
@@ -23937,27 +23939,25 @@ across one vector loop iteration.
23937
23939
Arguments:
23938
23940
""""""""""
23939
23941
23940
- The first two arguments have the same scalar integer type.
23941
- The final two are immediates and the result is a vector with the i1 element type.
23942
+ The first two arguments have the same pointer type.
23943
+ The final one is an immediate and the result is a vector with the i1 element type.
23942
23944
23943
23945
Semantics:
23944
23946
""""""""""
23945
23947
23946
23948
``%elementSize`` is the size of the accessed elements in bytes.
23947
23949
The intrinsic will return poison if ``%ptrA`` and ``%ptrB`` are within
23948
23950
VF * ``%elementSize`` of each other and ``%ptrA`` + VF * ``%elementSize`` wraps.
23949
- In other cases when ``%writeAfterRead`` is true, the
23950
- '``llvm.experimental.get.noalias.lane.mask.*``' intrinsics are semantically
23951
+ The '``llvm.experimental.loop.dependence.war.mask*``' intrinsics are semantically
23951
23952
equivalent to:
23952
23953
23953
23954
::
23954
23955
23955
23956
%diff = (%ptrB - %ptrA) / %elementSize
23956
23957
%m[i] = (icmp ult i, %diff) || (%diff <= 0)
23957
23958
23958
- When the return value is not poison and ``%writeAfterRead`` is false, the
23959
- '``llvm.experimental.get.noalias.lane.mask.*``' intrinsics are semantically
23960
- equivalent to:
23959
+ When the return value is not poison the '``llvm.experimental.loop.dependence.raw.mask.*``'
23960
+ intrinsics are semantically equivalent to:
23961
23961
23962
23962
::
23963
23963
@@ -23966,15 +23966,10 @@ equivalent to:
23966
23966
23967
23967
where ``%m`` is a vector (mask) of active/inactive lanes with its elements
23968
23968
indexed by ``i`` (i = 0 to VF - 1), and ``%ptrA``, ``%ptrB`` are the two ptr
23969
- arguments to ``llvm.experimental.get.noalias.lane.mask.*`` and ``%elementSize``
23970
- is the first immediate argument. The ``%writeAfterRead`` argument is expected
23971
- to be true if ``%ptrB`` is stored to after ``%ptrA`` is read from, otherwise
23972
- it is false for a read after write.
23973
- The above is equivalent to:
23974
-
23975
- ::
23976
-
23977
- %m = @llvm.experimental.get.noalias.lane.mask(%ptrA, %ptrB, %elementSize, %writeAfterRead)
23969
+ arguments to ``llvm.experimental.loop.dependence.{raw,war}.mask.*`` and ``%elementSize``
23970
+ is the first immediate argument. The ``war`` variant is expected to be used when
23971
+ ``%ptrB`` is stored to after ``%ptrA`` is read from, otherwise the ``raw`` variant is
23972
+ expected to be used.
23978
23973
23979
23974
This can, for example, be emitted by the loop vectorizer in which case
23980
23975
``%ptrA`` is a pointer that is read from within the loop, and ``%ptrB`` is a
@@ -23992,10 +23987,10 @@ Examples:
23992
23987
23993
23988
.. code-block:: llvm
23994
23989
23995
- %noalias.lane .mask = call <4 x i1> @llvm.experimental.get.noalias.lane .mask.v4i1(ptr %ptrA, ptr %ptrB, i64 4, i1 1 )
23996
- %vecA = call <4 x i32> @llvm.masked.load.v4i32.p0v4i32(ptr %ptrA, i32 4, <4 x i1> %noalias.lane .mask, <4 x i32> poison)
23990
+ %loop.dependence .mask = call <4 x i1> @llvm.experimental.loop.dependence.war .mask.v4i1(ptr %ptrA, ptr %ptrB, i64 4)
23991
+ %vecA = call <4 x i32> @llvm.masked.load.v4i32.p0v4i32(ptr %ptrA, i32 4, <4 x i1> %loop.dependence .mask, <4 x i32> poison)
23997
23992
[...]
23998
- call @llvm.masked.store.v4i32.p0v4i32(<4 x i32> %vecA, ptr %ptrB, i32 4, <4 x i1> %noalias.lane .mask)
23993
+ call @llvm.masked.store.v4i32.p0v4i32(<4 x i32> %vecA, ptr %ptrB, i32 4, <4 x i1> %loop.dependence .mask)
23999
23994
24000
23995
.. _int_experimental_vp_splice:
24001
23996
0 commit comments