We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
merge-functions=disabled
1 parent 78e11a4 commit ab9313eCopy full SHA for ab9313e
src/test/codegen/issue-86106.rs
@@ -1,14 +1,21 @@
1
// min-llvm-version: 15.0
2
-// compile-flags: -C opt-level=3
+// compile-flags: -C opt-level=3 -Z merge-functions=disabled
3
4
// The below two functions ensure that both `String::new()` and `"".to_string()`
5
// produce the identical code.
6
7
#![crate_type = "lib"]
8
9
-// CHECK-LABEL: @string_new = unnamed_addr alias void (ptr), ptr @empty_to_string
+// CHECK-LABEL: define void @string_new
10
#[no_mangle]
11
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
17
+ // CHECK-NEXT: store i{{32|64}}
18
+ // CHECK-NEXT: ret void
19
String::new()
20
}
21
0 commit comments