mirror of
https://git.proxmox.com/git/rustc
synced 2026-03-27 10:02:00 +00:00
11 lines
180 B
Rust
11 lines
180 B
Rust
//@ compile-flags: -O
|
|
#![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)
|
|
}
|