-#include "gallivm/lp_bld_const.h"
-#include "gallivm/lp_bld_intr.h"
-#include "gallivm/lp_bld_gather.h"
-#include "tgsi/tgsi_parse.h"
-#include "amd/common/ac_llvm_build.h"
-
-static void kill_if_fetch_args(struct lp_build_tgsi_context *bld_base,
- struct lp_build_emit_data *emit_data)
-{
- const struct tgsi_full_instruction *inst = emit_data->inst;
- struct si_shader_context *ctx = si_shader_context(bld_base);
- LLVMBuilderRef builder = ctx->ac.builder;
- unsigned i;
- LLVMValueRef conds[TGSI_NUM_CHANNELS];
-
- for (i = 0; i < TGSI_NUM_CHANNELS; i++) {
- LLVMValueRef value = lp_build_emit_fetch(bld_base, inst, 0, i);
- conds[i] = LLVMBuildFCmp(builder, LLVMRealOGE, value,
- ctx->ac.f32_0, "");
- }
-
- /* And the conditions together */
- for (i = TGSI_NUM_CHANNELS - 1; i > 0; i--) {
- conds[i - 1] = LLVMBuildAnd(builder, conds[i], conds[i - 1], "");
- }
-
- emit_data->dst_type = ctx->voidt;
- emit_data->arg_count = 1;
- emit_data->args[0] = conds[0];
-}