[PATCH] D97219: [LSR] Unify scheduling of existing and inserted addrecs

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 28 21:44:14 PST 2021


mkazantsev accepted this revision.
mkazantsev added a comment.
This revision is now accepted and ready to land.

LGTM for now. I'm currently factoring out functions like `isIVStep`, `getIVStep` for other purposes. We can reuse it here once all pieces are pulled together.



================
Comment at: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:5581
+
+    if (IncV->getOpcode() != Instruction::Add &&
+        IncV->getOpcode() != Instruction::Sub)
----------------
I would still advice using matchers here.


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

https://reviews.llvm.org/D97219



More information about the llvm-commits mailing list