diff options
author | Marek Olšák <[email protected]> | 2018-09-22 21:17:52 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-10-16 17:23:25 -0400 |
commit | bfc795670ec82af5767cf360806e32322664604e (patch) | |
tree | b6d2672e2e4cf42bfa1d7e10ca05959a68f92d30 /src/amd/common/ac_llvm_build.h | |
parent | ea039f789d9b54e1bd1d644b6a29863ca3500314 (diff) |
ac: add helpers for fast integer division by a constant
Diffstat (limited to 'src/amd/common/ac_llvm_build.h')
-rw-r--r-- | src/amd/common/ac_llvm_build.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h index 5c3e221b2cc..f68efbc49ff 100644 --- a/src/amd/common/ac_llvm_build.h +++ b/src/amd/common/ac_llvm_build.h @@ -182,6 +182,23 @@ ac_build_fdiv(struct ac_llvm_context *ctx, LLVMValueRef num, LLVMValueRef den); +LLVMValueRef ac_build_fast_udiv(struct ac_llvm_context *ctx, + LLVMValueRef num, + LLVMValueRef multiplier, + LLVMValueRef pre_shift, + LLVMValueRef post_shift, + LLVMValueRef increment); +LLVMValueRef ac_build_fast_udiv_nuw(struct ac_llvm_context *ctx, + LLVMValueRef num, + LLVMValueRef multiplier, + LLVMValueRef pre_shift, + LLVMValueRef post_shift, + LLVMValueRef increment); +LLVMValueRef ac_build_fast_udiv_u31_d_not_one(struct ac_llvm_context *ctx, + LLVMValueRef num, + LLVMValueRef multiplier, + LLVMValueRef post_shift); + void ac_prepare_cube_coords(struct ac_llvm_context *ctx, bool is_deriv, bool is_array, bool is_lod, |