Mesa (staging/22.0): nir/opcodes: fisfinite32 should return bool32
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Apr 21 20:48:23 UTC 2022
Module: Mesa
Branch: staging/22.0
Commit: 2374e0746c70e2513b73f4f852db782ac8e4ecc5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2374e0746c70e2513b73f4f852db782ac8e4ecc5
Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date: Fri Apr 15 15:20:17 2022 -0500
nir/opcodes: fisfinite32 should return bool32
Otherwise constant-folding will fold it to 0/1 instead of 0/~0.
Fixes: 330e28155f79 ("nir: add 32-bit bool of fisfinite")
Reviewed-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15984>
(cherry picked from commit 5c9e4d400a66a0d139ebacab9ec9d0e135116812)
---
.pick_status.json | 2 +-
src/compiler/nir/nir_opcodes.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 20d9646cf90..1d11367f4f6 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -1756,7 +1756,7 @@
"description": "nir/opcodes: fisfinite32 should return bool32",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"because_sha": "330e28155f79b533a72fc3376fb54ffbf245b458"
},
{
diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py
index 4df73119ed3..1d2173218d6 100644
--- a/src/compiler/nir/nir_opcodes.py
+++ b/src/compiler/nir/nir_opcodes.py
@@ -1282,7 +1282,7 @@ binop("umul24_relaxed", tuint32, _2src_commutative + associative, "src0 * src1")
unop_convert("fisnormal", tbool1, tfloat, "isnormal(src0)")
unop_convert("fisfinite", tbool1, tfloat, "isfinite(src0)")
-unop_convert("fisfinite32", tint32, tfloat, "isfinite(src0)")
+unop_convert("fisfinite32", tbool32, tfloat, "isfinite(src0)")
# vc4-specific opcodes
More information about the mesa-commit
mailing list