[all-commits] [llvm/llvm-project] b76f0a: [LoopUnroll] Add tests for peeling iterations base...

Joshua Cao via All-commits all-commits at lists.llvm.org
Wed May 24 00:58:41 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b76f0a0b153cb3d62e3e0d844deb3b6193922aaf
      https://github.com/llvm/llvm-project/commit/b76f0a0b153cb3d62e3e0d844deb3b6193922aaf
  Author: Joshua Cao <cao.joshua at yahoo.com>
  Date:   2023-05-24 (Wed, 24 May 2023)

  Changed paths:
    M llvm/test/Transforms/LoopUnroll/peel-loop-conditions.ll

  Log Message:
  -----------
  [LoopUnroll] Add tests for peeling iterations based on select, and, or
conditions


  Commit: 849d01bf3d97d05074a00d78903d782b2ac804f8
      https://github.com/llvm/llvm-project/commit/849d01bf3d97d05074a00d78903d782b2ac804f8
  Author: Joshua Cao <cao.joshua at yahoo.com>
  Date:   2023-05-24 (Wed, 24 May 2023)

  Changed paths:
    M llvm/lib/Transforms/Utils/LoopPeel.cpp
    M llvm/test/Transforms/LoopUnroll/peel-loop-conditions.ll

  Log Message:
  -----------
  [LoopUnroll] Peel iterations based on select conditions

This also allows us to peel loops with a `select`:
```
for (int i = 0; i <= N; ++i);
  f3(i == 0 ? a : b); // select instruction
```
into:
```
f3(a); // peel one iteration
for (int i = 1; i <= N; ++i)
  f3(b);
```

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D151052


Compare: https://github.com/llvm/llvm-project/compare/51df1a9ac96f...849d01bf3d97


More information about the All-commits mailing list