[PATCH] D131672: [instcombine] Optimise for zero initialisation of product given fast flags are enabled
Zain Jaffal via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 15 11:47:57 PDT 2022
zjaffal added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp:492
+ if (Constant *StartConst = dyn_cast<Constant>(Start)) {
+ if (StartConst->isZeroValue())
+ return replaceInstUsesWith(I, StartConst);
----------------
spatel wrote:
> Was there a reason to not use the shorter and suggested m_Zero() matcher?
> It probably doesn't make a difference for this particular pattern, but that code handles things like vector constants, so we won't miss any unusual types.
I didn't know it existed. I will push a change now
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131672/new/
https://reviews.llvm.org/D131672
More information about the llvm-commits
mailing list