about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2022-07-26 16:27:14 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2022-07-26 16:27:14 +0000
commitd3a2366ee877075c59b38bd8ced55f224fc7ef51 (patch)
tree3117cec906c08e884b1f40632ad6c3718438c5f3
parentd3099a40c77b7782b031d05c60d595a236306dba (diff)
downloadrust-d3a2366ee877075c59b38bd8ced55f224fc7ef51.tar.gz
rust-d3a2366ee877075c59b38bd8ced55f224fc7ef51.zip
Implement some more llvm float compare intrinsic options
-rw-r--r--src/intrinsics/llvm.rs20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/intrinsics/llvm.rs b/src/intrinsics/llvm.rs
index a987e20b11a..869670c8cfa 100644
--- a/src/intrinsics/llvm.rs
+++ b/src/intrinsics/llvm.rs
@@ -64,23 +64,11 @@ pub(crate) fn codegen_llvm_intrinsic_call<'tcx>(
                 0 => FloatCC::Equal,
                 1 => FloatCC::LessThan,
                 2 => FloatCC::LessThanOrEqual,
-                7 => {
-                    unimplemented!(
-                        "Compares corresponding elements in `a` and `b` to see if neither is `NaN`."
-                    );
-                }
-                3 => {
-                    unimplemented!(
-                        "Compares corresponding elements in `a` and `b` to see if either is `NaN`."
-                    );
-                }
+                7 => FloatCC::Ordered,
+                3 => FloatCC::Unordered,
                 4 => FloatCC::NotEqual,
-                5 => {
-                    unimplemented!("not less than");
-                }
-                6 => {
-                    unimplemented!("not less than or equal");
-                }
+                5 => FloatCC::UnorderedOrGreaterThanOrEqual,
+                6 => FloatCC::UnorderedOrGreaterThan,
                 kind => unreachable!("kind {:?}", kind),
             };