Skip to content

Commit 45b1d74

Browse files
TKanXscottmcm
andcommitted
test(codegen): Fix dst-vtable-align-nonzero patterns for aarch64
Co-authored-by: Scott McMurray <scottmcm@users.noreply.github.com>
1 parent 3e6f372 commit 45b1d74

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

tests/codegen-llvm/dst-vtable-align-nonzero.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ pub struct Struct<W: ?Sized> {
3030
pub fn eliminates_runtime_check_when_align_1(
3131
x: &Struct<WrapperWithAlign1<dyn Trait>>,
3232
) -> &WrapperWithAlign1<dyn Trait> {
33-
// CHECK: load [[USIZE:i[0-9]+]], {{.+}} !range [[RANGE_META:![0-9]+]]
33+
// CHECK: load [[USIZE:i[0-9]+]]
3434
// CHECK-NOT: llvm.umax
35-
// CHECK-NOT: icmp
3635
// CHECK-NOT: select
3736
// CHECK: ret
3837
&x.dst
@@ -43,7 +42,7 @@ pub fn eliminates_runtime_check_when_align_1(
4342
pub fn does_not_eliminate_runtime_check_when_align_2(
4443
x: &Struct<WrapperWithAlign2<dyn Trait>>,
4544
) -> &WrapperWithAlign2<dyn Trait> {
46-
// CHECK: [[X0:%[0-9]+]] = load [[USIZE]], {{.+}} !range [[RANGE_META]]
45+
// CHECK: load [[USIZE]]
4746
// CHECK: {{icmp|llvm.umax}}
4847
// CHECK: ret
4948
&x.dst
@@ -52,7 +51,7 @@ pub fn does_not_eliminate_runtime_check_when_align_2(
5251
// CHECK-LABEL: @align_load_from_align_of_val
5352
#[no_mangle]
5453
pub fn align_load_from_align_of_val(x: &dyn Trait) -> usize {
55-
// CHECK: {{%[0-9]+}} = load [[USIZE]], {{.+}} !range [[RANGE_META]]
54+
// CHECK: {{%[0-9]+}} = load [[USIZE]], {{.+}} !range [[RANGE_META:![0-9]+]]
5655
core::mem::align_of_val(x)
5756
}
5857

0 commit comments

Comments
 (0)