gallivm: added lp_build_andc()
This commit is contained in:
@@ -483,3 +483,13 @@ lp_build_alloca(struct lp_build_context *bld)
|
||||
return LLVMBuildAlloca(bld->builder, lp_build_elem_type(type), "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/** Return (a & ~b) */
|
||||
LLVMValueRef
|
||||
lp_build_andc(struct lp_build_context *bld, LLVMValueRef a, LLVMValueRef b)
|
||||
{
|
||||
b = LLVMBuildNot(bld->builder, b, "");
|
||||
b = LLVMBuildAnd(bld->builder, a, b, "");
|
||||
return b;
|
||||
}
|
||||
|
||||
@@ -79,4 +79,9 @@ lp_build_select_aos(struct lp_build_context *bld,
|
||||
LLVMValueRef
|
||||
lp_build_alloca(struct lp_build_context *bld);
|
||||
|
||||
|
||||
LLVMValueRef
|
||||
lp_build_andc(struct lp_build_context *bld, LLVMValueRef a, LLVMValueRef b);
|
||||
|
||||
|
||||
#endif /* !LP_BLD_LOGIC_H */
|
||||
|
||||
Reference in New Issue
Block a user