aco/insert_exec_mask: use get_exec_op
authorRhys Perry <pendingchaos02@gmail.com>
Wed, 23 Feb 2022 17:35:33 +0000 (17:35 +0000)
committerMarge Bot <emma+marge@anholt.net>
Tue, 8 Mar 2022 12:49:59 +0000 (12:49 +0000)
No fossil-db changes.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15244>

src/amd/compiler/aco_insert_exec_mask.cpp

index 5638b4e..04928c3 100644 (file)
@@ -613,12 +613,11 @@ process_instructions(exec_ctx& ctx, Block* block, std::vector<aco_ptr<Instructio
 
          for (int i = num; i >= 0; i--) {
             if (ctx.info[block->index].exec[i].second & mask_type_exact) {
-               Instruction* andn2 = bld.sop2(Builder::s_andn2, bld.def(bld.lm), bld.def(s1, scc),
-                                             ctx.info[block->index].exec[i].first, cond);
-               if (i == (int)ctx.info[block->index].exec.size() - 1) {
-                  andn2->operands[0] = Operand(exec, bld.lm);
+               Instruction* andn2 =
+                  bld.sop2(Builder::s_andn2, bld.def(bld.lm), bld.def(s1, scc),
+                           get_exec_op(ctx.info[block->index].exec[i].first), cond);
+               if (i == (int)ctx.info[block->index].exec.size() - 1)
                   andn2->definitions[0] = Definition(exec, bld.lm);
-               }
 
                ctx.info[block->index].exec[i].first = Operand(andn2->definitions[0].getTemp());
                exit_cond = andn2->definitions[1].getTemp();