[PATCH] D148637: [LangRef] Update shufflevector's semantics to return poison if the mask is undef

Manuel Brito via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 26 06:08:31 PDT 2023


ManuelJBrito added inline comments.


================
Comment at: llvm/docs/LangRef.rst:10086-10101
+If the shuffle mask is ``poison``, the result vector is ``poison``. If
+the shuffle mask selects a ``poison`` element from one of the input vectors,
+the resulting element is ``poison``. Similarly, if an ``undef`` element
+is selected, the result is ``undef`` as well. A ``poison`` element
+in the mask vector specifies that the resulting element is ``poison``.
+
+If the shuffle mask is ``undef``, the result vector is ``poison``. An ``undef``
----------------
nikic wrote:
> I feel like we could use a lot less words here and be less confusing at the same time.
I agree your wording is easier to follow, but shouldn't we still mention that selection of an undef value produces undef just to make it clear?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148637/new/

https://reviews.llvm.org/D148637



More information about the llvm-commits mailing list