Generate code for __builtin_ia32_pshufw

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61324 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp
index a4b5973..6877b31 100644
--- a/lib/CodeGen/CGBuiltin.cpp
+++ b/lib/CodeGen/CGBuiltin.cpp
@@ -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],