about summary refs log tree commit diff
path: root/tests/mir-opt/const_prop/checked_add.rs
blob: d450f7d03f38c0eb906e0ca0c320f0818a9ba482 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
//@ test-mir-pass: GVN
//@ compile-flags: -C overflow-checks=on -Zdump-mir-exclude-alloc-bytes

// EMIT_MIR checked_add.main.GVN.diff
fn main() {
    // CHECK-LABEL: fn main(
    // CHECK: debug x => [[x:_.*]];
    // CHECK: assert(!const false,
    // CHECK: [[x]] = const 2_u32;
    let x: u32 = 1 + 1;
}