[PATCH] D131672: [instcombine] Optimise for zero initialisation of product given fast flags are enabled
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 15 11:37:20 PDT 2022
spatel 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);
----------------
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.
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