[PATCH] D152281: [Transforms][LICM] Add the ability to undo unprofitable reassociation

Paul Osmialowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 05:48:17 PDT 2023


pawosm01 marked 2 inline comments as done.
pawosm01 added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/LICM.cpp:2704-2706
+  for (BinaryOperator *Op = nullptr, *OpNext = nullptr,
+                      *VOp = dyn_cast<BinaryOperator>(VariantOp);
+       VOp; VOp = OpNext) {
----------------
huntergr wrote:
> It may be worthwhile considering an upper limit on the number of multiplies you support -- depending on the trip count of the loop, you may actually be introducing extra work for no gain (especially for a target with wide vectors that may complete everything in one vector iteration).
I've imposed a reasonable upper limit below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152281



More information about the llvm-commits mailing list