File tree 4 files changed +18
-2
lines changed
4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 2
2
members = [" fuzz" ]
3
3
4
4
[workspace .package ]
5
- version = " 0.2.0+llvm-6109e70c72fc "
5
+ version = " 0.2.0+llvm-83ba349ae0a8 "
6
6
edition = " 2021"
7
7
license = " Apache-2.0 WITH LLVM-exception"
8
8
Original file line number Diff line number Diff line change @@ -1825,6 +1825,15 @@ impl<S: Semantics> Float for IeeeFloat<S> {
1825
1825
self . read_only_category_do_not_mutate
1826
1826
}
1827
1827
1828
+ fn make_quiet ( mut self ) -> Self {
1829
+ if self . is_nan ( ) {
1830
+ self . sig [ 0 ] |= S :: QNAN_SIGNIFICAND ;
1831
+ self
1832
+ } else {
1833
+ self
1834
+ }
1835
+ }
1836
+
1828
1837
fn get_exact_inverse ( self ) -> Option < Self > {
1829
1838
// Special floats and denormals have no exact inverse.
1830
1839
if !self . is_finite_non_zero ( ) {
Original file line number Diff line number Diff line change 1
1
//! Port of LLVM's APFloat software floating-point implementation from the
2
2
//! following C++ sources (please update commit hash when backporting):
3
- //! https://github.com/llvm/llvm-project/commit/6109e70c72fc5171d25c4467fc3cfe6eb2029f50
3
+ //! https://github.com/llvm/llvm-project/commit/83ba349ae0a853e0c2cd8e8aadc88993e9fb9a19
4
4
//! * `llvm/include/llvm/ADT/APFloat.h` -> `Float` and `FloatConvert` traits
5
5
//! * `llvm/lib/Support/APFloat.cpp` -> `ieee` and `ppc` modules
6
6
//! * `llvm/unittests/ADT/APFloatTest.cpp` -> `tests` directory
@@ -570,6 +570,9 @@ pub trait Float:
570
570
self . round_to_integral ( Round :: TowardZero ) . value . bitwise_eq ( self )
571
571
}
572
572
573
+ /// If the value is a signaling NaN, makes it quiet
574
+ fn make_quiet ( self ) -> Self ;
575
+
573
576
/// If this value has an exact multiplicative inverse, return it.
574
577
fn get_exact_inverse ( self ) -> Option < Self > ;
575
578
Original file line number Diff line number Diff line change @@ -420,6 +420,10 @@ where
420
420
self . 0 . is_integer ( ) && self . 1 . is_integer ( )
421
421
}
422
422
423
+ fn make_quiet ( self ) -> Self {
424
+ Self ( self . 0 . make_quiet ( ) , self . 1 )
425
+ }
426
+
423
427
fn get_exact_inverse ( self ) -> Option < Self > {
424
428
Fallback :: from ( self ) . get_exact_inverse ( ) . map ( Self :: from)
425
429
}
You can’t perform that action at this time.
0 commit comments