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 Permalink Normal View History

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