From bc4f4030e245e36642f894d848f6a8bf94426cc2 Mon Sep 17 00:00:00 2001 From: Mon P Wang Date: Wed, 15 Oct 2008 06:18:34 +0000 Subject: [PATCH] Added pinsrd, pinsrq, and some other vector intrinsics git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57563 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/AST/X86Builtins.def | 4 ++++ lib/CodeGen/CGBuiltin.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/include/clang/AST/X86Builtins.def b/include/clang/AST/X86Builtins.def index 057ff91f12..e9d4d703e9 100644 --- a/include/clang/AST/X86Builtins.def +++ b/include/clang/AST/X86Builtins.def @@ -421,6 +421,10 @@ BUILTIN(__builtin_ia32_vec_ext_v4hi, "sV4si", "") BUILTIN(__builtin_ia32_vec_ext_v2si, "iV2ii", "") BUILTIN(__builtin_ia32_vec_set_v8hi, "V8sV8ssi", "") BUILTIN(__builtin_ia32_vec_set_v4hi, "V4sV4ssi", "") +BUILTIN(__builtin_ia32_vec_set_v16qi, "V16cV16cii", "") +BUILTIN(__builtin_ia32_vec_set_v4si, "V4iV4iii", "") +BUILTIN(__builtin_ia32_vec_set_v2di, "V2LLV2LLLLi", "") +BUILTIN(__builtin_ia32_insertps128, "V4fV4fV4fi", "") BUILTIN(__builtin_ia32_movqv4si, "V4iV4i", "") BUILTIN(__builtin_ia32_loadlv4si, "V4iV2i*", "") diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp index aa9fdd813f..d08d9bc5f2 100644 --- a/lib/CodeGen/CGBuiltin.cpp +++ b/lib/CodeGen/CGBuiltin.cpp @@ -902,6 +902,10 @@ Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID, case X86::BI__builtin_ia32_vec_set_v4hi: case X86::BI__builtin_ia32_vec_set_v8hi: return Builder.CreateInsertElement(Ops[0], Ops[1], Ops[2], "pinsrw"); + case X86::BI__builtin_ia32_vec_set_v4si: + return Builder.CreateInsertElement(Ops[0], Ops[1], Ops[2], "pinsrd"); + case X86::BI__builtin_ia32_vec_set_v2di: + return Builder.CreateInsertElement(Ops[0], Ops[1], Ops[2], "pinsrq"); case X86::BI__builtin_ia32_andps: case X86::BI__builtin_ia32_andpd: case X86::BI__builtin_ia32_andnps: