[PATCH] D136233: [SimpleLoopUnswitch] Inject loop-invariant conditions and unswitch them when it's profitable

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 7 04:59:52 PST 2023


mkazantsev updated this revision to Diff 495478.
mkazantsev added a comment.

Fixed 2 minor bugs:

- Degenerate profile {0, 0} is now rejected;
- Do not use `Builder.CreateICmp` for injected condition creation, as it may generate a constant and break further logic. Leave this simplification for the further passes.


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

https://reviews.llvm.org/D136233

Files:
  llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
  llvm/test/Transforms/SimpleLoopUnswitch/inject-invariant-conditions.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136233.495478.patch
Type: text/x-patch
Size: 39426 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230207/928a0dd3/attachment.bin>


More information about the llvm-commits mailing list