[llvm-commits] [dragonegg] r132119 - in /dragonegg/trunk/src/x86: Target.cpp x86_builtins
Duncan Sands
baldrick at free.fr
Thu May 26 03:25:09 PDT 2011
Author: baldrick
Date: Thu May 26 05:25:08 2011
New Revision: 132119
URL: http://llvm.org/viewvc/llvm-project?rev=132119&view=rev
Log:
Untested support for a couple of x86 sqrt builtins (no testcase).
Modified:
dragonegg/trunk/src/x86/Target.cpp
dragonegg/trunk/src/x86/x86_builtins
Modified: dragonegg/trunk/src/x86/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/x86/Target.cpp?rev=132119&r1=132118&r2=132119&view=diff
==============================================================================
--- dragonegg/trunk/src/x86/Target.cpp (original)
+++ dragonegg/trunk/src/x86/Target.cpp Thu May 26 05:25:08 2011
@@ -777,6 +777,17 @@
SI->setAlignment(16);
return SI;
}
+ case sqrtpd:
+ case sqrtpd256:
+ case sqrtps:
+ case sqrtps256:
+ case sqrtsd:
+ case sqrtss: {
+ const Type *Ty = Ops[0]->getType();
+ Function *sqrt = Intrinsic::getDeclaration(TheModule, Intrinsic::sqrt, &Ty,
+ 1);
+ return Builder.CreateCall(sqrt, Ops[0]);
+ }
}
DieAbjectly("Builtin not implemented!", stmt);
return false;
Modified: dragonegg/trunk/src/x86/x86_builtins
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/x86/x86_builtins?rev=132119&r1=132118&r2=132119&view=diff
==============================================================================
--- dragonegg/trunk/src/x86/x86_builtins (original)
+++ dragonegg/trunk/src/x86/x86_builtins Thu May 26 05:25:08 2011
@@ -525,14 +525,14 @@
//DEFINE_BUILTIN(shufps256),
//DEFINE_BUILTIN(si256_si),
//DEFINE_BUILTIN(si_si256),
-//DEFINE_BUILTIN(sqrtpd),
-//DEFINE_BUILTIN(sqrtpd256),
-//DEFINE_BUILTIN(sqrtps),
-//DEFINE_BUILTIN(sqrtps256),
-//DEFINE_BUILTIN(sqrtps_nr),
-//DEFINE_BUILTIN(sqrtps_nr256),
-//DEFINE_BUILTIN(sqrtsd),
-//DEFINE_BUILTIN(sqrtss),
+DEFINE_BUILTIN(sqrtpd),
+DEFINE_BUILTIN(sqrtpd256),
+DEFINE_BUILTIN(sqrtps),
+DEFINE_BUILTIN(sqrtps256),
+//DEFINE_BUILTIN(sqrtps_nr), // With Newton-Raphson step
+//DEFINE_BUILTIN(sqrtps_nr256), // With Newton-Raphson step
+DEFINE_BUILTIN(sqrtsd),
+DEFINE_BUILTIN(sqrtss),
DEFINE_BUILTIN(stmxcsr),
DEFINE_BUILTIN(storedqu),
//DEFINE_BUILTIN(storedqu256),
More information about the llvm-commits
mailing list