[PATCH] D88287: [NARY-REASSOCIATE] Support reassociation of min/max

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 29 21:56:27 PDT 2020


mkazantsev added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/NaryReassociate.cpp:606
+template <typename MaxMinT>
+Value *NaryReassociatePass::tryReassociateMinOrMax(Instruction *I,
+                                                   MaxMinT MaxMinMatch,
----------------
mkazantsev wrote:
> The result of `tryReassociateMinOrMax` is only used as instruction, and non-instruction values are discarded by `dyn_cast_or_null`. Maybe change API to return instruction from here?
Never mind, I think what you have is fine (I didn't notice it's a mutator).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88287



More information about the llvm-commits mailing list