From f48a3cffe7331a63b3c950320e4e98ea8b596d0f Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 15 Apr 2022 15:20:17 -0500 Subject: [PATCH] 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 Part-of: (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 1ca79638721..23302d6b6bf 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1588,7 +1588,7 @@ "description": "nir/opcodes: fisfinite32 should return bool32", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "330e28155f79b533a72fc3376fb54ffbf245b458" }, 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