[PATCH] D105587: [Instcombine]Transform reduction+(sext/zext(<n x i1>) to <n x im>) to [-]zext/trunc(ctpop(bitcast <n x i1> to in)) to im.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 8 06:00:25 PDT 2021


lebedev.ri added a comment.

In D105587#2864252 <https://reviews.llvm.org/D105587#2864252>, @ABataev wrote:

> In D105587#2864251 <https://reviews.llvm.org/D105587#2864251>, @RKSimon wrote:
>
>> Seems to be correct: https://alive2.llvm.org/ce/z/TBZbdZ
>
> Yes, checked it via alive2 before uploading

While not required, since you already had it, it is really good to make patch description more useful by adding such details there.



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2006
+      Value *Vect;
+      if (match(Arg, m_ZExtOrSExt(m_Value(Vect)))) {
+        if (auto *FTy = dyn_cast<FixedVectorType>(Vect->getType()))
----------------
Extension is optional: https://alive2.llvm.org/ce/z/N6qJGz
Please either use `m_ZExtOrSExtOrSelf()`, or if it's already handled elsewhere add a comment about that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105587



More information about the llvm-commits mailing list