Remove f16 and f128 ICE paths from smir

This commit is contained in:
Trevor Gross 2024-06-21 04:09:38 -04:00
parent a299aa5df7
commit 518b74ec5d
3 changed files with 6 additions and 2 deletions

View File

@ -188,8 +188,10 @@ impl RustcInternal for FloatTy {
fn internal<'tcx>(&self, _tables: &mut Tables<'_>, _tcx: TyCtxt<'tcx>) -> Self::T<'tcx> {
match self {
FloatTy::F16 => rustc_ty::FloatTy::F16,
FloatTy::F32 => rustc_ty::FloatTy::F32,
FloatTy::F64 => rustc_ty::FloatTy::F64,
FloatTy::F128 => rustc_ty::FloatTy::F128,
}
}
}

View File

@ -304,10 +304,10 @@ impl<'tcx> Stable<'tcx> for ty::FloatTy {
fn stable(&self, _: &mut Tables<'_>) -> Self::T {
match self {
ty::FloatTy::F16 => unimplemented!("f16_f128"),
ty::FloatTy::F16 => FloatTy::F16,
ty::FloatTy::F32 => FloatTy::F32,
ty::FloatTy::F64 => FloatTy::F64,
ty::FloatTy::F128 => unimplemented!("f16_f128"),
ty::FloatTy::F128 => FloatTy::F128,
}
}
}

View File

@ -608,8 +608,10 @@ pub fn num_bytes(self) -> usize {
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum FloatTy {
F16,
F32,
F64,
F128,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]