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

13 lines
179 B
Rust
Raw Normal View History

2023-09-20 21:43:33 +00:00
// unit-test: 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);
}