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

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 06:28:25 PDT 2023


nikic accepted this revision.
nikic added a comment.

LGTM



================
Comment at: llvm/lib/Transforms/Scalar/LICM.cpp:2737
+    Instruction *Ins = cast<Instruction>(U->getUser());
+    IRBuilder<> Builder(Preheader->getTerminator());
+    U->set(Builder.CreateFMulFMF(U->get(), Factor, Ins, "factor.op.fmul"));
----------------
nit: Can move this IRBuilder outside the loop.


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