[PATCH] D82377: [ARM] Allow tail predication on sadd_sat and uadd_sat intrinsics

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 23 08:31:32 PDT 2020


xbolva00 added inline comments.


================
Comment at: llvm/lib/Target/ARM/MVETailPredication.cpp:356
       } else if (auto *Int = dyn_cast<IntrinsicInst>(&I)) {
-        if (Int->getIntrinsicID() == Intrinsic::fma)
+        if (Int->getIntrinsicID() == Intrinsic::fma || Int->getIntrinsicID() == Intrinsic::sadd_sat || Int->getIntrinsicID() == Intrinsic::uadd_sat)
           continue;
----------------
dmgreen wrote:
> SjoerdMeijer wrote:
> > Do we expect more intrinsics to be allowed after these 2?  For example, if we allow sadd, can we allow ssub too? And then while we are add it, add the ssubs too? 
> > If we expect more intrinsics here, probably better to create an "AllowList" for intrinsics somewhere, and do a look-up here?
> > 
> Can you give this a clang-format? The line is a bit long.
> 
> We might end up with quite a few of these too. It might make sense to add a switch on Int->getIntrinsicID() once this gets large enough.
+1 for switch


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82377





More information about the llvm-commits mailing list