diff options
author | Samuel Pitoiset <[email protected]> | 2020-04-15 16:15:11 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-20 06:59:47 +0000 |
commit | eed0ace466d05e4ab07e638ac94a821788a8deaa (patch) | |
tree | 0d5505212e876170e4a894dd0541f9f65be2d6dd /src/compiler | |
parent | 17acff01a00109c87d59b9d876fc735dd5fbe3d1 (diff) |
nir/lower_int64: lower imin3/imax3/umin3/umax3/imed3/umed3
Fixes dEQP-VK.spirv_assembly.instruction.amd_trinary_minmax.*.i64.*
with ACO because this backend compiler expects most of the 64-bit
operations to be lowered.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4570>
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/nir/nir_lower_int64.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_int64.c b/src/compiler/nir/nir_lower_int64.c index e18a5481225..7eb0ae52403 100644 --- a/src/compiler/nir/nir_lower_int64.c +++ b/src/compiler/nir/nir_lower_int64.c @@ -716,6 +716,12 @@ nir_lower_int64_op_to_options_mask(nir_op opcode) case nir_op_imax: case nir_op_umin: case nir_op_umax: + case nir_op_imin3: + case nir_op_imax3: + case nir_op_umin3: + case nir_op_umax3: + case nir_op_imed3: + case nir_op_umed3: return nir_lower_minmax64; case nir_op_iabs: return nir_lower_iabs64; @@ -815,6 +821,18 @@ lower_int64_alu_instr(nir_builder *b, nir_instr *instr, void *_state) return lower_umin64(b, src[0], src[1]); case nir_op_umax: return lower_umax64(b, src[0], src[1]); + case nir_op_imin3: + return lower_imin64(b, src[0], lower_imin64(b, src[1], src[2])); + case nir_op_imax3: + return lower_imax64(b, src[0], lower_imax64(b, src[1], src[2])); + case nir_op_umin3: + return lower_umin64(b, src[0], lower_umin64(b, src[1], src[2])); + case nir_op_umax3: + return lower_umax64(b, src[0], lower_umax64(b, src[1], src[2])); + case nir_op_imed3: + return lower_imax64(b, lower_imin64(b, lower_imax64(b, src[0], src[1]), src[2]), lower_imin64(b, src[0], src[1])); + case nir_op_umed3: + return lower_umax64(b, lower_umin64(b, lower_umax64(b, src[0], src[1]), src[2]), lower_umin64(b, src[0], src[1])); case nir_op_iabs: return lower_iabs64(b, src[0]); case nir_op_ineg: |