diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-09-16 11:44:01 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-09-16 20:20:49 +0100 |
commit | 795eb3d64a001a65d677e3168bdd056cc5385b7e (patch) | |
tree | d33d9d2e2b2aa51bf7c20f09c0df8ab90bb58872 /src/gallium/auxiliary/gallivm/lp_bld_logic.c | |
parent | 3d5b9c1f2d3340259dd0d8765090a5a963074f29 (diff) |
gallivm: Start collecting bitwise arithmetic helpers in a new module.
Diffstat (limited to 'src/gallium/auxiliary/gallivm/lp_bld_logic.c')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_logic.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_logic.c b/src/gallium/auxiliary/gallivm/lp_bld_logic.c index a959bd4ad4..d5c62a3f73 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_logic.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_logic.c @@ -556,28 +556,3 @@ lp_build_select_aos(struct lp_build_context *bld, #endif } } - - -/** Return (a & ~b) */ -LLVMValueRef -lp_build_andc(struct lp_build_context *bld, LLVMValueRef a, LLVMValueRef b) -{ - const struct lp_type type = bld->type; - - assert(lp_check_value(type, a)); - assert(lp_check_value(type, b)); - - /* can't do bitwise ops on floating-point values */ - if(type.floating) { - a = LLVMBuildBitCast(bld->builder, a, bld->int_vec_type, ""); - b = LLVMBuildBitCast(bld->builder, b, bld->int_vec_type, ""); - } - - b = LLVMBuildNot(bld->builder, b, ""); - b = LLVMBuildAnd(bld->builder, a, b, ""); - - if(type.floating) { - b = LLVMBuildBitCast(bld->builder, b, bld->vec_type, ""); - } - return b; -} |