[PATCH] D95455: [InstCombine] Preserve FMF for powi simplifications.
Valeriy Dmitriev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 26 13:06:39 PST 2021
vdmitrie added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp:887
case Intrinsic::powi:
if (ConstantInt *Power = dyn_cast<ConstantInt>(II->getArgOperand(1))) {
// 0 and 1 are handled in instsimplify
----------------
spatel wrote:
> It would be another patch, but if you're looking at powi code, it would be nice to update this with something like:
> match(II->getArgOperand, m_APInt(ExponentC))
>
> That would allow us to also match vector powi calls in addition to the current scalar calls.
Thank you Sanjay for review. Regarding your suggestion, according to LangRef the exponent argument is always scalar for powi. So that would probably be just a cosmetic change as existing code handles vector types for "base" argument.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95455/new/
https://reviews.llvm.org/D95455
More information about the llvm-commits
mailing list