[PATCH] D75662: [MLIR] add negi in standard dialect

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 6 01:08:01 PST 2020


ftynse added a comment.

In D75662#1909044 <https://reviews.llvm.org/D75662#1909044>, @qqsun8819 wrote:

> In D75662#1907027 <https://reviews.llvm.org/D75662#1907027>, @mehdi_amini wrote:
>
> > I understand that this is present in TF and HLO, but do we need this in standard right now? How do you plan to use this?
> >  (It seems like this isn't an instruction in LLVM right now)
>
>
> I create a pr in TF to add use this instruction in lhlo lowering to linalg : https://github.com/tensorflow/tensorflow/pull/37381


And what prevents you from emitting

  %0 = constant 0 : i??
  %1 = cmpi "slt" %arg, %0 : i??
  %2 = subi %0, %arg : i??
  %3 = select %1, %2, %arg

there instead of changing the standard dialect?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75662





More information about the llvm-commits mailing list