[opengtl-commits] [287] use float division for vectors |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/opengtl-commits Archives
]
Revision: 287
Author: cyrille
Date: 2008-07-02 00:18:18 +0200 (Wed, 02 Jul 2008)
Log Message:
-----------
use float division for vectors
Modified Paths:
--------------
trunk/OpenGTL/OpenGTL/GTLCore/CodeGenerator_p.cpp
Modified: trunk/OpenGTL/OpenGTL/GTLCore/CodeGenerator_p.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/CodeGenerator_p.cpp 2008-07-01 22:17:46 UTC (rev 286)
+++ trunk/OpenGTL/OpenGTL/GTLCore/CodeGenerator_p.cpp 2008-07-01 22:18:18 UTC (rev 287)
@@ -340,7 +340,9 @@
llvm::Value* CodeGenerator::createDivisionExpression(llvm::BasicBlock* currentBlock, llvm::Value* lhs, const Type* lhsType, llvm::Value* rhs, const Type* rhsType)
{
UNIFORMIZE_VALUE_TYPES( lhs, rhs );
- if( v1->getType()->isFloatingPoint() )
+ if( v1->getType()->isFloatingPoint()
+ or ( highestPriorityType->dataType() == GTLCore::Type::VECTOR
+ and highestPriorityType->embeddedType()->dataType() == GTLCore::Type::FLOAT ) )
{
return llvm::BinaryOperator::createFDiv(v1, v2, "", currentBlock );
} else {