rust/tests/mir-opt/dataflow-const-prop/large_array_index.rs

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

19 lines
553 B
Rust
Raw Normal View History

//@ test-mir-pass: DataflowConstProp
2023-04-23 11:15:22 -05:00
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
// EMIT_MIR_FOR_EACH_BIT_WIDTH
// EMIT_MIR large_array_index.main.DataflowConstProp.diff
2024-01-12 01:22:33 -06:00
// CHECK-LABEL: fn main(
2023-04-23 11:15:22 -05:00
fn main() {
// check that we don't propagate this, because it's too large
// CHECK: debug x => [[x:_.*]];
// CHECK: [[array_lit:_.*]] = [const 0_u8; 5000];
// CHECK: {{_.*}} = const 5000_usize;
// CHECK: {{_.*}} = const true;
2024-01-20 10:09:14 -06:00
// CHECK: assert(const true
2024-08-18 17:51:53 -05:00
// CHECK: [[x]] = copy [[array_lit]][2 of 3];
2023-04-23 11:15:22 -05:00
let x: u8 = [0_u8; 5000][2];
}