File tree 4 files changed +34
-8
lines changed
4 files changed +34
-8
lines changed Original file line number Diff line number Diff line change
1
+ // 32-bit x86 returns `f32` and `f64` differently to avoid the x87 stack.
2
+ //@ revisions: x86 other
3
+ //@[x86] only-x86
4
+ //@[other] ignore-x86
5
+
1
6
// Verify that our intrinsics generate the correct LLVM calls for f128
2
7
3
8
#![ crate_type = "lib" ]
@@ -138,14 +143,16 @@ pub fn f128_as_f16(a: f128) -> f16 {
138
143
a as f16
139
144
}
140
145
141
- // CHECK-LABEL: float @f128_as_f32(
146
+ // other-LABEL: float @f128_as_f32(
147
+ // x86-LABEL: i32 @f128_as_f32(
142
148
#[ no_mangle]
143
149
pub fn f128_as_f32 ( a : f128 ) -> f32 {
144
150
// CHECK: fptrunc fp128 %{{.+}} to float
145
151
a as f32
146
152
}
147
153
148
- // CHECK-LABEL: double @f128_as_f64(
154
+ // other-LABEL: double @f128_as_f64(
155
+ // x86-LABEL: void @f128_as_f64(
149
156
#[ no_mangle]
150
157
pub fn f128_as_f64 ( a : f128 ) -> f64 {
151
158
// CHECK: fptrunc fp128 %{{.+}} to double
Original file line number Diff line number Diff line change
1
+ // 32-bit x86 returns `f32` and `f64` differently to avoid the x87 stack.
2
+ //@ revisions: x86 other
3
+ //@[x86] only-x86
4
+ //@[other] ignore-x86
5
+
1
6
// Verify that our intrinsics generate the correct LLVM calls for f16
2
7
3
8
#![ crate_type = "lib" ]
@@ -140,14 +145,16 @@ pub fn f16_as_self(a: f16) -> f16 {
140
145
a as f16
141
146
}
142
147
143
- // CHECK-LABEL: float @f16_as_f32(
148
+ // other-LABEL: float @f16_as_f32(
149
+ // x86-LABEL: i32 @f16_as_f32(
144
150
#[ no_mangle]
145
151
pub fn f16_as_f32 ( a : f16 ) -> f32 {
146
152
// CHECK: fpext half %{{.+}} to float
147
153
a as f32
148
154
}
149
155
150
- // CHECK-LABEL: double @f16_as_f64(
156
+ // other-LABEL: double @f16_as_f64(
157
+ // x86-LABEL: void @f16_as_f64(
151
158
#[ no_mangle]
152
159
pub fn f16_as_f64 ( a : f16 ) -> f64 {
153
160
// CHECK: fpext half %{{.+}} to double
Original file line number Diff line number Diff line change 1
1
//@ compile-flags: -C no-prepopulate-passes -Copt-level=0
2
+ // 32-bit x86 returns `f32` and `f64` differently to avoid the x87 stack.
3
+ //@ revisions: x86 other
4
+ //@[x86] only-x86
5
+ //@[other] ignore-x86
2
6
3
7
#![ crate_type = "lib" ]
4
8
5
9
#[ no_mangle]
6
10
pub struct F32 ( f32 ) ;
7
11
8
- // CHECK: define{{.*}}float @add_newtype_f32(float %a, float %b)
12
+ // other: define{{.*}}float @add_newtype_f32(float %a, float %b)
13
+ // x86: define{{.*}}i32 @add_newtype_f32(float %a, float %b)
9
14
#[ inline( never) ]
10
15
#[ no_mangle]
11
16
pub fn add_newtype_f32 ( a : F32 , b : F32 ) -> F32 {
@@ -15,7 +20,8 @@ pub fn add_newtype_f32(a: F32, b: F32) -> F32 {
15
20
#[ no_mangle]
16
21
pub struct F64 ( f64 ) ;
17
22
18
- // CHECK: define{{.*}}double @add_newtype_f64(double %a, double %b)
23
+ // other: define{{.*}}double @add_newtype_f64(double %a, double %b)
24
+ // x86: define{{.*}}void @add_newtype_f64(ptr{{.*}}sret([8 x i8]){{.*}}%_0, double %a, double %b)
19
25
#[ inline( never) ]
20
26
#[ no_mangle]
21
27
pub fn add_newtype_f64 ( a : F64 , b : F64 ) -> F64 {
Original file line number Diff line number Diff line change 1
1
//@ ignore-emscripten vectors passed directly
2
2
//@ compile-flags: -O -C no-prepopulate-passes
3
+ // 32-bit x86 returns `f32` differently to avoid the x87 stack.
4
+ //@ revisions: x86 other
5
+ //@[x86] only-x86
6
+ //@[other] ignore-x86
3
7
4
8
// This test that using union forward the abi of the inner type, as
5
9
// discussed in #54668
@@ -67,7 +71,8 @@ pub union UnionF32 {
67
71
a : f32 ,
68
72
}
69
73
70
- // CHECK: define {{(dso_local )?}}float @test_UnionF32(float %_1)
74
+ // other: define {{(dso_local )?}}float @test_UnionF32(float %_1)
75
+ // x86: define {{(dso_local )?}}i32 @test_UnionF32(float %_1)
71
76
#[ no_mangle]
72
77
pub fn test_UnionF32 ( _: UnionF32 ) -> UnionF32 {
73
78
loop { }
@@ -78,7 +83,8 @@ pub union UnionF32F32 {
78
83
b : f32 ,
79
84
}
80
85
81
- // CHECK: define {{(dso_local )?}}float @test_UnionF32F32(float %_1)
86
+ // other: define {{(dso_local )?}}float @test_UnionF32F32(float %_1)
87
+ // x86: define {{(dso_local )?}}i32 @test_UnionF32F32(float %_1)
82
88
#[ no_mangle]
83
89
pub fn test_UnionF32F32 ( _: UnionF32F32 ) -> UnionF32F32 {
84
90
loop { }
You can’t perform that action at this time.
0 commit comments