[PATCH] D102698: [InstCombine] Relaxed constraints of uses for exp(X) * exp(Y) -> exp(X + Y) and exp2(X) * exp2(Y) -> exp2(X + Y)
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 18 10:10:45 PDT 2021
efriedma added inline comments.
================
Comment at: llvm/include/llvm/Transforms/Utils/Local.h:470
+/// use
+bool isRestrictiveUseConstraintMet(Instruction *I);
+
----------------
Don't expose isRestrictiveUseConstraintMet in the header if you don't plan to use it anywhere.
================
Comment at: llvm/include/llvm/Transforms/Utils/Local.h:474
+/// met or all of the operands are the same instruction
+bool isRelaxedUseConstraintMet(Instruction *I);
+
----------------
I don't like the name isRelaxedUseConstraintMet; doesn't provide any indication what it means at first glance. Maybe isOnlyUserOfAnyOperand?
================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:3311
+ (OpB->get()->hasNUses(NumOps) &&
+ std::equal(++OpB, I->op_end(), I->op_begin()));
+}
----------------
llvm::is_splat?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102698/new/
https://reviews.llvm.org/D102698
More information about the llvm-commits
mailing list