Mesa (master): aco: fix 64-bit p_extract_vector on 32-bit p_create_vector

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 22 19:56:11 UTC 2019


Module: Mesa
Branch: master
Commit: a400928f4a64c657c214672a39801130cceaf79b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a400928f4a64c657c214672a39801130cceaf79b

Author: Rhys Perry <pendingchaos02 at gmail.com>
Date:   Mon Oct 14 19:27:52 2019 +0100

aco: fix 64-bit p_extract_vector on 32-bit p_create_vector

Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>

---

 src/amd/compiler/aco_optimizer.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/amd/compiler/aco_optimizer.cpp b/src/amd/compiler/aco_optimizer.cpp
index 501e48162be..4a287336d0d 100644
--- a/src/amd/compiler/aco_optimizer.cpp
+++ b/src/amd/compiler/aco_optimizer.cpp
@@ -765,7 +765,8 @@ void label_instruction(opt_ctx &ctx, aco_ptr<Instruction>& instr)
       if (!ctx.info[instr->operands[0].tempId()].is_vec())
          break;
       Instruction* vec = ctx.info[instr->operands[0].tempId()].instr;
-      if (vec->definitions[0].getTemp().size() == vec->operands.size()) { /* TODO: what about 64bit or other combinations? */
+      if (vec->definitions[0].getTemp().size() == vec->operands.size() && /* TODO: what about 64bit or other combinations? */
+          vec->operands[0].size() == instr->definitions[0].size()) {
 
          /* convert this extract into a mov instruction */
          Operand vec_op = vec->operands[instr->operands[1].constantValue()];




More information about the mesa-commit mailing list