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

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 14:09:40 PDT 2023


anna added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LICM.cpp:2607
+  bool ShouldNegateOp1 = NegateVariantOp;
+  bool ShouldNegateOp2 = NegateVariantOp ^ NegateInvariantOp ^ true;
+  assert(!(ShouldNegateOp1 && ShouldNegateOp2) &&
----------------
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. 


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

https://reviews.llvm.org/D148001



More information about the llvm-commits mailing list