[PATCH] D148001: [LICM] Reassociate & hoist sub expressions

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 01:52:49 PDT 2023


mkazantsev marked an inline comment as done.
mkazantsev added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LICM.cpp:2607
+  bool ShouldNegateOp1 = NegateVariantOp;
+  bool ShouldNegateOp2 = NegateVariantOp ^ NegateInvariantOp ^ true;
+  assert(!(ShouldNegateOp1 && ShouldNegateOp2) &&
----------------
anna wrote:
> This gets confusing enough to read for me .. will take a while to parse this :)
> 
> Can I suggest to start with the minimal pattern you wanted to support? I see you have couple of swaps earlier as well to handle all general forms. 
I tried to do it more reader-friendly. :)


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

https://reviews.llvm.org/D148001



More information about the llvm-commits mailing list