From: Keith Whitwell Date: Wed, 6 Oct 2010 18:10:30 +0000 (+0100) Subject: gallivm: prefer blendvb for integer arguments X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c79f162367b99d9438bd1589ecfdeba69baa9d3d;p=mesa.git gallivm: prefer blendvb for integer arguments --- diff --git a/src/gallium/auxiliary/gallivm/lp_bld_logic.c b/src/gallium/auxiliary/gallivm/lp_bld_logic.c index ce5d0214b43..026b60ac36e 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_logic.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_logic.c @@ -462,10 +462,12 @@ lp_build_select(struct lp_build_context *bld, LLVMTypeRef arg_type; LLVMValueRef args[3]; - if (type.width == 64) { + if (type.floating && + type.width == 64) { intrinsic = "llvm.x86.sse41.blendvpd"; arg_type = LLVMVectorType(LLVMDoubleType(), 2); - } else if (type.width == 32) { + } else if (type.floating && + type.width == 32) { intrinsic = "llvm.x86.sse41.blendvps"; arg_type = LLVMVectorType(LLVMFloatType(), 4); } else {