rust/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs

13 lines
207 B
Rust
Raw Normal View History

//@ unit-test: DataflowConstProp
2023-04-15 17:00:43 +00:00
// EMIT_MIR mult_by_zero.test.DataflowConstProp.diff
2024-01-11 23:22:33 -08:00
// CHECK-LABEL: fn test(
2023-04-15 17:00:43 +00:00
fn test(x : i32) -> i32 {
x * 0
// CHECK: _0 = const 0_i32;
2023-04-15 17:00:43 +00:00
}
fn main() {
test(10);
}