mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
ac/llvm: inline ac_build_gather_values_extended
Reviewed-by: Pierre-Eric Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40589>
This commit is contained in:
parent
235e32d560
commit
dbf027534a
2 changed files with 4 additions and 14 deletions
|
|
@ -492,21 +492,20 @@ LLVMValueRef ac_build_vote_any(struct ac_llvm_context *ctx, LLVMValueRef value)
|
|||
"");
|
||||
}
|
||||
|
||||
LLVMValueRef ac_build_gather_values_extended(struct ac_llvm_context *ctx, LLVMValueRef *values,
|
||||
unsigned value_count, unsigned value_stride,
|
||||
bool always_vector)
|
||||
LLVMValueRef ac_build_gather_values(struct ac_llvm_context *ctx, LLVMValueRef *values,
|
||||
unsigned value_count)
|
||||
{
|
||||
LLVMBuilderRef builder = ctx->builder;
|
||||
LLVMValueRef vec = NULL;
|
||||
unsigned i;
|
||||
|
||||
if (value_count == 1 && !always_vector) {
|
||||
if (value_count == 1) {
|
||||
return values[0];
|
||||
} else if (!value_count)
|
||||
UNREACHABLE("value_count is 0");
|
||||
|
||||
for (i = 0; i < value_count; i++) {
|
||||
LLVMValueRef value = values[i * value_stride];
|
||||
LLVMValueRef value = values[i];
|
||||
|
||||
if (!i)
|
||||
vec = LLVMGetUndef(LLVMVectorType(LLVMTypeOf(value), value_count));
|
||||
|
|
@ -516,12 +515,6 @@ LLVMValueRef ac_build_gather_values_extended(struct ac_llvm_context *ctx, LLVMVa
|
|||
return vec;
|
||||
}
|
||||
|
||||
LLVMValueRef ac_build_gather_values(struct ac_llvm_context *ctx, LLVMValueRef *values,
|
||||
unsigned value_count)
|
||||
{
|
||||
return ac_build_gather_values_extended(ctx, values, value_count, 1, false);
|
||||
}
|
||||
|
||||
LLVMValueRef ac_build_concat(struct ac_llvm_context *ctx, LLVMValueRef a, LLVMValueRef b)
|
||||
{
|
||||
if (!a)
|
||||
|
|
|
|||
|
|
@ -184,9 +184,6 @@ LLVMValueRef ac_build_vote_all(struct ac_llvm_context *ctx, LLVMValueRef value);
|
|||
|
||||
LLVMValueRef ac_build_vote_any(struct ac_llvm_context *ctx, LLVMValueRef value);
|
||||
|
||||
LLVMValueRef ac_build_gather_values_extended(struct ac_llvm_context *ctx, LLVMValueRef *values,
|
||||
unsigned value_count, unsigned value_stride,
|
||||
bool always_vector);
|
||||
LLVMValueRef ac_build_gather_values(struct ac_llvm_context *ctx, LLVMValueRef *values,
|
||||
unsigned value_count);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue