Skip to content

Commit a60e707

Browse files
committed
Always name the return place.
1 parent 6c64870 commit a60e707

23 files changed

+181
-187
lines changed

Diff for: compiler/rustc_codegen_ssa/src/mir/debuginfo.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
327327

328328
let local_ref = &self.locals[local];
329329

330-
// FIXME Should the return place be named?
331-
let name = if bx.sess().fewer_names() || local == mir::RETURN_PLACE {
330+
let name = if bx.sess().fewer_names() {
332331
None
333332
} else {
334333
Some(match whole_local_var.or(fallback_var.clone()) {

Diff for: tests/codegen/avr/avr-func-addrspace.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pub enum Either<T, U> { A(T), B(U) }
116116
// with the `ptr` field representing both `&i32` and `fn()` depending on the variant.
117117
// This is incorrect, because `fn()` should be `ptr addrspace(1)`, not `ptr`.
118118

119-
// CHECK: define{{.+}}void @should_not_combine_addrspace({{.+\*|ptr}}{{.+}}sret{{.+}}%0, {{.+\*|ptr}}{{.+}}%x)
119+
// CHECK: define{{.+}}void @should_not_combine_addrspace({{.+\*|ptr}}{{.+}}sret{{.+}}%_0, {{.+\*|ptr}}{{.+}}%x)
120120
#[no_mangle]
121121
#[inline(never)]
122122
pub fn should_not_combine_addrspace(x: Either<&i32, fn()>) -> Either<&i32, fn()> {

Diff for: tests/codegen/consts.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,14 @@ pub fn inline_enum_const() -> E<i8, i16> {
4242
#[no_mangle]
4343
pub fn low_align_const() -> E<i16, [i16; 3]> {
4444
// Check that low_align_const and high_align_const use the same constant
45-
// CHECK: memcpy.{{.+}}({{i8\*|ptr}} align 2 %{{[0-9]+}}, {{i8\*|ptr}} align 2 {{.*}}[[LOW_HIGH]]{{.*}}, i{{(32|64)}} 8, i1 false)
45+
// CHECK: memcpy.{{.+}}({{i8\*|ptr}} align 2 %0, {{i8\*|ptr}} align 2 {{.*}}[[LOW_HIGH]]{{.*}}, i{{(32|64)}} 8, i1 false)
4646
*&E::A(0)
4747
}
4848

4949
// CHECK-LABEL: @high_align_const
5050
#[no_mangle]
5151
pub fn high_align_const() -> E<i16, i32> {
5252
// Check that low_align_const and high_align_const use the same constant
53-
// CHECK: memcpy.{{.+}}({{i8\*|ptr}} align 4 %{{[0-9]+}}, {{i8\*|ptr}} align 4 {{.*}}[[LOW_HIGH]]{{.*}}, i{{(32|64)}} 8, i1 false)
53+
// CHECK: memcpy.{{.+}}({{i8\*|ptr}} align 4 %0, {{i8\*|ptr}} align 4 {{.*}}[[LOW_HIGH]]{{.*}}, i{{(32|64)}} 8, i1 false)
5454
*&E::A(0)
5555
}

Diff for: tests/codegen/enum-match.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub enum Enum0 {
1515
// CHECK-NEXT: start:
1616
// CHECK-NEXT: %1 = icmp eq i8 %0, 2
1717
// CHECK-NEXT: %2 = and i8 %0, 1
18-
// CHECK-NEXT: %.0 = select i1 %1, i8 13, i8 %2
18+
// CHECK-NEXT: %_0.0 = select i1 %1, i8 13, i8 %2
1919
#[no_mangle]
2020
pub fn match0(e: Enum0) -> u8 {
2121
use Enum0::*;

Diff for: tests/codegen/fewer-names.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ pub fn sum(x: u32, y: u32) -> u32 {
1313

1414
// NO-LABEL: define{{.*}}i32 @sum(i32 noundef %x, i32 noundef %y)
1515
// NO-NEXT: start:
16-
// NO-NEXT: %0 = add i32 %y, %x
17-
// NO-NEXT: ret i32 %0
16+
// NO-NEXT: %z = add i32 %y, %x
17+
// NO-NEXT: ret i32 %z
1818
let z = x + y;
1919
z
2020
}

Diff for: tests/codegen/function-arguments-noopt.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub fn borrow_call(x: &i32, f: fn(&i32) -> &i32) -> &i32 {
4242
f(x)
4343
}
4444

45-
// CHECK: void @struct_({{%S\*|ptr}} sret(%S){{( %0)?}}, {{%S\*|ptr}} %x)
45+
// CHECK: void @struct_({{%S\*|ptr}} sret(%S){{( %_0)?}}, {{%S\*|ptr}} %x)
4646
#[no_mangle]
4747
pub fn struct_(x: S) -> S {
4848
x
@@ -51,7 +51,7 @@ pub fn struct_(x: S) -> S {
5151
// CHECK-LABEL: @struct_call
5252
#[no_mangle]
5353
pub fn struct_call(x: S, f: fn(S) -> S) -> S {
54-
// CHECK: call void %f({{%S\*|ptr}} sret(%S){{( %0)?}}, {{%S\*|ptr}} %{{.+}})
54+
// CHECK: call void %f({{%S\*|ptr}} sret(%S){{( %_0)?}}, {{%S\*|ptr}} %{{.+}})
5555
f(x)
5656
}
5757

Diff for: tests/codegen/function-arguments.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ pub fn notunpin_box(x: Box<NotUnpin>) -> Box<NotUnpin> {
188188
x
189189
}
190190

191-
// CHECK: @struct_return({{%S\*|ptr}} noalias nocapture noundef sret(%S) dereferenceable(32){{( %0)?}})
191+
// CHECK: @struct_return({{%S\*|ptr}} noalias nocapture noundef sret(%S) dereferenceable(32){{( %_0)?}})
192192
#[no_mangle]
193193
pub fn struct_return() -> S {
194194
S {

Diff for: tests/codegen/intrinsics/transmute-niched.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,16 @@ pub unsafe fn check_bool_from_ordering(x: std::cmp::Ordering) -> bool {
169169
// CHECK-LABEL: @check_bool_to_ordering(
170170
#[no_mangle]
171171
pub unsafe fn check_bool_to_ordering(x: bool) -> std::cmp::Ordering {
172-
// CHECK: %0 = zext i1 %x to i8
173-
// OPT: %1 = icmp ule i8 %0, 1
174-
// OPT: call void @llvm.assume(i1 %1)
175-
// OPT: %2 = icmp uge i8 %0, -1
176-
// OPT: %3 = icmp ule i8 %0, 1
177-
// OPT: %4 = or i1 %2, %3
178-
// OPT: call void @llvm.assume(i1 %4)
172+
// CHECK: %_0 = zext i1 %x to i8
173+
// OPT: %0 = icmp ule i8 %_0, 1
174+
// OPT: call void @llvm.assume(i1 %0)
175+
// OPT: %1 = icmp uge i8 %_0, -1
176+
// OPT: %2 = icmp ule i8 %_0, 1
177+
// OPT: %3 = or i1 %1, %2
178+
// OPT: call void @llvm.assume(i1 %3)
179179
// DBG-NOT: icmp
180180
// DBG-NOT: assume
181-
// CHECK: ret i8 %0
181+
// CHECK: ret i8 %_0
182182

183183
transmute(x)
184184
}

Diff for: tests/codegen/intrinsics/transmute-x64.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,25 @@ use std::mem::transmute;
1111
#[no_mangle]
1212
pub unsafe fn check_sse_float_to_int(x: __m128) -> __m128i {
1313
// CHECK-NOT: alloca
14-
// CHECK: %1 = load <4 x float>, ptr %x, align 16
15-
// CHECK: store <4 x float> %1, ptr %0, align 16
14+
// CHECK: %0 = load <4 x float>, ptr %x, align 16
15+
// CHECK: store <4 x float> %0, ptr %_0, align 16
1616
transmute(x)
1717
}
1818

1919
// CHECK-LABEL: @check_sse_pair_to_avx(
2020
#[no_mangle]
2121
pub unsafe fn check_sse_pair_to_avx(x: (__m128i, __m128i)) -> __m256i {
2222
// CHECK-NOT: alloca
23-
// CHECK: %1 = load <4 x i64>, ptr %x, align 16
24-
// CHECK: store <4 x i64> %1, ptr %0, align 32
23+
// CHECK: %0 = load <4 x i64>, ptr %x, align 16
24+
// CHECK: store <4 x i64> %0, ptr %_0, align 32
2525
transmute(x)
2626
}
2727

2828
// CHECK-LABEL: @check_sse_pair_from_avx(
2929
#[no_mangle]
3030
pub unsafe fn check_sse_pair_from_avx(x: __m256i) -> (__m128i, __m128i) {
3131
// CHECK-NOT: alloca
32-
// CHECK: %1 = load <4 x i64>, ptr %x, align 32
33-
// CHECK: store <4 x i64> %1, ptr %0, align 16
32+
// CHECK: %0 = load <4 x i64>, ptr %x, align 32
33+
// CHECK: store <4 x i64> %0, ptr %_0, align 16
3434
transmute(x)
3535
}

Diff for: tests/codegen/intrinsics/transmute.rs

+39-43
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
#![feature(inline_const)]
99
#![allow(unreachable_code)]
1010

11-
use std::mem::MaybeUninit;
1211
use std::intrinsics::{transmute, transmute_unchecked};
12+
use std::mem::MaybeUninit;
1313

1414
// Some of these need custom MIR to not get removed by MIR optimizations.
1515
use std::intrinsics::mir::*;
@@ -61,7 +61,7 @@ pub unsafe fn check_bigger_array(x: [u32; 3]) -> [u32; 7] {
6161
#[custom_mir(dialect = "runtime", phase = "optimized")]
6262
pub unsafe fn check_to_uninhabited(x: u16) -> BigNever {
6363
// CHECK: call void @llvm.trap
64-
mir!{
64+
mir! {
6565
{
6666
RET = CastTransmute(x);
6767
Return()
@@ -74,7 +74,7 @@ pub unsafe fn check_to_uninhabited(x: u16) -> BigNever {
7474
#[custom_mir(dialect = "runtime", phase = "optimized")]
7575
pub unsafe fn check_from_uninhabited(x: BigNever) -> u16 {
7676
// CHECK: ret i16 poison
77-
mir!{
77+
mir! {
7878
{
7979
RET = CastTransmute(x);
8080
Return()
@@ -89,9 +89,7 @@ pub unsafe fn check_intermediate_passthrough(x: u32) -> i32 {
8989
// CHECK: %[[TMP:.+]] = add i32 1, %x
9090
// CHECK: %[[RET:.+]] = add i32 %[[TMP]], 1
9191
// CHECK: ret i32 %[[RET]]
92-
unsafe {
93-
transmute::<u32, i32>(1 + x) + 1
94-
}
92+
unsafe { transmute::<u32, i32>(1 + x) + 1 }
9593
}
9694

9795
// CHECK-LABEL: @check_nop_pair(
@@ -101,9 +99,7 @@ pub unsafe fn check_nop_pair(x: (u8, i8)) -> (i8, u8) {
10199
// CHECK: %0 = insertvalue { i8, i8 } poison, i8 %x.0, 0
102100
// CHECK: %1 = insertvalue { i8, i8 } %0, i8 %x.1, 1
103101
// CHECK: ret { i8, i8 } %1
104-
unsafe {
105-
transmute(x)
106-
}
102+
unsafe { transmute(x) }
107103
}
108104

109105
// CHECK-LABEL: @check_to_newtype(
@@ -135,9 +131,9 @@ pub unsafe fn check_aggregate_to_bool(x: Aggregate8) -> bool {
135131
// CHECK-LABEL: @check_aggregate_from_bool(
136132
#[no_mangle]
137133
pub unsafe fn check_aggregate_from_bool(x: bool) -> Aggregate8 {
138-
// CHECK: %0 = alloca %Aggregate8, align 1
134+
// CHECK: %_0 = alloca %Aggregate8, align 1
139135
// CHECK: %[[BYTE:.+]] = zext i1 %x to i8
140-
// CHECK: store i8 %[[BYTE]], ptr %0, align 1
136+
// CHECK: store i8 %[[BYTE]], ptr %_0, align 1
141137
transmute(x)
142138
}
143139

@@ -162,8 +158,8 @@ pub unsafe fn check_byte_from_bool(x: bool) -> u8 {
162158
// CHECK-LABEL: @check_to_pair(
163159
#[no_mangle]
164160
pub unsafe fn check_to_pair(x: u64) -> Option<i32> {
165-
// CHECK: %0 = alloca { i32, i32 }, align 4
166-
// CHECK: store i64 %x, ptr %0, align 4
161+
// CHECK: %_0 = alloca { i32, i32 }, align 4
162+
// CHECK: store i64 %x, ptr %_0, align 4
167163
transmute(x)
168164
}
169165

@@ -174,37 +170,37 @@ pub unsafe fn check_from_pair(x: Option<i32>) -> u64 {
174170
// immediates so we can write using the destination alloca's alignment.
175171
const { assert!(std::mem::align_of::<Option<i32>>() == 4) };
176172

177-
// CHECK: %0 = alloca i64, align 8
178-
// CHECK: store i32 %x.0, ptr %1, align 8
179-
// CHECK: store i32 %x.1, ptr %2, align 4
180-
// CHECK: %3 = load i64, ptr %0, align 8
181-
// CHECK: ret i64 %3
173+
// CHECK: %_0 = alloca i64, align 8
174+
// CHECK: store i32 %x.0, ptr %0, align 8
175+
// CHECK: store i32 %x.1, ptr %1, align 4
176+
// CHECK: %2 = load i64, ptr %_0, align 8
177+
// CHECK: ret i64 %2
182178
transmute(x)
183179
}
184180

185181
// CHECK-LABEL: @check_to_float(
186182
#[no_mangle]
187183
pub unsafe fn check_to_float(x: u32) -> f32 {
188184
// CHECK-NOT: alloca
189-
// CHECK: %0 = bitcast i32 %x to float
190-
// CHECK: ret float %0
185+
// CHECK: %_0 = bitcast i32 %x to float
186+
// CHECK: ret float %_0
191187
transmute(x)
192188
}
193189

194190
// CHECK-LABEL: @check_from_float(
195191
#[no_mangle]
196192
pub unsafe fn check_from_float(x: f32) -> u32 {
197193
// CHECK-NOT: alloca
198-
// CHECK: %0 = bitcast float %x to i32
199-
// CHECK: ret i32 %0
194+
// CHECK: %_0 = bitcast float %x to i32
195+
// CHECK: ret i32 %_0
200196
transmute(x)
201197
}
202198

203199
// CHECK-LABEL: @check_to_bytes(
204200
#[no_mangle]
205201
pub unsafe fn check_to_bytes(x: u32) -> [u8; 4] {
206-
// CHECK: %0 = alloca [4 x i8], align 1
207-
// CHECK: store i32 %x, ptr %0, align 1
202+
// CHECK: %_0 = alloca [4 x i8], align 1
203+
// CHECK: store i32 %x, ptr %_0, align 1
208204
transmute(x)
209205
}
210206

@@ -220,10 +216,10 @@ pub unsafe fn check_from_bytes(x: [u8; 4]) -> u32 {
220216
// CHECK-LABEL: @check_to_aggregate(
221217
#[no_mangle]
222218
pub unsafe fn check_to_aggregate(x: u64) -> Aggregate64 {
223-
// CHECK: %0 = alloca %Aggregate64, align 4
224-
// CHECK: store i64 %x, ptr %0, align 4
225-
// CHECK: %1 = load i64, ptr %0, align 4
226-
// CHECK: ret i64 %1
219+
// CHECK: %_0 = alloca %Aggregate64, align 4
220+
// CHECK: store i64 %x, ptr %_0, align 4
221+
// CHECK: %0 = load i64, ptr %_0, align 4
222+
// CHECK: ret i64 %0
227223
transmute(x)
228224
}
229225

@@ -240,7 +236,7 @@ pub unsafe fn check_from_aggregate(x: Aggregate64) -> u64 {
240236
#[no_mangle]
241237
pub unsafe fn check_long_array_less_aligned(x: [u64; 100]) -> [u16; 400] {
242238
// CHECK-NEXT: start
243-
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 2 %0, ptr align 8 %x, i64 800, i1 false)
239+
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 2 %_0, ptr align 8 %x, i64 800, i1 false)
244240
// CHECK-NEXT: ret void
245241
transmute(x)
246242
}
@@ -249,7 +245,7 @@ pub unsafe fn check_long_array_less_aligned(x: [u64; 100]) -> [u16; 400] {
249245
#[no_mangle]
250246
pub unsafe fn check_long_array_more_aligned(x: [u8; 100]) -> [u32; 25] {
251247
// CHECK-NEXT: start
252-
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %0, ptr align 1 %x, i64 100, i1 false)
248+
// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %_0, ptr align 1 %x, i64 100, i1 false)
253249
// CHECK-NEXT: ret void
254250
transmute(x)
255251
}
@@ -268,8 +264,8 @@ pub unsafe fn check_pair_with_bool(x: (u8, bool)) -> (bool, i8) {
268264
pub unsafe fn check_float_to_pointer(x: f64) -> *const () {
269265
// CHECK-NOT: alloca
270266
// CHECK: %0 = bitcast double %x to i64
271-
// CHECK: %1 = inttoptr i64 %0 to ptr
272-
// CHECK: ret ptr %1
267+
// CHECK: %_0 = inttoptr i64 %0 to ptr
268+
// CHECK: ret ptr %_0
273269
transmute(x)
274270
}
275271

@@ -278,8 +274,8 @@ pub unsafe fn check_float_to_pointer(x: f64) -> *const () {
278274
pub unsafe fn check_float_from_pointer(x: *const ()) -> f64 {
279275
// CHECK-NOT: alloca
280276
// CHECK: %0 = ptrtoint ptr %x to i64
281-
// CHECK: %1 = bitcast i64 %0 to double
282-
// CHECK: ret double %1
277+
// CHECK: %_0 = bitcast i64 %0 to double
278+
// CHECK: ret double %_0
283279
transmute(x)
284280
}
285281

@@ -343,10 +339,10 @@ pub unsafe fn check_issue_110005(x: (usize, bool)) -> Option<Box<[u8]>> {
343339
// CHECK-LABEL: @check_pair_to_dst_ref(
344340
#[no_mangle]
345341
pub unsafe fn check_pair_to_dst_ref<'a>(x: (usize, usize)) -> &'a [u8] {
346-
// CHECK: %0 = inttoptr i64 %x.0 to ptr
347-
// CHECK: %1 = insertvalue { ptr, i64 } poison, ptr %0, 0
348-
// CHECK: %2 = insertvalue { ptr, i64 } %1, i64 %x.1, 1
349-
// CHECK: ret { ptr, i64 } %2
342+
// CHECK: %_0.0 = inttoptr i64 %x.0 to ptr
343+
// CHECK: %0 = insertvalue { ptr, i64 } poison, ptr %_0.0, 0
344+
// CHECK: %1 = insertvalue { ptr, i64 } %0, i64 %x.1, 1
345+
// CHECK: ret { ptr, i64 } %1
350346
transmute(x)
351347
}
352348

@@ -358,7 +354,7 @@ pub unsafe fn check_issue_109992(x: ()) -> [(); 1] {
358354

359355
// CHECK: start
360356
// CHECK-NEXT: ret void
361-
mir!{
357+
mir! {
362358
{
363359
RET = CastTransmute(x);
364360
Return()
@@ -390,10 +386,10 @@ pub struct HighAlignScalar(u8);
390386
// CHECK-LABEL: @check_to_overalign(
391387
#[no_mangle]
392388
pub unsafe fn check_to_overalign(x: u64) -> HighAlignScalar {
393-
// CHECK: %0 = alloca %HighAlignScalar, align 8
394-
// CHECK: store i64 %x, ptr %0, align 8
395-
// CHECK: %1 = load i64, ptr %0, align 8
396-
// CHECK: ret i64 %1
389+
// CHECK: %_0 = alloca %HighAlignScalar, align 8
390+
// CHECK: store i64 %x, ptr %_0, align 8
391+
// CHECK: %0 = load i64, ptr %_0, align 8
392+
// CHECK: ret i64 %0
397393
transmute(x)
398394
}
399395

Diff for: tests/codegen/match-optimized.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ pub fn exhaustive_match(e: E) -> u8 {
2020
// CHECK-NEXT: unreachable
2121
//
2222
// CHECK: [[A]]:
23-
// CHECK-NEXT: store i8 0, {{i8\*|ptr}} %1, align 1
23+
// CHECK-NEXT: store i8 0, {{i8\*|ptr}} %_0, align 1
2424
// CHECK-NEXT: br label %[[EXIT:[a-zA-Z0-9_]+]]
2525
// CHECK: [[B]]:
26-
// CHECK-NEXT: store i8 1, {{i8\*|ptr}} %1, align 1
26+
// CHECK-NEXT: store i8 1, {{i8\*|ptr}} %_0, align 1
2727
// CHECK-NEXT: br label %[[EXIT]]
2828
// CHECK: [[C]]:
29-
// CHECK-NEXT: store i8 2, {{i8\*|ptr}} %1, align 1
29+
// CHECK-NEXT: store i8 2, {{i8\*|ptr}} %_0, align 1
3030
// CHECK-NEXT: br label %[[EXIT]]
3131
match e {
3232
E::A => 0,

Diff for: tests/codegen/mem-replace-big-type.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub fn replace_big(dst: &mut Big, src: Big) -> Big {
2525
// For a large type, we expect exactly three `memcpy`s
2626
// CHECK-LABEL: define internal void @{{.+}}mem{{.+}}replace{{.+}}sret(%Big)
2727
// CHECK-NOT: call void @llvm.memcpy
28-
// CHECK: call void @llvm.memcpy.{{.+}}({{i8\*|ptr}} align 8 %0, {{i8\*|ptr}} align 8 %dest, i{{.*}} 56, i1 false)
28+
// CHECK: call void @llvm.memcpy.{{.+}}({{i8\*|ptr}} align 8 %result, {{i8\*|ptr}} align 8 %dest, i{{.*}} 56, i1 false)
2929
// CHECK-NOT: call void @llvm.memcpy
3030
// CHECK: call void @llvm.memcpy.{{.+}}({{i8\*|ptr}} align 8 %dest, {{i8\*|ptr}} align 8 %src, i{{.*}} 56, i1 false)
3131
// CHECK-NOT: call void @llvm.memcpy

Diff for: tests/codegen/repeat-trusted-len.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ use std::iter;
88
// CHECK-LABEL: @repeat_take_collect
99
#[no_mangle]
1010
pub fn repeat_take_collect() -> Vec<u8> {
11-
// CHECK: call void @llvm.memset.{{.+}}({{i8\*|ptr}} {{.*}}align 1{{.*}} %{{[0-9]+}}, i8 42, i{{[0-9]+}} 100000, i1 false)
11+
// CHECK: call void @llvm.memset.{{.+}}({{i8\*|ptr}} {{.*}}align 1{{.*}} %0, i8 42, i{{[0-9]+}} 100000, i1 false)
1212
iter::repeat(42).take(100000).collect()
1313
}
1414

1515
// CHECK-LABEL: @repeat_with_take_collect
1616
#[no_mangle]
1717
pub fn repeat_with_take_collect() -> Vec<u8> {
18-
// CHECK: call void @llvm.memset.{{.+}}({{i8\*|ptr}} {{.*}}align 1{{.*}} %{{[0-9]+}}, i8 13, i{{[0-9]+}} 12345, i1 false)
18+
// CHECK: call void @llvm.memset.{{.+}}({{i8\*|ptr}} {{.*}}align 1{{.*}} %0, i8 13, i{{[0-9]+}} 12345, i1 false)
1919
iter::repeat_with(|| 13).take(12345).collect()
2020
}

0 commit comments

Comments
 (0)