ac: make use of ac_get_store_intr_attribs() where possible
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 12 Mar 2019 10:27:13 +0000 (11:27 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 20 Mar 2019 21:18:35 +0000 (22:18 +0100)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_llvm_build.c

index 9cf1c6f8792e81fb690d6b716d539c452358ae96..d87bf098494dc081851ee1980b373cf845ac675b 100644 (file)
@@ -1150,9 +1150,7 @@ ac_build_buffer_store_dword(struct ac_llvm_context *ctx,
 
                ac_build_intrinsic(ctx, name, ctx->voidt,
                                   args, ARRAY_SIZE(args),
-                                  writeonly_memory ?
-                                  AC_FUNC_ATTR_INACCESSIBLE_MEM_ONLY :
-                                  AC_FUNC_ATTR_WRITEONLY);
+                                  ac_get_store_intr_attribs(writeonly_memory));
                return;
        }
 
@@ -1181,9 +1179,7 @@ ac_build_buffer_store_dword(struct ac_llvm_context *ctx,
 
        ac_build_intrinsic(ctx, name, ctx->voidt,
                           args, ARRAY_SIZE(args),
-                          writeonly_memory ?
-                                  AC_FUNC_ATTR_INACCESSIBLE_MEM_ONLY :
-                                  AC_FUNC_ATTR_WRITEONLY);
+                          ac_get_store_intr_attribs(writeonly_memory));
 }
 
 static LLVMValueRef