[llvm-commits] [dragonegg] r103004 - /dragonegg/trunk/x86/llvm-target.cpp
Duncan Sands
baldrick at free.fr
Tue May 4 02:41:51 PDT 2010
Author: baldrick
Date: Tue May 4 04:41:51 2010
New Revision: 103004
URL: http://llvm.org/viewvc/llvm-project?rev=103004&view=rev
Log:
Use FAdd rather than Add when adding floating point vectors,
and likewise for subtraction and multiplication.
Modified:
dragonegg/trunk/x86/llvm-target.cpp
Modified: dragonegg/trunk/x86/llvm-target.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/x86/llvm-target.cpp?rev=103004&r1=103003&r2=103004&view=diff
==============================================================================
--- dragonegg/trunk/x86/llvm-target.cpp (original)
+++ dragonegg/trunk/x86/llvm-target.cpp Tue May 4 04:41:51 2010
@@ -757,6 +757,8 @@
unknown: return false;
IX86_BUILTIN_ADDPS:
IX86_BUILTIN_ADDPD:
+ Result = Builder.CreateFAdd(Ops[0], Ops[1]);
+ return true;
IX86_BUILTIN_PADDB:
IX86_BUILTIN_PADDW:
IX86_BUILTIN_PADDD:
@@ -769,6 +771,8 @@
return true;
IX86_BUILTIN_SUBPS:
IX86_BUILTIN_SUBPD:
+ Result = Builder.CreateFSub(Ops[0], Ops[1]);
+ return true;
IX86_BUILTIN_PSUBB:
IX86_BUILTIN_PSUBW:
IX86_BUILTIN_PSUBD:
@@ -781,6 +785,8 @@
return true;
IX86_BUILTIN_MULPS:
IX86_BUILTIN_MULPD:
+ Result = Builder.CreateFMul(Ops[0], Ops[1]);
+ return true;
IX86_BUILTIN_PMULLW:
IX86_BUILTIN_PMULLW128:
Result = Builder.CreateMul(Ops[0], Ops[1]);
More information about the llvm-commits
mailing list