Skip to content

Commit

Permalink
Rollup merge of #94496 - durin42:llvm-15-moar-intrinsic, r=nikic
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
matthiaskrgr authored Mar 2, 2022
2 parents 823a386 + 6fbef7f commit aabd068
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/codegen/dst-vtable-align-nonzero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pub fn eliminates_runtime_check_when_align_1(
x: &Struct<WrapperWithAlign1<dyn Trait>>
) -> &WrapperWithAlign1<dyn Trait> {
// CHECK: load [[USIZE:i[0-9]+]], {{.+}} !range [[RANGE_META:![0-9]+]]
// CHECK-NOT: llvm.umax
// CHECK-NOT: icmp
// CHECK-NOT: select
// CHECK: ret
Expand All @@ -36,8 +37,7 @@ pub fn does_not_eliminate_runtime_check_when_align_2(
x: &Struct<WrapperWithAlign2<dyn Trait>>
) -> &WrapperWithAlign2<dyn Trait> {
// CHECK: [[X0:%[0-9]+]] = load [[USIZE]], {{.+}} !range [[RANGE_META]]
// CHECK: [[X1:%[0-9]+]] = icmp {{.+}} [[X0]]
// CHECK: [[X2:%[0-9]+]] = select {{.+}} [[X1]]
// CHECK: {{icmp|llvm.umax}}
// CHECK: ret
&x.dst
}
Expand Down

0 comments on commit aabd068

Please sign in to comment.