Skip to content

Commit

Permalink
Issue #27628 - Also support the LLVM 3.6 IR format in two tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvestre committed Aug 19, 2015
1 parent 7e13fae commit 0fdc4a8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/test/codegen/loads.rs
Expand Up @@ -20,14 +20,14 @@ pub struct Bytes {
// CHECK-LABEL: @borrow
#[no_mangle]
pub fn borrow(x: &i32) -> &i32 {
// CHECK: load i32*, i32** %x{{.*}}, !nonnull
// CHECK: load {{(i32\*, )?}}i32** %x{{.*}}, !nonnull
x
}

// CHECK-LABEL: @_box
#[no_mangle]
pub fn _box(x: Box<i32>) -> i32 {
// CHECK: load i32*, i32** %x{{.*}}, !nonnull
// CHECK: load {{(i32\*, )?}}i32** %x{{.*}}, !nonnull
*x
}

Expand All @@ -36,7 +36,7 @@ pub fn _box(x: Box<i32>) -> i32 {
// dependent alignment
#[no_mangle]
pub fn small_array_alignment(x: [i8; 4]) -> [i8; 4] {
// CHECK: [[VAR:%[0-9]+]] = load i32, i32* %{{.*}}, align 1
// CHECK: [[VAR:%[0-9]+]] = load {{(i32, )?}}i32* %{{.*}}, align 1
// CHECK: ret i32 [[VAR]]
x
}
Expand All @@ -46,7 +46,7 @@ pub fn small_array_alignment(x: [i8; 4]) -> [i8; 4] {
// dependent alignment
#[no_mangle]
pub fn small_struct_alignment(x: Bytes) -> Bytes {
// CHECK: [[VAR:%[0-9]+]] = load i32, i32* %{{.*}}, align 1
// CHECK: [[VAR:%[0-9]+]] = load {{(i32, )?}}i32* %{{.*}}, align 1
// CHECK: ret i32 [[VAR]]
x
}
4 changes: 2 additions & 2 deletions src/test/codegen/stores.rs
Expand Up @@ -22,7 +22,7 @@ pub struct Bytes {
// dependent alignment
#[no_mangle]
pub fn small_array_alignment(x: &mut [i8; 4]) {
// CHECK: [[VAR:%[0-9]+]] = load [4 x i8]*, [4 x i8]** %x
// CHECK: [[VAR:%[0-9]+]] = load {{(\[4 x i8\]\*, )?}}[4 x i8]** %x
// CHECK: [[VAR2:%[0-9]+]] = bitcast [4 x i8]* [[VAR]] to i32*
// CHECK: store i32 %{{.*}}, i32* [[VAR2]], align 1
*x = [0; 4];
Expand All @@ -33,7 +33,7 @@ pub fn small_array_alignment(x: &mut [i8; 4]) {
// dependent alignment
#[no_mangle]
pub fn small_struct_alignment(x: &mut Bytes) {
// CHECK: [[VAR:%[0-9]+]] = load %Bytes*, %Bytes** %x
// CHECK: [[VAR:%[0-9]+]] = load {{(%Bytes\*, )?}}%Bytes** %x
// CHECK: [[VAR2:%[0-9]+]] = bitcast %Bytes* [[VAR]] to i32*
// CHECK: store i32 %{{.*}}, i32* [[VAR2]], align 1
*x = Bytes {
Expand Down

0 comments on commit 0fdc4a8

Please sign in to comment.