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

12 lines
272 B
Rust
Raw Normal View History

//@ test-mir-pass: GVN
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// EMIT_MIR_FOR_EACH_BIT_WIDTH
2023-05-01 06:18:41 -05:00
2023-09-20 16:43:33 -05:00
// EMIT_MIR repeat.main.GVN.diff
2019-09-14 08:22:07 -05:00
fn main() {
2023-12-02 15:01:48 -06:00
// CHECK-LABEL: fn main(
// CHECK: debug x => [[x:_.*]];
// CHECK: [[x]] = const 42_u32;
2019-09-14 08:22:07 -05:00
let x: u32 = [42; 8][2] + 0;
}