2024-04-20 06:19:34 -05:00
|
|
|
//@ test-mir-pass: DataflowConstProp
|
2022-10-24 19:27:27 -05:00
|
|
|
|
|
|
|
// EMIT_MIR self_assign_add.main.DataflowConstProp.diff
|
2024-01-08 22:20:27 -06:00
|
|
|
|
2024-01-12 01:22:33 -06:00
|
|
|
// CHECK-LABEL: fn main(
|
2022-10-24 19:27:27 -05:00
|
|
|
fn main() {
|
2024-01-08 22:20:27 -06:00
|
|
|
// CHECK: debug a => [[a:_.*]];
|
2022-10-24 19:27:27 -05:00
|
|
|
let mut a = 0;
|
2024-01-08 22:20:27 -06:00
|
|
|
|
|
|
|
// CHECK: [[a]] = const 1_i32;
|
2022-10-24 19:27:27 -05:00
|
|
|
a += 1;
|
2024-01-08 22:20:27 -06:00
|
|
|
|
|
|
|
// CHECK: [[a]] = const 2_i32;
|
2022-10-24 19:27:27 -05:00
|
|
|
a += 1;
|
|
|
|
}
|