[llvm-commits] [dragonegg] r132670 - in /dragonegg/trunk/src/x86: Target.cpp x86_builtins
Duncan Sands
baldrick at free.fr
Sun Jun 5 09:25:07 PDT 2011
Author: baldrick
Date: Sun Jun 5 11:25:07 2011
New Revision: 132670
URL: http://llvm.org/viewvc/llvm-project?rev=132670&view=rev
Log:
Rather than turning sqrtps into llvm.sqrt, just turn it into the LLVM
sqrtps intrinsic (this happens automagically), because llvm.sqrt does
not have the same semantics. Turn sqrtps_nr into sqrtps, since this
is what GCC does.
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=132670&r1=132669&r2=132670&view=diff
==============================================================================
--- dragonegg/trunk/src/x86/Target.cpp (original)
+++ dragonegg/trunk/src/x86/Target.cpp Sun Jun 5 11:25:07 2011
@@ -776,19 +776,12 @@
SI->setAlignment(16);
return true;
}
- case sqrtpd:
- case sqrtpd256:
- case sqrtps:
- case sqrtps256:
- case sqrtsd:
- 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);
- Result = Builder.CreateCall(sqrt, Ops[0]);
+ case sqrtps_nr: {
+ // Turn this into sqrtps without a Newton-Raphson step - sqrtps is already
+ // accurate enough.
+ Function *sqrtps = Intrinsic::getDeclaration(TheModule,
+ Intrinsic::x86_sse_sqrt_ps);
+ Result = Builder.CreateCall(sqrtps, Ops[0]);
return true;
}
}
Modified: dragonegg/trunk/src/x86/x86_builtins
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/x86/x86_builtins?rev=132670&r1=132669&r2=132670&view=diff
==============================================================================
--- dragonegg/trunk/src/x86/x86_builtins (original)
+++ dragonegg/trunk/src/x86/x86_builtins Sun Jun 5 11:25:07 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(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(sqrtps_nr256),
+//DEFINE_BUILTIN(sqrtsd),
+//DEFINE_BUILTIN(sqrtss),
DEFINE_BUILTIN(stmxcsr),
DEFINE_BUILTIN(storedqu),
//DEFINE_BUILTIN(storedqu256),
More information about the llvm-commits
mailing list