[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.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 8 12:53:04 PDT 2021
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2020
+ replaceInstUsesWith(CI, Res);
+ return eraseInstFromFunction(CI);
+ }
----------------
nikic wrote:
> ABataev wrote:
> > nikic wrote:
> > > Seems to be a recurring pattern in these folds, but why does this call replaceInstUsesWith and eraseInstFromInstruction, rather than doing just `return replaceInstUsesWith()`?
> > I'm not quite familiar with these interfaces, just copied from other places. Do you suggest replacing it with just `return replaceInstUsesWith(CI, Res);`?
> Yeah, that should be sufficient.
Ok, thanks for the advice, will do
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