From d3a2366ee877075c59b38bd8ced55f224fc7ef51 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Tue, 26 Jul 2022 16:27:14 +0000 Subject: [PATCH] Implement some more llvm float compare intrinsic options --- src/intrinsics/llvm.rs | 20 ++++---------------- 1 file 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), };