fix NaN comparing equal to itself

This was broken both in comptime code and in runtime code.

closes #1174
This commit is contained in:
Andrew Kelley
2019-04-04 22:07:15 -04:00
parent 8e6ff8d615
commit 1dc6751721
6 changed files with 54 additions and 1 deletions

View File

@@ -1852,7 +1852,7 @@ static LLVMRealPredicate cmp_op_to_real_predicate(IrBinOp cmp_op) {
case IrBinOpCmpEq:
return LLVMRealOEQ;
case IrBinOpCmpNotEq:
return LLVMRealONE;
return LLVMRealUNE;
case IrBinOpCmpLessThan:
return LLVMRealOLT;
case IrBinOpCmpGreaterThan: