make check lines for int/ptr common prim test more permissive
It seems that LLVM 17 doesn't fully optimize out unwrap_unchecked. We can just loosen the check lines to account for this, since we don't really care about the exact instructions, we just want to make sure that inttoptr/ptrtoint aren't used for Box.
This commit is contained in:
parent
8e40b17b6b
commit
5ccada66a2
1 changed files with 5 additions and 5 deletions
|
|
@ -28,16 +28,16 @@ pub fn insert_box(x: Box<()>) -> Result<usize, Box<()>> {
|
|||
// CHECK-LABEL: @extract_int
|
||||
#[no_mangle]
|
||||
pub unsafe fn extract_int(x: Result<usize, Box<()>>) -> usize {
|
||||
// CHECK: start:
|
||||
// CHECK-NEXT: ptrtoint
|
||||
// CHECK-NEXT: ret
|
||||
// CHECK: ptrtoint
|
||||
x.unwrap_unchecked()
|
||||
}
|
||||
|
||||
// CHECK-LABEL: @extract_box
|
||||
#[no_mangle]
|
||||
pub unsafe fn extract_box(x: Result<usize, Box<()>>) -> Box<()> {
|
||||
// CHECK: start:
|
||||
// CHECK-NEXT: ret ptr
|
||||
// CHECK-NOT: ptrtoint
|
||||
// CHECK-NOT: inttoptr
|
||||
// CHECK-NOT: load
|
||||
// CHECK-NOT: store
|
||||
x.unwrap_err_unchecked()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue