diff options
author | Marek Olšák <[email protected]> | 2019-12-12 17:00:51 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2019-12-16 20:06:07 +0000 |
commit | e5e3ffa6b93e005eb122b9cf510ee34b4cf6886b (patch) | |
tree | 6c8346117c4841203ee4015008503cfda8fba03d /src | |
parent | 5386b7e011b4986a52de08d0b944eb317e5134fd (diff) |
ac: fix ac_get_i1_sgpr_mask for Wave32
Reviewed-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3095>
Diffstat (limited to 'src')
-rw-r--r-- | src/amd/llvm/ac_llvm_build.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/amd/llvm/ac_llvm_build.c b/src/amd/llvm/ac_llvm_build.c index 47c27893fe5..a0e9eecd823 100644 --- a/src/amd/llvm/ac_llvm_build.c +++ b/src/amd/llvm/ac_llvm_build.c @@ -505,14 +505,23 @@ ac_build_ballot(struct ac_llvm_context *ctx, LLVMValueRef ac_get_i1_sgpr_mask(struct ac_llvm_context *ctx, LLVMValueRef value) { - const char *name = LLVM_VERSION_MAJOR >= 9 ? "llvm.amdgcn.icmp.i64.i1" : "llvm.amdgcn.icmp.i1"; + const char *name; + + if (LLVM_VERSION_MAJOR >= 9) { + if (ctx->wave_size == 64) + name = "llvm.amdgcn.icmp.i64.i1"; + else + name = "llvm.amdgcn.icmp.i32.i1"; + } else { + name = "llvm.amdgcn.icmp.i1"; + } LLVMValueRef args[3] = { value, ctx->i1false, LLVMConstInt(ctx->i32, LLVMIntNE, 0), }; - return ac_build_intrinsic(ctx, name, ctx->i64, args, 3, + return ac_build_intrinsic(ctx, name, ctx->iN_wavemask, args, 3, AC_FUNC_ATTR_NOUNWIND | AC_FUNC_ATTR_READNONE | AC_FUNC_ATTR_CONVERGENT); |