diff options
author | Daniel Schürmann <daniel@schuermann.dev> | 2021-08-10 18:06:58 +0200 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-06-27 15:07:27 +0000 |
commit | b45a39c44bef8296d14ecc39c92b83d64db3f209 (patch) | |
tree | a8e4d0b1699948fd6783eab9e98cf5cd93d747df | |
parent | def3690447176edba1b063962bbbbdc6e2598ebf (diff) |
radv: vectorize nir_op_fdiv & nir_op_flrp & nir_op_ineg
These instructions are lowered to fmul/isub.
So, prevent scalarization.
Totals from 49 (0.04% of 134913) affected shaders: (GFX10.3)
VGPRs: 2576 -> 2568 (-0.31%)
SpillVGPRs: 1145 -> 1132 (-1.14%); split: -2.10%, +0.96%
CodeSize: 663968 -> 659376 (-0.69%); split: -1.08%, +0.38%
Scratch: 113664 -> 112640 (-0.90%)
Instrs: 110274 -> 109683 (-0.54%); split: -0.81%, +0.27%
Latency: 2904434 -> 2869588 (-1.20%); split: -1.64%, +0.44%
InvThroughput: 1414237 -> 1396600 (-1.25%); split: -1.69%, +0.44%
VClause: 2899 -> 2891 (-0.28%); split: -0.93%, +0.66%
SClause: 1520 -> 1537 (+1.12%); split: -0.07%, +1.18%
Copies: 28829 -> 28662 (-0.58%); split: -1.90%, +1.32%
Branches: 3560 -> 3564 (+0.11%)
PreVGPRs: 2550 -> 2427 (-4.82%)
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15176>
-rw-r--r-- | src/amd/vulkan/radv_pipeline.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 85f02742cc0..ebe72c11c02 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -4070,6 +4070,8 @@ opt_vectorize_callback(const nir_instr *instr, const void *_) case nir_op_fsub: case nir_op_fmul: case nir_op_ffma: + case nir_op_fdiv: + case nir_op_flrp: case nir_op_fneg: case nir_op_fsat: case nir_op_fmin: @@ -4080,6 +4082,7 @@ opt_vectorize_callback(const nir_instr *instr, const void *_) case nir_op_isub: case nir_op_isub_sat: case nir_op_usub_sat: + case nir_op_ineg: case nir_op_imul: case nir_op_imin: case nir_op_imax: |