diff options
author | The 8472 <git@infinite-source.de> | 2023-04-05 21:15:32 +0200 |
---|---|---|
committer | The 8472 <git@infinite-source.de> | 2023-04-28 23:08:54 +0200 |
commit | 67a835d755a97770edb320d315d542859b11f854 (patch) | |
tree | e0e1ba3814017bc7a3b40af37dcebe6113de52eb /tests | |
parent | 1a51ec686439b52bd652b32f8f7aaf7817faf5a7 (diff) | |
download | rust-67a835d755a97770edb320d315d542859b11f854.tar.gz |
fix codegen test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/codegen/issues/issue-103840.rs | 1 | ||||
-rw-r--r-- | tests/codegen/issues/issue-105386-ub-in-debuginfo.rs | 3 | ||||
-rw-r--r-- | tests/codegen/issues/issue-86106.rs | 5 |
3 files changed, 6 insertions, 3 deletions
diff --git a/tests/codegen/issues/issue-103840.rs b/tests/codegen/issues/issue-103840.rs index f19d7031bb3..da64692d27d 100644 --- a/tests/codegen/issues/issue-103840.rs +++ b/tests/codegen/issues/issue-103840.rs @@ -1,4 +1,5 @@ // compile-flags: -O +// min-llvm-version: 16.0 #![crate_type = "lib"] pub fn foo(t: &mut Vec<usize>) { diff --git a/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs b/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs index d54ac9e33bc..2ee4d7cca0e 100644 --- a/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs +++ b/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs @@ -19,4 +19,5 @@ pub fn outer_function(x: S, y: S) -> usize { // CHECK-NOT: [[ptr_tmp:%.*]] = getelementptr inbounds %"[closure@{{.*.rs}}:9:23: 9:25]", ptr [[spill]] // CHECK-NOT: [[load:%.*]] = load ptr, ptr // CHECK: call void @llvm.lifetime.start{{.*}}({{.*}}, ptr [[spill]]) -// CHECK: call void @llvm.memcpy{{.*}}(ptr {{align .*}} [[spill]], ptr {{align .*}} %x +// CHECK: [[inner:%.*]] = getelementptr inbounds %"{{.*}}", ptr [[spill]] +// CHECK: call void @llvm.memcpy{{.*}}(ptr {{align .*}} [[inner]], ptr {{align .*}} %x diff --git a/tests/codegen/issues/issue-86106.rs b/tests/codegen/issues/issue-86106.rs index af621d79391..c0be7fab2f3 100644 --- a/tests/codegen/issues/issue-86106.rs +++ b/tests/codegen/issues/issue-86106.rs @@ -1,4 +1,5 @@ // min-llvm-version: 15.0 +// only-64bit llvm appears to use stores instead of memset on 32bit // compile-flags: -C opt-level=3 -Z merge-functions=disabled // The below two functions ensure that both `String::new()` and `"".to_string()` @@ -19,9 +20,9 @@ pub fn string_new() -> String { // CHECK-LABEL: define void @empty_to_string #[no_mangle] pub fn empty_to_string() -> String { - // CHECK: getelementptr + // CHECK: store ptr inttoptr + // CHECK-NEXT: getelementptr // CHECK-NEXT: call void @llvm.memset - // CHECK-NEXT: store ptr inttoptr // CHECK-NEXT: ret void "".to_string() } |