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

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 6 13:25:26 PDT 2020


lebedev.ri added a comment.

Was there an RFC for this?
While i agree it likely makes sense to have these for consistency,
i'm not sure why they are *needed* for implementing the Embedded-C fixed point support in Clang.



================
Comment at: llvm/lib/IR/Verifier.cpp:4948-4951
+    Assert(Op1->getType()->isIntegerTy(),
+           "first operand of [us]shl_sat must be an int type");
+    Assert(Op2->getType()->isIntegerTy(),
+           "second operand of [us]shl_sat must be an int type");
----------------
I don't think it makes sense to limit these to scalars.


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