StandardOps: introduce 'select'.
The semantics of 'select' is conventional: return the second operand if the first operand is true (1 : i1) and the third operand otherwise. It is applicable to vectors and tensors element-wise, similarly to LLVM instruction. This operation is necessary to implement min/max to lower 'for' loops with complex bounds to CFG functions and to support ternary operations in ML functions. It is preferred to first-class min/max because of its simplicity, e.g. it is not concered with signedness. PiperOrigin-RevId: 223160860
Loading
Please sign in to comment