# HG changeset patch # User Christian Kamm # Date 1227473831 -3600 # Node ID a45179dfaa437bf01f4e1a94b82085c4c22e9708 # Parent d268bf419a097873ba250a4ebcd56ab3114a8c40 Fix float->bool, #130. Thanks fvbommel. diff -r d268bf419a09 -r a45179dfaa43 gen/llvmhelpers.cpp --- 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);