diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-04-04 22:07:15 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-04-04 22:07:15 -0400 |
| commit | 1dc6751721a2fe9990ea8fab4eadc95a29f53304 (patch) | |
| tree | fb85f1874651709f419567327241e94748d63bb8 /src/codegen.cpp | |
| parent | 8e6ff8d615820f7f732724a5db1639ae5f12fb4e (diff) | |
| download | zig-1dc6751721a2fe9990ea8fab4eadc95a29f53304.tar.gz zig-1dc6751721a2fe9990ea8fab4eadc95a29f53304.zip | |
fix NaN comparing equal to itself
This was broken both in comptime code and in runtime code.
closes #1174
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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: |
