Add more codegen tests
This commit is contained in:
parent
af23ad93cd
commit
f1255380ac
26 changed files with 166 additions and 139 deletions
|
@ -51,7 +51,7 @@ pub fn load_scalar_pair<'a>(x: &(&'a i32, &'a Align16)) -> (&'a i32, &'a Align16
|
|||
#[no_mangle]
|
||||
pub fn load_raw_pointer<'a>(x: &*const i32) -> *const i32 {
|
||||
// loaded raw pointer should not have !nonnull or !align metadata
|
||||
// CHECK: load {{i32\*|ptr}}, {{i32\*\*|ptr}} %x, align [[PTR_ALIGNMENT]], !noundef !2{{$}}
|
||||
// CHECK: load {{i32\*|ptr}}, {{i32\*\*|ptr}} %x, align [[PTR_ALIGNMENT]], !noundef ![[NOUNDEF:[0-9]+]]{{$}}
|
||||
*x
|
||||
}
|
||||
|
||||
|
@ -93,7 +93,7 @@ pub fn load_maybeuninit_enum_bool(x: &MaybeUninit<MyBool>) -> MaybeUninit<MyBool
|
|||
// CHECK-LABEL: @load_int
|
||||
#[no_mangle]
|
||||
pub fn load_int(x: &u16) -> u16 {
|
||||
// CHECK: load i16, {{i16\*|ptr}} %x, align 2, !noundef !2{{$}}
|
||||
// CHECK: load i16, {{i16\*|ptr}} %x, align 2, !noundef ![[NOUNDEF]]{{$}}
|
||||
*x
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ pub fn load_nonzero_int(x: &NonZeroU16) -> NonZeroU16 {
|
|||
// CHECK-LABEL: @load_option_nonzero_int
|
||||
#[no_mangle]
|
||||
pub fn load_option_nonzero_int(x: &Option<NonZeroU16>) -> Option<NonZeroU16> {
|
||||
// CHECK: load i16, {{i16\*|ptr}} %x, align 2, !noundef !2{{$}}
|
||||
// CHECK: load i16, {{i16\*|ptr}} %x, align 2, !noundef ![[NOUNDEF]]{{$}}
|
||||
*x
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue