From f3310cb3e16ddc3b8f7941f4df3b5b9775b8aa94 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 11 May 2020 11:05:15 -0400 Subject: [PATCH] nir: Fold f2f16(b2f32(x)) to b2f16(x) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit By definition. This reduces register pressure on freedreno so that the noubo expected failure goes away. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Marek Olšák Reviewed-by: Rob Clark Reviewed-by: Eric Anholt Part-of: --- .gitlab-ci.yml | 1 - .gitlab-ci/deqp-freedreno-a630-noubo-fails.txt | 1 - src/compiler/nir/nir_opt_algebraic.py | 2 ++ 3 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 .gitlab-ci/deqp-freedreno-a630-noubo-fails.txt diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 31c9bd7d4a9..d8639ba48e4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -887,7 +887,6 @@ arm64_a630_noubo: DEQP_VER: gles31 IR3_SHADER_DEBUG: nouboopt DEQP_CASELIST_FILTER: "functional.*ubo" - DEQP_EXPECTED_FAILS: deqp-freedreno-a630-noubo-fails.txt # The driver does some guessing as to whether to render using gmem # or bypass, and some GLES3.1 features interact with either one. diff --git a/.gitlab-ci/deqp-freedreno-a630-noubo-fails.txt b/.gitlab-ci/deqp-freedreno-a630-noubo-fails.txt deleted file mode 100644 index 64f25970e92..00000000000 --- a/.gitlab-ci/deqp-freedreno-a630-noubo-fails.txt +++ /dev/null @@ -1 +0,0 @@ -dEQP-GLES31.functional.ubo.random.all_per_block_buffers.20 diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index b1bc4b46bc7..44b0ecc2c08 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -899,6 +899,8 @@ optimizations.extend([ # Conversions from float16 to float32 and back can always be removed (('f2f16', ('f2f32', 'a@16')), a), (('f2fmp', ('f2f32', 'a@16')), a), + (('f2f16', ('b2f32', 'a@1')), ('b2f16', a)), + (('f2fmp', ('b2f32', 'a@1')), ('b2f16', a)), # Conversions to float16 would be lossy so they should only be removed if # the instruction was generated by the precision lowering pass. (('f2f32', ('f2fmp', 'a@32')), a), -- 2.30.2