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 21:43:33 +00:00
// EMIT_MIR cast.main.GVN.diff
2020-03-11 10:49:00 +00:00
fn main() {
2023-12-02 20:18:47 +00: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;
}