rust/tests/mir-opt/const_prop/mult_by_zero.rs
2023-12-24 20:08:57 +00:00

14 lines
234 B
Rust

// unit-test: GVN
// EMIT_MIR mult_by_zero.test.GVN.diff
fn test(x: i32) -> i32 {
// CHECK: fn test(
// FIXME(cjgillot) simplify algebraic identity
// CHECK-NOT: _0 = const 0_i32;
x * 0
}
fn main() {
test(10);
}