Skip to content

Commit ab9313e

Browse files
committed
Apply merge-functions=disabled
Signed-off-by: Yuki Okushi <[email protected]>
1 parent 78e11a4 commit ab9313e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/test/codegen/issue-86106.rs

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
// min-llvm-version: 15.0
2-
// compile-flags: -C opt-level=3
2+
// compile-flags: -C opt-level=3 -Z merge-functions=disabled
33

44
// The below two functions ensure that both `String::new()` and `"".to_string()`
55
// produce the identical code.
66

77
#![crate_type = "lib"]
88

9-
// CHECK-LABEL: @string_new = unnamed_addr alias void (ptr), ptr @empty_to_string
9+
// CHECK-LABEL: define void @string_new
1010
#[no_mangle]
1111
pub fn string_new() -> String {
12+
// CHECK-NOT: load i8
13+
// CHECK: store i{{32|64}}
14+
// CHECK-NEXT: getelementptr
15+
// CHECK-NEXT: store ptr
16+
// CHECK-NEXT: getelementptr
17+
// CHECK-NEXT: store i{{32|64}}
18+
// CHECK-NEXT: ret void
1219
String::new()
1320
}
1421

0 commit comments

Comments
 (0)