Made is and !is use the same numeric comparison as == and !=, fixes #328

Factored out common code from EqualExp and IdentityExp into
DtoBinNumericEquals in binexp.cpp.
This commit is contained in:
Christian Kamm
2009-06-16 23:00:27 +02:00
parent 4158fb474a
commit 7dbe9baa37
4 changed files with 60 additions and 46 deletions

View File

@@ -390,7 +390,7 @@ LLValue* DtoComplexEquals(Loc& loc, TOK op, DValue* lhs, DValue* rhs)
// select predicate
llvm::FCmpInst::Predicate cmpop;
if (op == TOKequal)
if (op == TOKequal || op == TOKidentity)
cmpop = llvm::FCmpInst::FCMP_OEQ;
else
cmpop = llvm::FCmpInst::FCMP_UNE;