[PATCH] D83216: [Intrinsic] Add sshl.sat/ushl.sat, saturated shift intrinsics.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 8 11:39:13 PDT 2020


efriedma added inline comments.


================
Comment at: llvm/docs/LangRef.rst:14269
+bit width, but they must have the same bit width. ``%a`` is the value to be
+shifted, and ``%b`` is the amount to shift by. ``%b`` must be less than the bit
+width.
----------------
Not sure what "must be" means in this context; the shift amount is a variable, so we can't enforce anything about it statically.

Is it poison?  Or undefined behavior?  Or does the shift clamp to the min/max value?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83216





More information about the llvm-commits mailing list