Mesa (main): nir/opcodes: fisfinite32 should return bool32

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Apr 16 03:18:10 UTC 2022


Module: Mesa
Branch: main
Commit: 5c9e4d400a66a0d139ebacab9ec9d0e135116812
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5c9e4d400a66a0d139ebacab9ec9d0e135116812

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>

---

 src/compiler/nir/nir_opcodes.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir_opcodes.py b/src/compiler/nir/nir_opcodes.py
index d23420a35c5..a604451d3df 100644
--- a/src/compiler/nir/nir_opcodes.py
+++ b/src/compiler/nir/nir_opcodes.py
@@ -1292,7 +1292,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