changeset 784:a45179dfaa43

Fix float->bool, #130. Thanks fvbommel.
author Christian Kamm <kamm incasoftware de>
date Sun, 23 Nov 2008 21:57:11 +0100
parents d268bf419a09
children ac39e5449ca5
files gen/llvmhelpers.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gen/llvmhelpers.cpp	Sat Nov 22 21:11:26 2008 +0100
+++ b/gen/llvmhelpers.cpp	Sun Nov 23 21:57:11 2008 +0100
@@ -665,7 +665,7 @@
     if (totype->ty == Tbool) {
         rval = val->getRVal();
         LLValue* zero = LLConstant::getNullValue(rval->getType());
-        rval = gIR->ir->CreateFCmpONE(rval, zero, "tmp");
+        rval = gIR->ir->CreateFCmpUNE(rval, zero, "tmp");
     }
     else if (totype->iscomplex()) {
         return DtoComplex(loc, to, val);