gallivm: add frem support to the lp_build_mod helper.

for completeness.

Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie 2012-02-28 10:43:14 +00:00
parent aec11e4daa
commit a46548e0ef
1 changed files with 2 additions and 1 deletions

View File

@ -2565,10 +2565,11 @@ lp_build_mod(struct lp_build_context *bld,
LLVMValueRef res;
const struct lp_type type = bld->type;
assert(type.floating);
assert(lp_check_value(type, x));
assert(lp_check_value(type, y));
if (type.floating)
res = LLVMBuildFRem(builder, x, y, "");
if (type.sign)
res = LLVMBuildSRem(builder, x, y, "");
else