diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2022-12-22 20:45:36 +0900 |
|---|---|---|
| committer | Yuki Okushi <jtitor@2k36.org> | 2023-01-07 18:58:07 +0900 |
| commit | 78e11a45564e1e8a67f0078fe89659032aed41a6 (patch) | |
| tree | 74564849d41607cad98130670b02e76032853382 /src/test/codegen | |
| parent | 75f1dfcc3236029bbd33799b94742424711e0376 (diff) | |
| download | rust-78e11a45564e1e8a67f0078fe89659032aed41a6.tar.gz rust-78e11a45564e1e8a67f0078fe89659032aed41a6.zip | |
Apply review suggestions
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
Diffstat (limited to 'src/test/codegen')
| -rw-r--r-- | src/test/codegen/issue-86106.rs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/test/codegen/issue-86106.rs b/src/test/codegen/issue-86106.rs index e81cab9f1df..e647dbe2514 100644 --- a/src/test/codegen/issue-86106.rs +++ b/src/test/codegen/issue-86106.rs @@ -1,5 +1,5 @@ // min-llvm-version: 15.0 -// compile-flags: -C opt-level=3 -C target-cpu=native +// compile-flags: -C opt-level=3 // The below two functions ensure that both `String::new()` and `"".to_string()` // produce the identical code. @@ -7,21 +7,20 @@ #![crate_type = "lib"] // CHECK-LABEL: @string_new = unnamed_addr alias void (ptr), ptr @empty_to_string -// CHECK: define void @empty_to_string #[no_mangle] pub fn string_new() -> String { String::new() } +// CHECK-LABEL: define void @empty_to_string #[no_mangle] pub fn empty_to_string() -> String { // CHECK-NOT: load i8 - // CHECK: store i64 + // CHECK: store i{{32|64}} // CHECK-NEXT: getelementptr // CHECK-NEXT: store ptr // CHECK-NEXT: getelementptr - // CHECK-NOT: store i8 - // CHECK-NEXT: store i64 + // CHECK-NEXT: store i{{32|64}} // CHECK-NEXT: ret void "".to_string() } @@ -32,12 +31,12 @@ pub fn empty_to_string() -> String { // CHECK-LABEL: @empty_vec #[no_mangle] pub fn empty_vec() -> Vec<u8> { - // CHECK: store i64 + // CHECK: store i{{32|64}} // CHECK-NOT: load i8 // CHECK-NEXT: getelementptr // CHECK-NEXT: store ptr // CHECK-NEXT: getelementptr - // CHECK-NEXT: store i64 + // CHECK-NEXT: store i{{32|64}} // CHECK-NEXT: ret void vec![] } @@ -45,12 +44,12 @@ pub fn empty_vec() -> Vec<u8> { // CHECK-LABEL: @empty_vec_clone #[no_mangle] pub fn empty_vec_clone() -> Vec<u8> { - // CHECK: store i64 + // CHECK: store i{{32|64}} // CHECK-NOT: load i8 // CHECK-NEXT: getelementptr // CHECK-NEXT: store ptr // CHECK-NEXT: getelementptr - // CHECK-NEXT: store i64 + // CHECK-NEXT: store i{{32|64}} // CHECK-NEXT: ret void vec![].clone() } |
