Mesa (master): aco: run nir_lower_int64() before nir_lower_idiv()
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Sep 25 15:28:13 UTC 2019
Module: Mesa
Branch: master
Commit: 641eac953c5fd59f69d3e7abe1443febc38d3a37
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=641eac953c5fd59f69d3e7abe1443febc38d3a37
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Tue Sep 24 15:15:26 2019 +0100
aco: run nir_lower_int64() before nir_lower_idiv()
nir_lower_idiv() asserts on 64-bit integers.
Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
---
src/amd/compiler/aco_instruction_selection_setup.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/amd/compiler/aco_instruction_selection_setup.cpp b/src/amd/compiler/aco_instruction_selection_setup.cpp
index 6c4c408e659..f77d12d2364 100644
--- a/src/amd/compiler/aco_instruction_selection_setup.cpp
+++ b/src/amd/compiler/aco_instruction_selection_setup.cpp
@@ -1307,9 +1307,6 @@ setup_isel_context(Program* program,
nir_lower_pack(nir);
/* lower ALU operations */
- nir_opt_idiv_const(nir, 32);
- nir_lower_idiv(nir); // TODO: use the LLVM path once !1239 is merged
-
// TODO: implement logic64 in aco, it's more effective for sgprs
nir_lower_int64(nir, (nir_lower_int64_options) (nir_lower_imul64 |
nir_lower_imul_high64 |
@@ -1320,6 +1317,9 @@ setup_isel_context(Program* program,
nir_lower_iabs64 |
nir_lower_ineg64));
+ nir_opt_idiv_const(nir, 32);
+ nir_lower_idiv(nir); // TODO: use the LLVM path once !1239 is merged
+
/* optimize the lowered ALU operations */
nir_copy_prop(nir);
nir_opt_constant_folding(nir);
More information about the mesa-commit
mailing list