diff --git a/.pick_status.json b/.pick_status.json index a4a316c78ec..cef4e8f5c4d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -499,7 +499,7 @@ "description": "ac/llvm: Fix validation error with global io", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "afd645f0576f2cf41b65f360787f01604f00f0f2" }, diff --git a/src/amd/llvm/ac_nir_to_llvm.c b/src/amd/llvm/ac_nir_to_llvm.c index 7856a7d7474..007652bde33 100644 --- a/src/amd/llvm/ac_nir_to_llvm.c +++ b/src/amd/llvm/ac_nir_to_llvm.c @@ -2147,7 +2147,7 @@ static LLVMValueRef get_global_address(struct ac_nir_context *ctx, LLVMTypeRef i8_ptr_type = LLVMPointerType(ctx->ac.i8, AC_ADDR_SPACE_GLOBAL); addr = LLVMBuildIntToPtr(ctx->ac.builder, addr, i8_ptr_type, ""); addr = LLVMBuildGEP2(ctx->ac.builder, ctx->ac.i8, addr, &offset, 1, ""); - return addr; + return LLVMBuildPointerCast(ctx->ac.builder, addr, ptr_type, ""); } else { return LLVMBuildIntToPtr(ctx->ac.builder, addr, ptr_type, ""); }