Added support for sse intrinsics loadlpd, loadhpd, muldq128, and mulld128

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56830 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Mon P Wang 2008-09-30 05:31:27 +00:00
Родитель 6a30c1fc7f
Коммит 7f57b000f2
2 изменённых файлов: 9 добавлений и 0 удалений
include/clang/AST
lib/CodeGen

Просмотреть файл

@ -437,6 +437,8 @@ BUILTIN(__builtin_ia32_pmovzxbw128, "V8sV16c", "")
BUILTIN(__builtin_ia32_pmovzxdq128, "V2LLiV4i", "")
BUILTIN(__builtin_ia32_pmovzxwd128, "V4iV8s", "")
BUILTIN(__builtin_ia32_pmovzxwq128, "V2LLiV8s", "")
BUILTIN(__builtin_ia32_pmuldq128, "V2LLV4iV4i", "")
BUILTIN(__builtin_ia32_pmulld128, "V4iV4iV4i", "")
BUILTIN(__builtin_ia32_roundps, "V4fV4fi", "")
BUILTIN(__builtin_ia32_roundss, "V4fV4fi", "")
BUILTIN(__builtin_ia32_roundsd, "V2dV2di", "")

Просмотреть файл

@ -892,6 +892,13 @@ Value *CodeGenFunction::EmitX86BuiltinExpr(unsigned BuiltinID,
Ops[0] = Builder.CreateInsertElement(Ops[0], Ops[1], Idx, "loadps");
return Builder.CreateBitCast(Ops[0], OrigTy, "loadps");
}
case X86::BI__builtin_ia32_loadlpd:
case X86::BI__builtin_ia32_loadhpd: {
Ops[1] = Builder.CreateLoad(Ops[1], "tmp");
unsigned Index = BuiltinID == X86::BI__builtin_ia32_loadlpd ? 0 : 1;
llvm::Value *Idx = llvm::ConstantInt::get(llvm::Type::Int32Ty, Index);
return Builder.CreateInsertElement(Ops[0], Ops[1], Idx, "loadpd");
}
case X86::BI__builtin_ia32_storehps:
case X86::BI__builtin_ia32_storelps: {
const llvm::Type *EltTy = llvm::Type::Int64Ty;