ac/llvm: Don't handle atomic derefs
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 9 May 2023 00:42:20 +0000 (20:42 -0400)
committerMarge Bot <emma+marge@anholt.net>
Fri, 12 May 2023 20:39:46 +0000 (20:39 +0000)
Should not be seen, already would be stubbed out.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Suggested-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22914>

src/amd/llvm/ac_nir_to_llvm.c

index 2803dac..8c17e54 100644 (file)
@@ -3159,8 +3159,7 @@ static LLVMValueRef visit_var_atomic(struct ac_nir_context *ctx, const nir_intri
 
       result = ac_build_atomic_rmw(&ctx->ac, op, ptr, val, sync_scope);
 
-      if (instr->intrinsic == nir_intrinsic_shared_atomic_fadd ||
-          instr->intrinsic == nir_intrinsic_deref_atomic_fadd) {
+      if (instr->intrinsic == nir_intrinsic_shared_atomic_fadd) {
          result = ac_to_integer(&ctx->ac, result);
       }
    }
@@ -3786,21 +3785,6 @@ static bool visit_intrinsic(struct ac_nir_context *ctx, nir_intrinsic_instr *ins
       result = visit_var_atomic(ctx, instr, ptr, 1);
       break;
    }
-   case nir_intrinsic_deref_atomic_add:
-   case nir_intrinsic_deref_atomic_imin:
-   case nir_intrinsic_deref_atomic_umin:
-   case nir_intrinsic_deref_atomic_imax:
-   case nir_intrinsic_deref_atomic_umax:
-   case nir_intrinsic_deref_atomic_and:
-   case nir_intrinsic_deref_atomic_or:
-   case nir_intrinsic_deref_atomic_xor:
-   case nir_intrinsic_deref_atomic_exchange:
-   case nir_intrinsic_deref_atomic_comp_swap:
-   case nir_intrinsic_deref_atomic_fadd: {
-      LLVMValueRef ptr = get_src(ctx, instr->src[0]);
-      result = visit_var_atomic(ctx, instr, ptr, 1);
-      break;
-   }
    case nir_intrinsic_load_barycentric_pixel:
       result = barycentric_center(ctx, nir_intrinsic_interp_mode(instr));
       break;