rust/tests/mir-opt/inline/inline_any_operand.rs

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

20 lines
317 B
Rust
Raw Normal View History

// skip-filecheck
// compile-flags: -Z span_free_formats
// Tests that MIR inliner works for any operand
fn main() {
println!("{}", bar());
}
2020-07-27 14:22:43 -05:00
// EMIT_MIR inline_any_operand.bar.Inline.after.mir
fn bar() -> bool {
let f = foo;
f(1, -1)
}
2019-01-24 13:05:19 -06:00
#[inline(always)]
fn foo(x: i32, y: i32) -> bool {
x == y
}