mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-03 13:38:22 +00:00
This reverts commit b57d93d8b9525fa261404b4cd9c0670eeb1264b8, reversing changes made to 0aeaa5eb22180fdf12a8489e63c4daa18da6f236.
19 lines
553 B
Rust
19 lines
553 B
Rust
//@ test-mir-pass: DataflowConstProp
|
|
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
|
// EMIT_MIR_FOR_EACH_BIT_WIDTH
|
|
|
|
// EMIT_MIR large_array_index.main.DataflowConstProp.diff
|
|
|
|
// CHECK-LABEL: fn main(
|
|
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;
|
|
// CHECK: assert(const true
|
|
// CHECK: [[x]] = copy [[array_lit]][2 of 3];
|
|
let x: u8 = [0_u8; 5000][2];
|
|
}
|