[llvm-branch-commits] [llvm-gcc-branch] r90202 - /llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/config/i386/llvm-i386.cpp
Eric Christopher
echristo at apple.com
Mon Nov 30 19:25:21 PST 2009
Author: echristo
Date: Mon Nov 30 21:25:21 2009
New Revision: 90202
URL: http://llvm.org/viewvc/llvm-project?rev=90202&view=rev
Log:
Merge from mainline:
Lower these explicitly and check for an invalid argument.
Modified:
llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/config/i386/llvm-i386.cpp
Modified: llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/config/i386/llvm-i386.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/config/i386/llvm-i386.cpp?rev=90202&r1=90201&r2=90202&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/config/i386/llvm-i386.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Zoidberg/gcc/config/i386/llvm-i386.cpp Mon Nov 30 21:25:21 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-branch-commits
mailing list