nir: Fold f2f16(b2f32(x)) to b2f16(x)
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 11 May 2020 15:05:15 +0000 (11:05 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 2 Jun 2020 20:01:18 +0000 (20:01 +0000)
By definition.

This reduces register pressure on freedreno so that the noubo expected
failure goes away.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5002>

.gitlab-ci.yml
.gitlab-ci/deqp-freedreno-a630-noubo-fails.txt [deleted file]
src/compiler/nir/nir_opt_algebraic.py

index 31c9bd7d4a9debce4b46f095a2d0458144a4f389..d8639ba48e4912f18112cd1ce3bbe360ab939b5c 100644 (file)
@@ -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 (file)
index 64f2597..0000000
+++ /dev/null
@@ -1 +0,0 @@
-dEQP-GLES31.functional.ubo.random.all_per_block_buffers.20
index b1bc4b46bc7960ebe599244616fde6eccecec149..44b0ecc2c085503c581ee14c608e1d5c61aea4a7 100644 (file)
@@ -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),