[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.
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 8 12:52:19 PDT 2021
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:2020
+ replaceInstUsesWith(CI, Res);
+ return eraseInstFromFunction(CI);
+ }
----------------
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.
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