summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2013-07-05 11:53:09 +0100
committerJosé Fonseca <[email protected]>2013-07-12 15:40:16 +0100
commit1b0d29b5da66998bd70a9429a4c02af6bdc57e89 (patch)
treea2d08b1161f0354255cd18f2668c77fb7362b109 /src/gallium/auxiliary
parent46205ab8cc03cbda6bbc0c958e277f972973ebfe (diff)
gallivm: Eliminate redundant lp_build_select calls.
lp_build_cmp already returns 0 / ~0, so the lp_build_select call is unnecessary. Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c
index e65035219ba..68bd1243ece 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c
@@ -1161,14 +1161,9 @@ iset_emit_cpu(
struct lp_build_emit_data * emit_data,
unsigned pipe_func)
{
- LLVMValueRef nz = lp_build_const_vec(bld_base->base.gallivm,
- bld_base->int_bld.type, ~0U);
LLVMValueRef cond = lp_build_cmp(&bld_base->int_bld, pipe_func,
emit_data->args[0], emit_data->args[1]);
- emit_data->output[emit_data->chan] = lp_build_select(&bld_base->int_bld,
- cond,
- nz,
- bld_base->int_bld.zero);
+ emit_data->output[emit_data->chan] = cond;
}
/* TGSI_OPCODE_IMAX (CPU Only) */
@@ -1620,14 +1615,9 @@ uset_emit_cpu(
struct lp_build_emit_data * emit_data,
unsigned pipe_func)
{
- LLVMValueRef nz = lp_build_const_vec(bld_base->base.gallivm,
- bld_base->uint_bld.type, ~0U);
LLVMValueRef cond = lp_build_cmp(&bld_base->uint_bld, pipe_func,
emit_data->args[0], emit_data->args[1]);
- emit_data->output[emit_data->chan] = lp_build_select(&bld_base->uint_bld,
- cond,
- nz,
- bld_base->uint_bld.zero);
+ emit_data->output[emit_data->chan] = cond;
}