diff --git a/src/amd/llvm/ac_nir_to_llvm.c b/src/amd/llvm/ac_nir_to_llvm.c index 7a20785d32d..7d50f3e2d3d 100644 --- a/src/amd/llvm/ac_nir_to_llvm.c +++ b/src/amd/llvm/ac_nir_to_llvm.c @@ -2016,6 +2016,10 @@ static void visit_store_global(struct ac_nir_context *ctx, LLVMTypeRef type = LLVMTypeOf(data); LLVMValueRef addr = get_global_address(ctx, instr, type); LLVMValueRef val; + /* nir_opt_shrink_stores should be enough to simplify the writemask. Store writemasks should + * have no holes. + */ + assert(nir_intrinsic_write_mask(instr) == BITFIELD_MASK(instr->src[0].ssa->num_components)); val = LLVMBuildStore(ctx->ac.builder, data, addr);