Skip to content

Commit 67a835d

Browse files
committed
fix codegen test
1 parent 1a51ec6 commit 67a835d

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

tests/codegen/issues/issue-103840.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// compile-flags: -O
2+
// min-llvm-version: 16.0
23
#![crate_type = "lib"]
34

45
pub fn foo(t: &mut Vec<usize>) {

tests/codegen/issues/issue-105386-ub-in-debuginfo.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ pub fn outer_function(x: S, y: S) -> usize {
1919
// CHECK-NOT: [[ptr_tmp:%.*]] = getelementptr inbounds %"[closure@{{.*.rs}}:9:23: 9:25]", ptr [[spill]]
2020
// CHECK-NOT: [[load:%.*]] = load ptr, ptr
2121
// CHECK: call void @llvm.lifetime.start{{.*}}({{.*}}, ptr [[spill]])
22-
// CHECK: call void @llvm.memcpy{{.*}}(ptr {{align .*}} [[spill]], ptr {{align .*}} %x
22+
// CHECK: [[inner:%.*]] = getelementptr inbounds %"{{.*}}", ptr [[spill]]
23+
// CHECK: call void @llvm.memcpy{{.*}}(ptr {{align .*}} [[inner]], ptr {{align .*}} %x

tests/codegen/issues/issue-86106.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// min-llvm-version: 15.0
2+
// only-64bit llvm appears to use stores instead of memset on 32bit
23
// compile-flags: -C opt-level=3 -Z merge-functions=disabled
34

45
// The below two functions ensure that both `String::new()` and `"".to_string()`
@@ -19,9 +20,9 @@ pub fn string_new() -> String {
1920
// CHECK-LABEL: define void @empty_to_string
2021
#[no_mangle]
2122
pub fn empty_to_string() -> String {
22-
// CHECK: getelementptr
23+
// CHECK: store ptr inttoptr
24+
// CHECK-NEXT: getelementptr
2325
// CHECK-NEXT: call void @llvm.memset
24-
// CHECK-NEXT: store ptr inttoptr
2526
// CHECK-NEXT: ret void
2627
"".to_string()
2728
}

0 commit comments

Comments
 (0)