()
| 237 | #[test] |
| 238 | fn regalloc_mixed_float_and_int() { |
| 239 | // Floats stay slot-based while their integer neighbors are allocated; the |
| 240 | // GP/FP boundary (casts, compares) must agree between modes. |
| 241 | assert_equivalent( |
| 242 | r#" |
| 243 | main: () -> i32 { |
| 244 | acc: f64 = 0.0 |
| 245 | half: f64 = 0.5 |
| 246 | lo: f64 = 2474.0 |
| 247 | hi: f64 = 2476.0 |
| 248 | i: i64 = 0 |
| 249 | while i < 100 { |
| 250 | acc = acc + (i as f64) * half |
| 251 | i = i + 1 |
| 252 | } |
| 253 | if acc > lo { |
| 254 | if acc < hi { |
| 255 | return 42 |
| 256 | } |
| 257 | } |
| 258 | return 1 |
| 259 | } |
| 260 | "#, |
| 261 | ); |
| 262 | } |
| 263 | |
| 264 | #[test] |
| 265 | fn regalloc_narrow_width_wrapping() { |
| 266 | // Narrow integer results are width-normalized in registers exactly like a |
nothing calls this directly
no test coverage detected