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

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

13 lines
184 B
Rust
Raw Normal View History

//@ test-mir-pass: GVN
2023-09-21 05:43:33 +08:00
// EMIT_MIR mult_by_zero.test.GVN.diff
2023-12-03 04:39:26 +08:00
fn test(x: i32) -> i32 {
// CHECK: fn test(
2023-03-21 05:37:36 +08:00
// CHECK: _0 = const 0_i32;
2023-12-03 04:39:26 +08:00
x * 0
}
fn main() {
test(10);
}