[Mlir-commits] [mlir] [mlir][arith] doc updates for ub semantics, and int representations (PR #72932)

Jakub Kuderski llvmlistbot at llvm.org
Mon Nov 20 21:34:20 PST 2023


================
@@ -1422,9 +1437,15 @@ def SelectOp : Arith_Op<"select", [Pure,
   let summary = "select operation";
   let description = [{
     The `arith.select` operation chooses one value based on a binary condition
-    supplied as its first operand. If the value of the first operand is `1`,
-    the second operand is chosen, otherwise the third operand is chosen.
-    The second and the third operand must have the same type.
+    supplied as its first operand. 
+    
+    If the value of the first operand is `1`, then the second operand is returned, 
+    and the third operand is ignored, even if it were poison. 
+    
+    If the value of the first operand is `0`, then the third operand is returned, 
+    and the second operand is ignored, even if it were poison. 
+    
+    If the value of the first operand is poison, then the operation returns poison. 
----------------
kuhar wrote:

```suggestion
    If the value of the first operand (the condition) is poison, then the operation returns poison. 
```

https://github.com/llvm/llvm-project/pull/72932


More information about the Mlir-commits mailing list