[llvm-commits] [dragonegg] r132393 - in /dragonegg/trunk/src/x86: Target.cpp x86_builtins
Duncan Sands
baldrick at free.fr
Wed Jun 1 05:10:01 PDT 2011
Author: baldrick
Date: Wed Jun 1 07:10:01 2011
New Revision: 132393
URL: http://llvm.org/viewvc/llvm-project?rev=132393&view=rev
Log:
GCC treats sqrtps_nr exactly the same as sqrtps, so do the same.
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=132393&r1=132392&r2=132393&view=diff
==============================================================================
--- dragonegg/trunk/src/x86/Target.cpp (original)
+++ dragonegg/trunk/src/x86/Target.cpp Wed Jun 1 07:10:01 2011
@@ -781,7 +781,10 @@
case sqrtps:
case sqrtps256:
case sqrtsd:
- case sqrtss: {
+ case sqrtss:
+ // No need for a Newton-Raphson step - sqrtps is already accurate.
+ case sqrtps_nr:
+ case sqrtps_nr256: {
const Type *Ty = Ops[0]->getType();
Function *sqrt = Intrinsic::getDeclaration(TheModule, Intrinsic::sqrt, &Ty,
1);
Modified: dragonegg/trunk/src/x86/x86_builtins
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/x86/x86_builtins?rev=132393&r1=132392&r2=132393&view=diff
==============================================================================
--- dragonegg/trunk/src/x86/x86_builtins (original)
+++ dragonegg/trunk/src/x86/x86_builtins Wed Jun 1 07:10:01 2011
@@ -529,8 +529,8 @@
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(sqrtps_nr),
+DEFINE_BUILTIN(sqrtps_nr256),
DEFINE_BUILTIN(sqrtsd),
DEFINE_BUILTIN(sqrtss),
DEFINE_BUILTIN(stmxcsr),
More information about the llvm-commits
mailing list