summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_bld_arit.c
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2009-09-06 13:15:04 +0200
committerNicolai Hähnle <[email protected]>2009-09-06 13:15:04 +0200
commitf02f63997ce65530788a6dfcb28f11790a14d938 (patch)
treefc6aedb5256bfb84eb170cb82addd2b6605510f8 /src/gallium/drivers/llvmpipe/lp_bld_arit.c
parente95e76e1255a3ad0ce604271301d090337b2e82b (diff)
parent9778731732b4753e79a1b786c65325a52392411d (diff)
Merge branch 'master' into r300-compiler
Conflicts: src/gallium/drivers/r300/r300_tgsi_to_rc.c
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_bld_arit.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_bld_arit.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_bld_arit.c b/src/gallium/drivers/llvmpipe/lp_bld_arit.c
index 710e6246d74..09a57ff33d5 100644
--- a/src/gallium/drivers/llvmpipe/lp_bld_arit.c
+++ b/src/gallium/drivers/llvmpipe/lp_bld_arit.c
@@ -52,6 +52,7 @@
#include "lp_bld_type.h"
#include "lp_bld_const.h"
#include "lp_bld_intr.h"
+#include "lp_bld_logic.h"
#include "lp_bld_arit.h"
@@ -98,11 +99,8 @@ lp_build_min_simple(struct lp_build_context *bld,
if(intrinsic)
return lp_build_intrinsic_binary(bld->builder, intrinsic, lp_build_vec_type(bld->type), a, b);
- if(type.floating)
- cond = LLVMBuildFCmp(bld->builder, LLVMRealULT, a, b, "");
- else
- cond = LLVMBuildICmp(bld->builder, type.sign ? LLVMIntSLT : LLVMIntULT, a, b, "");
- return LLVMBuildSelect(bld->builder, cond, a, b, "");
+ cond = lp_build_cmp(bld, PIPE_FUNC_LESS, a, b);
+ return lp_build_select(bld, cond, a, b);
}
@@ -149,11 +147,8 @@ lp_build_max_simple(struct lp_build_context *bld,
if(intrinsic)
return lp_build_intrinsic_binary(bld->builder, intrinsic, lp_build_vec_type(bld->type), a, b);
- if(type.floating)
- cond = LLVMBuildFCmp(bld->builder, LLVMRealULT, a, b, "");
- else
- cond = LLVMBuildICmp(bld->builder, type.sign ? LLVMIntSLT : LLVMIntULT, a, b, "");
- return LLVMBuildSelect(bld->builder, cond, b, a, "");
+ cond = lp_build_cmp(bld, PIPE_FUNC_GREATER, a, b);
+ return lp_build_select(bld, cond, a, b);
}