[cfe-commits] r61324 - /cfe/trunk/lib/CodeGen/CGBuiltin.cpp
Anders Carlsson
andersca at mac.com
Sun Dec 21 20:54:41 PST 2008
Author: andersca
Date: Sun Dec 21 22:54:32 2008
New Revision: 61324
URL: http://llvm.org/viewvc/llvm-project?rev=61324&view=rev
Log:
Generate code for __builtin_ia32_pshufw
Modified:
cfe/trunk/lib/CodeGen/CGBuiltin.cpp
Modified: cfe/trunk/lib/CodeGen/CGBuiltin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBuiltin.cpp?rev=61324&r1=61323&r2=61324&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBuiltin.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBuiltin.cpp Sun Dec 21 22:54:32 2008
@@ -595,6 +595,13 @@
llvm::Function *F = CGM.getIntrinsic(ID);
return Builder.CreateCall(F, &Ops[0], &Ops[0] + Ops.size(), name);
}
+ case X86::BI__builtin_ia32_pshufw: {
+ unsigned i = cast<ConstantInt>(Ops[1])->getZExtValue();
+ return EmitShuffleVector(Ops[0], Ops[0],
+ i & 0x3, (i & 0xc) >> 2,
+ (i & 0x30) >> 4, (i & 0xc0) >> 6,
+ "pshufw");
+ }
case X86::BI__builtin_ia32_pshuflw: {
unsigned i = cast<ConstantInt>(Ops[1])->getZExtValue();
return EmitShuffleVector(Ops[0], Ops[0],
More information about the cfe-commits
mailing list