[llvm] [LangRef] Update the semantic of `experimental.get.vector.length` (PR #104475)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 22 17:01:34 PDT 2024
================
@@ -19644,13 +19644,20 @@ in order to get the number of elements to process on each loop iteration. The
result should be used to decrease the count for the next iteration until the
count reaches zero.
-If the count is larger than the number of lanes in the type described by the
-last 2 arguments, this intrinsic may return a value less than the number of
-lanes implied by the type. The result will be at least as large as the result
-will be on any later loop iteration.
+Let ``%max_lanes`` be the number of lanes in the type described by ``%vf`` and
+``%scalable``, here are the constraints on the returned value:
-This intrinsic will only return 0 if the input count is also 0. A non-zero input
-count will produce a non-zero result.
+- If ``%cnt`` equals to 0, returns 0.
+- The returned value is always less than or equal to ``%max_lanes``.
+- The returned value is always greater than or equal to ``ceil(%cnt / ceil(%cnt / %max_lanes))``.
----------------
mshockwave wrote:
Fixed.
https://github.com/llvm/llvm-project/pull/104475
More information about the llvm-commits
mailing list