mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Fix test expectations for 32bit x86
This commit is contained in:
parent
8ed77fd29e
commit
cc7044b080
@ -315,10 +315,10 @@ pub fn return_f16(x: f16) -> f16 {
|
||||
#[no_mangle]
|
||||
pub fn return_f128(x: f128) -> f128 {
|
||||
// CHECK: movl [[#%d,OFFSET:]](%ebp), %[[PTR:.*]]
|
||||
// CHECK-NEXT: movl [[#%d,OFFSET+16]](%ebp), %[[VAL4:.*]]
|
||||
// CHECK-NEXT: movl [[#%d,OFFSET+4]](%ebp), %[[VAL1:.*]]
|
||||
// CHECK-NEXT: movl [[#%d,OFFSET+8]](%ebp), %[[VAL2:.*]]
|
||||
// CHECK-NEXT: movl [[#%d,OFFSET+12]](%ebp), %[[VAL3:.*]]
|
||||
// CHECK-NEXT: movl [[#%d,OFFSET+16]](%ebp), %[[VAL4:.*]]
|
||||
// CHECK-NEXT: movl %[[VAL4:.*]] 12(%[[PTR]])
|
||||
// CHECK-NEXT: movl %[[VAL3:.*]] 8(%[[PTR]])
|
||||
// CHECK-NEXT: movl %[[VAL2:.*]] 4(%[[PTR]])
|
||||
|
@ -102,15 +102,15 @@ pub fn make_struct_1(a: i32) -> Struct1 {
|
||||
|
||||
pub struct Struct2Asc(i16, i64);
|
||||
|
||||
// bit32-LABEL: void @make_struct_2_asc({{.*}} sret([16 x i8]) {{.*}} %s,
|
||||
// bit32-LABEL: void @make_struct_2_asc({{.*}} sret({{[^,]*}}) {{.*}} %s,
|
||||
// bit64-LABEL: { i64, i16 } @make_struct_2_asc(
|
||||
// CHECK-SAME: i16 noundef %a, i64 noundef %b)
|
||||
#[no_mangle]
|
||||
pub fn make_struct_2_asc(a: i16, b: i64) -> Struct2Asc {
|
||||
// CHECK-NOT: alloca
|
||||
// bit32: %[[GEP:.+]] = getelementptr inbounds i8, ptr %s, i32 8
|
||||
// bit32: store i16 %a, ptr %[[GEP]], align 8
|
||||
// bit32: store i64 %b, ptr %s, align 8
|
||||
// bit32: store i16 %a, ptr %[[GEP]]
|
||||
// bit32: store i64 %b, ptr %s
|
||||
// bit64: %[[TEMP0:.+]] = insertvalue { i64, i16 } poison, i64 %b, 0
|
||||
// bit64: %[[TEMP1:.+]] = insertvalue { i64, i16 } %[[TEMP0]], i16 %a, 1
|
||||
// bit64: ret { i64, i16 } %[[TEMP1]]
|
||||
@ -120,15 +120,15 @@ pub fn make_struct_2_asc(a: i16, b: i64) -> Struct2Asc {
|
||||
|
||||
pub struct Struct2Desc(i64, i16);
|
||||
|
||||
// bit32-LABEL: void @make_struct_2_desc({{.*}} sret([16 x i8]) {{.*}} %s,
|
||||
// bit32-LABEL: void @make_struct_2_desc({{.*}} sret({{[^,]*}}) {{.*}} %s,
|
||||
// bit64-LABEL: { i64, i16 } @make_struct_2_desc(
|
||||
// CHECK-SAME: i64 noundef %a, i16 noundef %b)
|
||||
#[no_mangle]
|
||||
pub fn make_struct_2_desc(a: i64, b: i16) -> Struct2Desc {
|
||||
// CHECK-NOT: alloca
|
||||
// bit32: store i64 %a, ptr %s, align 8
|
||||
// bit32: store i64 %a, ptr %s
|
||||
// bit32: %[[GEP:.+]] = getelementptr inbounds i8, ptr %s, i32 8
|
||||
// bit32: store i16 %b, ptr %[[GEP]], align 8
|
||||
// bit32: store i16 %b, ptr %[[GEP]]
|
||||
// bit64: %[[TEMP0:.+]] = insertvalue { i64, i16 } poison, i64 %a, 0
|
||||
// bit64: %[[TEMP1:.+]] = insertvalue { i64, i16 } %[[TEMP0]], i16 %b, 1
|
||||
// bit64: ret { i64, i16 } %[[TEMP1]]
|
||||
|
@ -48,7 +48,7 @@ pub enum Enum1 {
|
||||
C(u64),
|
||||
}
|
||||
|
||||
// bit32: void @enum1_value({{.*}} sret([16 x i8]) {{[^,]*}}, [[ENUM1_TYP:i[0-9]+]]
|
||||
// bit32: void @enum1_value({{.*}} sret({{[^,]*}}) {{[^,]*}}, [[ENUM1_TYP:i[0-9]+]]
|
||||
// bit64: { [[ENUM1_TYP:i[0-9]+]], i64 } @enum1_value([[ENUM1_TYP]]
|
||||
// CHECK-SAME: noundef range([[ENUM1_TYP]] 0, 3) %x.0, i64 noundef %x.1)
|
||||
#[no_mangle]
|
||||
|
@ -25,8 +25,7 @@ pub fn test_ScalarZstFirst(_: ScalarZstFirst) -> ScalarZstFirst {
|
||||
}
|
||||
|
||||
type ScalarPairZstLast = (u8, u128, ());
|
||||
// bit32: define {{(dso_local )?}}void @test_ScalarPairZstLast(ptr sret([24 x i8]) align 8
|
||||
// bit64: define {{(dso_local )?}}void @test_ScalarPairZstLast(ptr sret([32 x i8]) align 16
|
||||
// CHECK: define {{(dso_local )?}}void @test_ScalarPairZstLast(ptr sret({{[^,]*}})
|
||||
// CHECK-SAME: %_0, i128 %_1.0, i8 %_1.1)
|
||||
#[no_mangle]
|
||||
pub fn test_ScalarPairZstLast(_: ScalarPairZstLast) -> ScalarPairZstLast {
|
||||
@ -34,8 +33,7 @@ pub fn test_ScalarPairZstLast(_: ScalarPairZstLast) -> ScalarPairZstLast {
|
||||
}
|
||||
|
||||
type ScalarPairZstFirst = ((), u8, u128);
|
||||
// bit32: define {{(dso_local )?}}void @test_ScalarPairZstFirst(ptr sret([24 x i8]) align 8
|
||||
// bit64: define {{(dso_local )?}}void @test_ScalarPairZstFirst(ptr sret([32 x i8]) align 16
|
||||
// CHECK: define {{(dso_local )?}}void @test_ScalarPairZstFirst(ptr sret({{[^,]*}})
|
||||
// CHECK-SAME: %_0, i8 %_1.0, i128 %_1.1)
|
||||
#[no_mangle]
|
||||
pub fn test_ScalarPairZstFirst(_: ScalarPairZstFirst) -> ScalarPairZstFirst {
|
||||
@ -43,8 +41,7 @@ pub fn test_ScalarPairZstFirst(_: ScalarPairZstFirst) -> ScalarPairZstFirst {
|
||||
}
|
||||
|
||||
type ScalarPairLotsOfZsts = ((), u8, (), u128, ());
|
||||
// bit32: define {{(dso_local )?}}void @test_ScalarPairLotsOfZsts(ptr sret([24 x i8]) align 8
|
||||
// bit64: define {{(dso_local )?}}void @test_ScalarPairLotsOfZsts(ptr sret([32 x i8]) align 16
|
||||
// CHECK: define {{(dso_local )?}}void @test_ScalarPairLotsOfZsts(ptr sret({{[^,]*}})
|
||||
// CHECK-SAME: %_0, i128 %_1.0, i8 %_1.1)
|
||||
#[no_mangle]
|
||||
pub fn test_ScalarPairLotsOfZsts(_: ScalarPairLotsOfZsts) -> ScalarPairLotsOfZsts {
|
||||
@ -52,8 +49,7 @@ pub fn test_ScalarPairLotsOfZsts(_: ScalarPairLotsOfZsts) -> ScalarPairLotsOfZst
|
||||
}
|
||||
|
||||
type ScalarPairLottaNesting = (((), ((), u8, (), u128, ())), ());
|
||||
// bit32: define {{(dso_local )?}}void @test_ScalarPairLottaNesting(ptr sret([24 x i8]) align 8
|
||||
// bit64: define {{(dso_local )?}}void @test_ScalarPairLottaNesting(ptr sret([32 x i8]) align 16
|
||||
// CHECK: define {{(dso_local )?}}void @test_ScalarPairLottaNesting(ptr sret({{[^,]*}})
|
||||
// CHECK-SAME: %_0, i128 %_1.0, i8 %_1.1)
|
||||
#[no_mangle]
|
||||
pub fn test_ScalarPairLottaNesting(_: ScalarPairLottaNesting) -> ScalarPairLottaNesting {
|
||||
|
Loading…
Reference in New Issue
Block a user