diff --git a/tests/codegen/issues/issue-103840.rs b/tests/codegen/issues/issue-103840.rs index f19d7031bb386..da64692d27d92 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) { diff --git a/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs b/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs index d54ac9e33bce2..2ee4d7cca0e3c 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 af621d79391c5..c0be7fab2f3e0 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() }