From 6375ed922474f5fd92c14001fd9b6a4da4525b42 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Mon, 12 Sep 2011 06:42:38 -0700 Subject: [PATCH] AVX: Fix bug with misdeclaration of blend intrinsic. This was preventing the "convert an all-on blend to one of the operand values" optimization from kicking on in AVX. --- opt.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opt.cpp b/opt.cpp index 63bea4da..da574403 100644 --- a/opt.cpp +++ b/opt.cpp @@ -424,8 +424,11 @@ IntrinsicsOpt::IntrinsicsOpt() blendInstructions.push_back(BlendInstruction( llvm::Intrinsic::getDeclaration(m->module, llvm::Intrinsic::x86_sse41_blendvps), 0xf, 0, 1, 2)); +#if defined(LLVM_3_0) || defined(LLVM_3_0svn) blendInstructions.push_back(BlendInstruction( - m->module->getFunction("llvm.x86.avx.blendvps"), 0xff, 0, 1, 2)); + llvm::Intrinsic::getDeclaration(m->module, llvm::Intrinsic::x86_avx_blendv_ps_256), + 0xff, 0, 1, 2)); +#endif }