about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-03-02 04:30:10 +0100
committerGitHub <noreply@github.com>2022-03-02 04:30:10 +0100
commitaabd068f18d4fc68672b30ea1eefee82d2cf6d4e (patch)
tree4596e273e56b450614cfac34c10223994fceda77 /src
parent823a38677e6988a595e04533436b6754fd32ae68 (diff)
parent6fbef7f12cd0a6caeb65ae002334ddd7565e11a0 (diff)
downloadrust-aabd068f18d4fc68672b30ea1eefee82d2cf6d4e.tar.gz
rust-aabd068f18d4fc68672b30ea1eefee82d2cf6d4e.zip
Rollup merge of #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
https://github.com/llvm/llvm-project/commit/a266af721153fab6452094207b09ed265ab0be7b)
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.
Diffstat (limited to 'src')
-rw-r--r--src/test/codegen/dst-vtable-align-nonzero.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/codegen/dst-vtable-align-nonzero.rs b/src/test/codegen/dst-vtable-align-nonzero.rs
index 021c7b19f89..14c4c3f30f9 100644
--- a/src/test/codegen/dst-vtable-align-nonzero.rs
+++ b/src/test/codegen/dst-vtable-align-nonzero.rs
@@ -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
@@ -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
 }