[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:16 PST 2023


================
@@ -723,10 +735,13 @@ def Arith_ShRUIOp : Arith_TotalIntBinaryOp<"shrui"> {
 def Arith_ShRSIOp : Arith_TotalIntBinaryOp<"shrsi"> {
   let summary = "signed integer right-shift";
   let description = [{
-    The `shrsi` operation shifts an integer value to the right by a variable
-    amount. The integer is interpreted as signed. The high order bits in the
-    output are filled with copies of the most-significant bit of the shifted
-    value (which means that the sign of the value is preserved).
+    The `shrsi` operation shifts an integer value of the first operand to the right 
+    by the value of the second operand. The first operand is interpreted as signed, 
+    and the second operand is interpreter as unsigned. The high order bits in the 
+    output are filled with copies of the most-significant bit of the shifted value 
+    (which means that the sign of the value is preserved). If the value of the second 
+    operand is greater than the number of bits in the first operand, then the 
----------------
kuhar wrote:

Same here

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


More information about the Mlir-commits mailing list