[PATCH] D102698: [InstCombine] Relaxed constraints of uses for exp(X) * exp(Y) -> exp(X + Y) and exp2(X) * exp2(Y) -> exp2(X + Y)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 24 05:51:17 PDT 2021


spatel added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:3305
 
+bool llvm::isOnlyUserOfAnyOperand(Instruction *I) {
+  assert(I->getNumOperands() && "Must have at least one operand");
----------------
This seems inverted. How about creating an inspection function within the Instruction class itself?
  bool Instruction::isOnlyUserOfAnyOperand() const;



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102698/new/

https://reviews.llvm.org/D102698



More information about the llvm-commits mailing list