diff options
author | Anders Carlsson <andersca@mac.com> | 2007-12-09 21:51:19 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2007-12-09 21:51:19 +0000 |
commit | 5adb5709d93c1a7ef2bdacd164e98a794f9ed09f (patch) | |
tree | ccdfc9913cffd0fbea30d468ddd08a2b35931e08 | |
parent | ca6fcfad547dcec3fdd17790b4fab0918df74b37 (diff) |
Implement __builtin_ia32_mulps.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44745 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | CodeGen/CGBuiltin.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CodeGen/CGBuiltin.cpp b/CodeGen/CGBuiltin.cpp index 14e13e6ffc..7f3bd0ad31 100644 --- a/CodeGen/CGBuiltin.cpp +++ b/CodeGen/CGBuiltin.cpp @@ -80,6 +80,15 @@ RValue CodeGenFunction::EmitBuiltinExpr(unsigned BuiltinID, const CallExpr *E) { return RValue::get(V); } + if (strcmp(TargetPrefix, "x86") == 0) { + if (strcmp(BuiltinName, "__builtin_ia32_mulps") == 0) { + llvm::Value *V = Builder.CreateMul(EmitScalarExpr(E->getArg(0)), + EmitScalarExpr(E->getArg(1)), + "result"); + return RValue::get(V); + } + } + WarnUnsupported(E, "builtin function"); // Unknown builtin, for now just dump it out and return undef. @@ -179,6 +188,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(unsigned BuiltinID, const CallExpr *E) { llvm::Value *V = llvm::ConstantFP::get(llvm::Type::DoubleTy, f); return RValue::get(V); } + } return RValue::get(0); |