@@ -86,6 +86,8 @@ pub enum Intrinsic {
8686 MinNumF32 ,
8787 MinNumF64 ,
8888 MulWithOverflow ,
89+ NearbyIntF32 ,
90+ NearbyIntF64 ,
8991 NeedsDrop ,
9092 PowF32 ,
9193 PowF64 ,
@@ -97,12 +99,12 @@ pub enum Intrinsic {
9799 PtrOffsetFromUnsigned ,
98100 RawEq ,
99101 RetagBoxToRaw ,
102+ RintF32 ,
103+ RintF64 ,
100104 RotateLeft ,
101105 RotateRight ,
102106 RoundF32 ,
103107 RoundF64 ,
104- RoundTiesEvenF32 ,
105- RoundTiesEvenF64 ,
106108 SaturatingAdd ,
107109 SaturatingSub ,
108110 SinF32 ,
@@ -674,6 +676,10 @@ fn try_match_f32(intrinsic_instance: &Instance) -> Option<Intrinsic> {
674676 assert_sig_matches ! ( sig, RigidTy :: Float ( FloatTy :: F32 ) , RigidTy :: Float ( FloatTy :: F32 ) => RigidTy :: Float ( FloatTy :: F32 ) ) ;
675677 Some ( Intrinsic :: MinNumF32 )
676678 }
679+ "nearbyintf32" => {
680+ assert_sig_matches ! ( sig, RigidTy :: Float ( FloatTy :: F32 ) => RigidTy :: Float ( FloatTy :: F32 ) ) ;
681+ Some ( Intrinsic :: NearbyIntF32 )
682+ }
677683 "powf32" => {
678684 assert_sig_matches ! ( sig, RigidTy :: Float ( FloatTy :: F32 ) , RigidTy :: Float ( FloatTy :: F32 ) => RigidTy :: Float ( FloatTy :: F32 ) ) ;
679685 Some ( Intrinsic :: PowF32 )
@@ -682,13 +688,13 @@ fn try_match_f32(intrinsic_instance: &Instance) -> Option<Intrinsic> {
682688 assert_sig_matches ! ( sig, RigidTy :: Float ( FloatTy :: F32 ) , RigidTy :: Int ( IntTy :: I32 ) => RigidTy :: Float ( FloatTy :: F32 ) ) ;
683689 Some ( Intrinsic :: PowIF32 )
684690 }
685- "roundf32 " => {
691+ "rintf32 " => {
686692 assert_sig_matches ! ( sig, RigidTy :: Float ( FloatTy :: F32 ) => RigidTy :: Float ( FloatTy :: F32 ) ) ;
687- Some ( Intrinsic :: RoundF32 )
693+ Some ( Intrinsic :: RintF32 )
688694 }
689- "round_ties_even_f32 " => {
695+ "roundf32 " => {
690696 assert_sig_matches ! ( sig, RigidTy :: Float ( FloatTy :: F32 ) => RigidTy :: Float ( FloatTy :: F32 ) ) ;
691- Some ( Intrinsic :: RoundTiesEvenF32 )
697+ Some ( Intrinsic :: RoundF32 )
692698 }
693699 "sinf32" => {
694700 assert_sig_matches ! ( sig, RigidTy :: Float ( FloatTy :: F32 ) => RigidTy :: Float ( FloatTy :: F32 ) ) ;
@@ -764,6 +770,10 @@ fn try_match_f64(intrinsic_instance: &Instance) -> Option<Intrinsic> {
764770 assert_sig_matches ! ( sig, RigidTy :: Float ( FloatTy :: F64 ) , RigidTy :: Float ( FloatTy :: F64 ) => RigidTy :: Float ( FloatTy :: F64 ) ) ;
765771 Some ( Intrinsic :: MinNumF64 )
766772 }
773+ "nearbyintf64" => {
774+ assert_sig_matches ! ( sig, RigidTy :: Float ( FloatTy :: F64 ) => RigidTy :: Float ( FloatTy :: F64 ) ) ;
775+ Some ( Intrinsic :: NearbyIntF64 )
776+ }
767777 "powf64" => {
768778 assert_sig_matches ! ( sig, RigidTy :: Float ( FloatTy :: F64 ) , RigidTy :: Float ( FloatTy :: F64 ) => RigidTy :: Float ( FloatTy :: F64 ) ) ;
769779 Some ( Intrinsic :: PowF64 )
@@ -772,13 +782,13 @@ fn try_match_f64(intrinsic_instance: &Instance) -> Option<Intrinsic> {
772782 assert_sig_matches ! ( sig, RigidTy :: Float ( FloatTy :: F64 ) , RigidTy :: Int ( IntTy :: I32 ) => RigidTy :: Float ( FloatTy :: F64 ) ) ;
773783 Some ( Intrinsic :: PowIF64 )
774784 }
775- "roundf64 " => {
785+ "rintf64 " => {
776786 assert_sig_matches ! ( sig, RigidTy :: Float ( FloatTy :: F64 ) => RigidTy :: Float ( FloatTy :: F64 ) ) ;
777- Some ( Intrinsic :: RoundF64 )
787+ Some ( Intrinsic :: RintF64 )
778788 }
779- "round_ties_even_f64 " => {
789+ "roundf64 " => {
780790 assert_sig_matches ! ( sig, RigidTy :: Float ( FloatTy :: F64 ) => RigidTy :: Float ( FloatTy :: F64 ) ) ;
781- Some ( Intrinsic :: RoundTiesEvenF64 )
791+ Some ( Intrinsic :: RoundF64 )
782792 }
783793 "sinf64" => {
784794 assert_sig_matches ! ( sig, RigidTy :: Float ( FloatTy :: F64 ) => RigidTy :: Float ( FloatTy :: F64 ) ) ;
0 commit comments