[PATCH] D78690: [mlir][Standard] Allow select to use an i1 for vector and tensor values

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 22:46:44 PDT 2020


mehdi_amini added inline comments.


================
Comment at: mlir/include/mlir/Dialect/StandardOps/IR/Ops.td:1934
+    // Element-wise vector selection.
+    %vx = std.select" %vcond, %vtrue, %vfalse : vector<42xi1>, vector<42xf32>
+
----------------
rriddle wrote:
> mehdi_amini wrote:
> > It almost seems like an entirely different operation to me compared to the simple selection of one input or the other. Should we have a vselect or something?
> vselect sounds weird given that it also supports tensors, but I agree that the semantics are kind of different. The optional predication is the only thing that removes this from solely being a "simple" select. 
Do you plan to followup on looking into splitting this in two different ops?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78690





More information about the llvm-commits mailing list