Page MenuHomePhabricator

Promote readability by factoring out creation of min/max operation. Remove unnecessary divisions.
ClosedPublic

Authored by bakhtiyarneyman on Sep 29 2021, 12:10 AM.

Diff Detail

Event Timeline

bakhtiyarneyman requested review of this revision.Sep 29 2021, 12:10 AM

Use min/max ops.

ezhulenev accepted this revision.Oct 19 2021, 5:27 AM
This revision is now accepted and ready to land.Oct 19 2021, 5:27 AM

Can you please sync to head and re-upload, can't apply the patch to the head

ezhulenev added a comment.EditedOct 20 2021, 7:23 AM

There is one failed test

Failed Tests (1):
  MLIR :: Dialect/Async/async-parallel-for-canonicalize.mlir

Also the diff is agains the commit that is not in the llvm repo:

This diff is against commit 8a77386b7f31d4d983972b9b4fc5386817f417d6, but
    the commit is nowhere in the working copy

Rebase to head.

I have a failing test for this patch: Integration/Dialect/Async/CPU/test-async-parallel-for-2d.mlir

Looks like the problem is that there is no LLVM lowering for minsi:

%14 = builtin.unrealized_conversion_cast %13 : i64 to index
    %17 = builtin.unrealized_conversion_cast %16 : i64 to index
    %18 = minsi %17, %14 : index
    %19 = builtin.unrealized_conversion_cast %18 : index to i64

Fix the failing test.