From 1dc6751721a2fe9990ea8fab4eadc95a29f53304 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 4 Apr 2019 22:07:15 -0400 Subject: fix NaN comparing equal to itself This was broken both in comptime code and in runtime code. closes #1174 --- src/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index 3b3a97dbfa..568344fc09 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -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: -- cgit v1.2.3