We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98dd81e commit 9d3e35cCopy full SHA for 9d3e35c
tests/ui/const_prop/apfloat-f64-roundtrip.rs
@@ -0,0 +1,9 @@
1
+// run-pass
2
+// compile-flags: -O -Zmir-opt-level=3 -Cno-prepopulate-passes
3
+// min-llvm-version: 16.0 (requires APFloat fixes in LLVM)
4
+
5
+// Regression test for a broken MIR optimization (issue #113407).
6
+pub fn main() {
7
+ let f = f64::from_bits(0x19873cc2) as f32;
8
+ assert_eq!(f.to_bits(), 0);
9
+}
tests/ui/const_prop/apfloat-remainder-regression.rs
@@ -0,0 +1,15 @@
+// Regression test for a broken MIR optimization (issue #102403).
+pub fn f() -> f64 {
+ std::hint::black_box(-1.0) % std::hint::black_box(-1.0)
+pub fn g() -> f64 {
10
+ -1.0 % -1.0
11
12
13
14
+ assert_eq!(f().signum(), g().signum());
15
0 commit comments