mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
12 lines
205 B
Rust
12 lines
205 B
Rust
//@ compile-flags: -O
|
|
//@ min-llvm-version: 18
|
|
#![crate_type = "lib"]
|
|
|
|
// CHECK-LABEL: @div2
|
|
// CHECK: ashr i32 %a, 1
|
|
// CHECK-NEXT: ret i32
|
|
#[no_mangle]
|
|
pub fn div2(a: i32) -> i32 {
|
|
a.div_euclid(2)
|
|
}
|