From eb1fb9305d744a29d5772c34faa5086dca0a8c1c Mon Sep 17 00:00:00 2001 From: Iago Toral Quiroga Date: Thu, 7 Jul 2022 11:13:51 +0200 Subject: [PATCH] nir: fix documentation for uadd_carry and usub_borry opcodes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These opcodes where fixed to return an integer instead of a boolean value some time ago but the documentation for them was not updated and still talked about a boolean result. Fixes: b0d4ee520 ('nir/opcodes: Fix up uadd_carry and usub_borrow') Reviewed-by: Alejandro PiƱeiro Part-of: (cherry picked from commit 84a0dca9dffebe7927a388d95ca620d3677acb30) --- .pick_status.json | 2 +- src/compiler/nir/nir_opcodes.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index f2da3fbeb39..1fac486f0de 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2182,7 +2182,7 @@ "description": "nir: fix documentation for uadd_carry and usub_borry opcodes", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "b0d4ee520e20444172d088d11260e656fc1cf12d" }, diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py index bb0c8dc7be6..adc0317e6c7 100644 --- a/src/compiler/nir/nir_opcodes.py +++ b/src/compiler/nir/nir_opcodes.py @@ -762,13 +762,13 @@ binop("fdiv", tfloat, "", "src0 / src1") binop("idiv", tint, "", "src1 == 0 ? 0 : (src0 / src1)") binop("udiv", tuint, "", "src1 == 0 ? 0 : (src0 / src1)") -# returns a boolean representing the carry resulting from the addition of -# the two unsigned arguments. +# returns an integer (1 or 0) representing the carry resulting from the +# addition of the two unsigned arguments. binop_convert("uadd_carry", tuint, tuint, _2src_commutative, "src0 + src1 < src0") -# returns a boolean representing the borrow resulting from the subtraction -# of the two unsigned arguments. +# returns an integer (1 or 0) representing the borrow resulting from the +# subtraction of the two unsigned arguments. binop_convert("usub_borrow", tuint, tuint, "", "src0 < src1")