[llvm-commits] [llvm-gcc-4.2] r90200 - /llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
Eric Christopher
echristo at apple.com
Mon Nov 30 19:19:40 PST 2009
Author: echristo
Date: Mon Nov 30 21:19:40 2009
New Revision: 90200
URL: http://llvm.org/viewvc/llvm-project?rev=90200&view=rev
Log:
Lower these explicitly and check for an invalid argument.
Modified:
llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
Modified: llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp?rev=90200&r1=90199&r2=90200&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/llvm-i386.cpp Mon Nov 30 21:19:40 2009
@@ -606,6 +606,20 @@
Result = Builder.CreateLoad(Ptr);
return true;
}
+ case IX86_BUILTIN_PALIGNR:
+ case IX86_BUILTIN_PALIGNR128: {
+ if (ConstantInt *Elt = dyn_cast<ConstantInt>(Ops[2])) {
+ Function *palignr =
+ Intrinsic::getDeclaration(TheModule, Intrinsic::x86_ssse3_palign_r_128);
+ Value *CallOps[3] = { Ops[0], Ops[1], Ops[2] };
+ Result = Builder.CreateCall(palignr, CallOps, CallOps+3);
+ return true;
+ } else {
+ error("%Hmask must be an immediate", &EXPR_LOCATION(exp));
+ Result = Ops[0];
+ return true;
+ }
+ }
}
return false;
More information about the llvm-commits
mailing list