From 3963402fd343dd4cd7bef0f6b64e51e029798944 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Wed, 23 May 2018 22:04:20 +0200 Subject: [PATCH] amd/common: add ac_build_ifcc MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák --- src/amd/common/ac_llvm_build.c | 7 +++---- src/amd/common/ac_llvm_build.h | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c index 7b4fa95771b..3b958d2a318 100644 --- a/src/amd/common/ac_llvm_build.c +++ b/src/amd/common/ac_llvm_build.c @@ -2626,8 +2626,7 @@ void ac_build_endloop(struct ac_llvm_context *ctx, int label_id) ctx->flow_depth--; } -static void if_cond_emit(struct ac_llvm_context *ctx, LLVMValueRef cond, - int label_id) +void ac_build_ifcc(struct ac_llvm_context *ctx, LLVMValueRef cond, int label_id) { struct ac_llvm_flow *flow = push_flow(ctx); LLVMBasicBlockRef if_block; @@ -2644,7 +2643,7 @@ void ac_build_if(struct ac_llvm_context *ctx, LLVMValueRef value, { LLVMValueRef cond = LLVMBuildFCmp(ctx->builder, LLVMRealUNE, value, ctx->f32_0, ""); - if_cond_emit(ctx, cond, label_id); + ac_build_ifcc(ctx, cond, label_id); } void ac_build_uif(struct ac_llvm_context *ctx, LLVMValueRef value, @@ -2653,7 +2652,7 @@ void ac_build_uif(struct ac_llvm_context *ctx, LLVMValueRef value, LLVMValueRef cond = LLVMBuildICmp(ctx->builder, LLVMIntNE, ac_to_integer(ctx, value), ctx->i32_0, ""); - if_cond_emit(ctx, cond, label_id); + ac_build_ifcc(ctx, cond, label_id); } LLVMValueRef ac_build_alloca_undef(struct ac_llvm_context *ac, LLVMTypeRef type, diff --git a/src/amd/common/ac_llvm_build.h b/src/amd/common/ac_llvm_build.h index ed466033b25..ab063546338 100644 --- a/src/amd/common/ac_llvm_build.h +++ b/src/amd/common/ac_llvm_build.h @@ -480,6 +480,7 @@ void ac_build_continue(struct ac_llvm_context *ctx); void ac_build_else(struct ac_llvm_context *ctx, int lable_id); void ac_build_endif(struct ac_llvm_context *ctx, int lable_id); void ac_build_endloop(struct ac_llvm_context *ctx, int lable_id); +void ac_build_ifcc(struct ac_llvm_context *ctx, LLVMValueRef cond, int label_id); void ac_build_if(struct ac_llvm_context *ctx, LLVMValueRef value, int lable_id); void ac_build_uif(struct ac_llvm_context *ctx, LLVMValueRef value, -- 2.30.2