mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
ac/llvm: fix various findMSB bugs
sffbh needs to be suffixed with ".i32" Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
429f112a11
commit
edd23e0606
1 changed files with 3 additions and 2 deletions
|
|
@ -769,7 +769,8 @@ ac_emit_imsb(struct ac_llvm_context *ctx,
|
||||||
LLVMValueRef arg,
|
LLVMValueRef arg,
|
||||||
LLVMTypeRef dst_type)
|
LLVMTypeRef dst_type)
|
||||||
{
|
{
|
||||||
const char *intr_name = (HAVE_LLVM < 0x0400) ? "llvm.AMDGPU.flbit.i32" : "llvm.amdgcn.sffbh";
|
const char *intr_name = (HAVE_LLVM < 0x0400) ? "llvm.AMDGPU.flbit.i32" :
|
||||||
|
"llvm.amdgcn.sffbh.i32";
|
||||||
LLVMValueRef msb = ac_emit_llvm_intrinsic(ctx, intr_name,
|
LLVMValueRef msb = ac_emit_llvm_intrinsic(ctx, intr_name,
|
||||||
dst_type, &arg, 1,
|
dst_type, &arg, 1,
|
||||||
AC_FUNC_ATTR_READNONE);
|
AC_FUNC_ATTR_READNONE);
|
||||||
|
|
@ -796,7 +797,7 @@ ac_emit_umsb(struct ac_llvm_context *ctx,
|
||||||
{
|
{
|
||||||
LLVMValueRef args[2] = {
|
LLVMValueRef args[2] = {
|
||||||
arg,
|
arg,
|
||||||
LLVMConstInt(ctx->i32, 1, 0),
|
LLVMConstInt(ctx->i1, 1, 0),
|
||||||
};
|
};
|
||||||
LLVMValueRef msb = ac_emit_llvm_intrinsic(ctx, "llvm.ctlz.i32",
|
LLVMValueRef msb = ac_emit_llvm_intrinsic(ctx, "llvm.ctlz.i32",
|
||||||
dst_type, args, ARRAY_SIZE(args),
|
dst_type, args, ARRAY_SIZE(args),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue