rust/tests/mir-opt/const_prop/cast.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
291 B
Rust
Raw Normal View History

//@ test-mir-pass: GVN
2023-09-20 16:43:33 -05:00
// EMIT_MIR cast.main.GVN.diff
2020-03-11 05:49:00 -05:00
fn main() {
2023-12-02 14:18:47 -06:00
// CHECK-LABEL: fn main(
// CHECK: debug x => [[x:_.*]];
// CHECK: debug y => [[y:_.*]];
// CHECK: [[x]] = const 42_u32;
// CHECK: [[y]] = const 42_u8;
let x = 42u8 as u32;
let y = 42u32 as u8;
}