Skip to content

Commit aabd068

Browse files
authored
Rollup merge of rust-lang#94496 - durin42:llvm-15-moar-intrinsic, r=nikic
tests: accept llvm intrinsic in align-checking test This changed in upstream change https://reviews.llvm.org/D98152 (aka llvm/llvm-project@a266af7) wherein LLVM got smarter about using intrinsics. As best I can tell the change I've made here preserves the intent of the test on LLVM 14 and before while also passing on LLVM 15 and later.
2 parents 823a386 + 6fbef7f commit aabd068

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/codegen/dst-vtable-align-nonzero.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ pub fn eliminates_runtime_check_when_align_1(
2424
x: &Struct<WrapperWithAlign1<dyn Trait>>
2525
) -> &WrapperWithAlign1<dyn Trait> {
2626
// CHECK: load [[USIZE:i[0-9]+]], {{.+}} !range [[RANGE_META:![0-9]+]]
27+
// CHECK-NOT: llvm.umax
2728
// CHECK-NOT: icmp
2829
// CHECK-NOT: select
2930
// CHECK: ret
@@ -36,8 +37,7 @@ pub fn does_not_eliminate_runtime_check_when_align_2(
3637
x: &Struct<WrapperWithAlign2<dyn Trait>>
3738
) -> &WrapperWithAlign2<dyn Trait> {
3839
// CHECK: [[X0:%[0-9]+]] = load [[USIZE]], {{.+}} !range [[RANGE_META]]
39-
// CHECK: [[X1:%[0-9]+]] = icmp {{.+}} [[X0]]
40-
// CHECK: [[X2:%[0-9]+]] = select {{.+}} [[X1]]
40+
// CHECK: {{icmp|llvm.umax}}
4141
// CHECK: ret
4242
&x.dst
4343
}

0 commit comments

Comments
 (0)