Skip to content

Commit aca2057

Browse files
committed
Auto merge of rust-lang#27677 - sylvestre:issue-27628, r=dotdash
2 parents c8c14f2 + 0fdc4a8 commit aca2057

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/test/codegen/loads.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ pub struct Bytes {
2020
// CHECK-LABEL: @borrow
2121
#[no_mangle]
2222
pub fn borrow(x: &i32) -> &i32 {
23-
// CHECK: load i32*, i32** %x{{.*}}, !nonnull
23+
// CHECK: load {{(i32\*, )?}}i32** %x{{.*}}, !nonnull
2424
x
2525
}
2626

2727
// CHECK-LABEL: @_box
2828
#[no_mangle]
2929
pub fn _box(x: Box<i32>) -> i32 {
30-
// CHECK: load i32*, i32** %x{{.*}}, !nonnull
30+
// CHECK: load {{(i32\*, )?}}i32** %x{{.*}}, !nonnull
3131
*x
3232
}
3333

@@ -36,7 +36,7 @@ pub fn _box(x: Box<i32>) -> i32 {
3636
// dependent alignment
3737
#[no_mangle]
3838
pub fn small_array_alignment(x: [i8; 4]) -> [i8; 4] {
39-
// CHECK: [[VAR:%[0-9]+]] = load i32, i32* %{{.*}}, align 1
39+
// CHECK: [[VAR:%[0-9]+]] = load {{(i32, )?}}i32* %{{.*}}, align 1
4040
// CHECK: ret i32 [[VAR]]
4141
x
4242
}
@@ -46,7 +46,7 @@ pub fn small_array_alignment(x: [i8; 4]) -> [i8; 4] {
4646
// dependent alignment
4747
#[no_mangle]
4848
pub fn small_struct_alignment(x: Bytes) -> Bytes {
49-
// CHECK: [[VAR:%[0-9]+]] = load i32, i32* %{{.*}}, align 1
49+
// CHECK: [[VAR:%[0-9]+]] = load {{(i32, )?}}i32* %{{.*}}, align 1
5050
// CHECK: ret i32 [[VAR]]
5151
x
5252
}

src/test/codegen/stores.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub struct Bytes {
2222
// dependent alignment
2323
#[no_mangle]
2424
pub fn small_array_alignment(x: &mut [i8; 4]) {
25-
// CHECK: [[VAR:%[0-9]+]] = load [4 x i8]*, [4 x i8]** %x
25+
// CHECK: [[VAR:%[0-9]+]] = load {{(\[4 x i8\]\*, )?}}[4 x i8]** %x
2626
// CHECK: [[VAR2:%[0-9]+]] = bitcast [4 x i8]* [[VAR]] to i32*
2727
// CHECK: store i32 %{{.*}}, i32* [[VAR2]], align 1
2828
*x = [0; 4];
@@ -33,7 +33,7 @@ pub fn small_array_alignment(x: &mut [i8; 4]) {
3333
// dependent alignment
3434
#[no_mangle]
3535
pub fn small_struct_alignment(x: &mut Bytes) {
36-
// CHECK: [[VAR:%[0-9]+]] = load %Bytes*, %Bytes** %x
36+
// CHECK: [[VAR:%[0-9]+]] = load {{(%Bytes\*, )?}}%Bytes** %x
3737
// CHECK: [[VAR2:%[0-9]+]] = bitcast %Bytes* [[VAR]] to i32*
3838
// CHECK: store i32 %{{.*}}, i32* [[VAR2]], align 1
3939
*x = Bytes {

0 commit comments

Comments
 (0)