]> granicus.if.org Git - clang/commitdiff
Teach clang how to codegen punpcklbw and punpcklwd
authorNate Begeman <natebegeman@mac.com>
Thu, 3 Apr 2008 19:58:06 +0000 (19:58 +0000)
committerNate Begeman <natebegeman@mac.com>
Thu, 3 Apr 2008 19:58:06 +0000 (19:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49186 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBuiltin.cpp

index 83c5e60475cc47b31eeff518b5caf5389934b41e..e26fb016872e2d837b9f0e6c8f03019fe04638ae 100644 (file)
@@ -475,6 +475,13 @@ Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID,
                              i & 0x3, (i & 0xc) >> 2, 
                              ((i & 0x30) >> 4) + 4, 
                              ((i & 0x60) >> 6) + 4, "shufps");
+  case X86::BI__builtin_ia32_punpcklbw128:
+    return EmitShuffleVector(Ops[0], Ops[1], 0, 16, 1, 17, 2, 18, 3, 19,
+                                             4, 20, 5, 21, 6, 22, 7, 23,
+                                             "punpcklbw");
+  case X86::BI__builtin_ia32_punpcklwd128:
+    return EmitShuffleVector(Ops[0], Ops[1], 0, 8, 1, 9, 2, 10, 3, 11,
+                             "punpcklwd");
   }
 }