Skip to content
/ rustc Public
forked from rust-lang/rust

Commit

Permalink
add codegen test for issue-118392, 71096
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Jun 9, 2024
1 parent 36e1414 commit f3c89f1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/codegen/issues/issue-118392.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//@ 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)
}

0 comments on commit f3c89f1

Please sign in to comment.