mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-14 20:03:14 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user