@@ -7,7 +7,7 @@ use rustc_middle::ty::layout::{
7
7
use rustc_middle:: ty:: TypeFoldable ;
8
8
use rustc_span:: source_map:: Spanned ;
9
9
use rustc_target:: abi:: call:: FnAbi ;
10
- use rustc_target:: abi:: { Integer , Primitive } ;
10
+ use rustc_target:: abi:: { Float , Integer , Primitive } ;
11
11
use rustc_target:: spec:: { HasTargetSpec , Target } ;
12
12
13
13
use crate :: constant:: ConstantCx ;
@@ -32,10 +32,12 @@ pub(crate) fn scalar_to_clif_type(tcx: TyCtxt<'_>, scalar: Scalar) -> Type {
32
32
Integer :: I64 => types:: I64 ,
33
33
Integer :: I128 => types:: I128 ,
34
34
} ,
35
- Primitive :: F16 => unimplemented ! ( "f16_f128" ) ,
36
- Primitive :: F32 => types:: F32 ,
37
- Primitive :: F64 => types:: F64 ,
38
- Primitive :: F128 => unimplemented ! ( "f16_f128" ) ,
35
+ Primitive :: Float ( float) => match float {
36
+ Float :: F16 => unimplemented ! ( "f16_f128" ) ,
37
+ Float :: F32 => types:: F32 ,
38
+ Float :: F64 => types:: F64 ,
39
+ Float :: F128 => unimplemented ! ( "f16_f128" ) ,
40
+ } ,
39
41
// FIXME(erikdesjardins): handle non-default addrspace ptr sizes
40
42
Primitive :: Pointer ( _) => pointer_ty ( tcx) ,
41
43
}
0 commit comments