aco: look at p_{extract,split}_vector's definitions in pred_by_exec_mask()
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 26 Mar 2020 13:22:13 +0000 (13:22 +0000)
committerMarge Bot <eric+marge@anholt.net>
Mon, 30 Mar 2020 17:34:46 +0000 (17:34 +0000)
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4333>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4333>

src/amd/compiler/aco_insert_exec_mask.cpp

index 527d63627e089cd9898cbc07055fb5cbed1c9c5a..909c1735453aea1fd7f1f2b46347ef0e3483f1c5 100644 (file)
@@ -107,10 +107,13 @@ bool pred_by_exec_mask(aco_ptr<Instruction>& instr) {
    if (instr->format == Format::PSEUDO) {
       switch (instr->opcode) {
       case aco_opcode::p_create_vector:
-         return instr->definitions[0].getTemp().type() == RegType::vgpr;
       case aco_opcode::p_extract_vector:
       case aco_opcode::p_split_vector:
-         return instr->operands[0].getTemp().type() == RegType::vgpr;
+         for (Definition def : instr->definitions) {
+            if (def.getTemp().type() == RegType::vgpr)
+               return true;
+         }
+         return false;
       case aco_opcode::p_spill:
       case aco_opcode::p_reload:
          return false;