diff options
| author | Ben Kimock <kimockb@gmail.com> | 2024-09-11 18:04:40 -0400 |
|---|---|---|
| committer | Ben Kimock <kimockb@gmail.com> | 2024-10-07 11:12:58 -0400 |
| commit | 6d246e47fb55e089589681a41db6dedb20ccdaa3 (patch) | |
| tree | c4e1e3d4b9aad8f0a4d89d5d3b13b554ac22a7df /tests/codegen | |
| parent | 7caad6925314911eefe54b040d4bc5be940e8f92 (diff) | |
| download | rust-6d246e47fb55e089589681a41db6dedb20ccdaa3.tar.gz rust-6d246e47fb55e089589681a41db6dedb20ccdaa3.zip | |
Add precondition checks to ptr::offset, ptr::add, ptr::sub
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/option-as-slice.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/codegen/option-as-slice.rs b/tests/codegen/option-as-slice.rs index cfa479aa4b2..0edbbac1176 100644 --- a/tests/codegen/option-as-slice.rs +++ b/tests/codegen/option-as-slice.rs @@ -14,7 +14,9 @@ pub fn u64_opt_as_slice(o: &Option<u64>) -> &[u64] { // CHECK-NOT: br // CHECK-NOT: switch // CHECK-NOT: icmp - // CHECK: %[[LEN:.+]] = load i64,{{.+}} !range ![[META_U64:.+]], !noundef + // CHECK: %[[LEN:.+]] = load i64 + // CHECK-SAME: !range ![[META_U64:[0-9]+]], + // CHECK-SAME: !noundef // CHECK-NOT: select // CHECK-NOT: br // CHECK-NOT: switch @@ -51,7 +53,9 @@ pub fn u8_opt_as_slice(o: &Option<u8>) -> &[u8] { // CHECK-NOT: br // CHECK-NOT: switch // CHECK-NOT: icmp - // CHECK: %[[TAG:.+]] = load i8,{{.+}} !range ![[META_U8:.+]], !noundef + // CHECK: %[[TAG:.+]] = load i8 + // CHECK-SAME: !range ![[META_U8:[0-9]+]], + // CHECK-SAME: !noundef // CHECK: %[[LEN:.+]] = zext{{.*}} i8 %[[TAG]] to i64 // CHECK-NOT: select // CHECK-NOT: br |
