gallivm: only do rcp/mul for floating

rcp asserts on type.floating so don't go passing non-floating
things into it.

Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie
2012-02-28 11:23:04 +00:00
parent 9773370eda
commit 2a76609681
+2 -1
View File
@@ -612,7 +612,8 @@ lp_build_div(struct lp_build_context *bld,
return LLVMConstUDiv(a, b);
}
if(util_cpu_caps.has_sse && type.width == 32 && type.length == 4)
if(util_cpu_caps.has_sse && type.width == 32 && type.length == 4 &&
type.floating)
return lp_build_mul(bld, a, lp_build_rcp(bld, b));
if (type.floating)