Add f16 and f128 to rustc_type_ir::FloatTy and rustc_abi::Primitive

Make changes necessary to support these types in the compiler.
This commit is contained in:
Trevor Gross 2024-02-28 03:44:23 -05:00
parent ef324565d0
commit e3f63d9375
31 changed files with 107 additions and 14 deletions

View file

@ -394,10 +394,12 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
ty::Infer(ty::FloatVar(_)) => {
// This causes a compiler error if any new float kinds are added.
let (ty::FloatTy::F32 | ty::FloatTy::F64);
let (ty::FloatTy::F16 | ty::FloatTy::F32 | ty::FloatTy::F64 | ty::FloatTy::F128);
let possible_floats = [
SimplifiedType::Float(ty::FloatTy::F16),
SimplifiedType::Float(ty::FloatTy::F32),
SimplifiedType::Float(ty::FloatTy::F64),
SimplifiedType::Float(ty::FloatTy::F128),
];
for simp in possible_floats {