]> git.lizzy.rs Git - rust.git/blob - tests/ui/mir/mir_temp_promotions.rs
Rollup merge of #103236 - tspiteri:redoc-int-adc-sbb, r=m-ou-se
[rust.git] / tests / ui / mir / mir_temp_promotions.rs
1 // run-pass
2 fn test1(f: f32) -> bool {
3     // test that we properly promote temporaries to allocas when a temporary is assigned to
4     // multiple times (assignment is still happening once ∀ possible dataflows).
5     !(f.is_nan() || f.is_infinite())
6 }
7
8 fn main() {
9     assert_eq!(test1(0.0), true);
10 }