Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use cranelift's Type::int instead of doing the match myself
  • Loading branch information
scottmcm committed Jul 8, 2021
1 parent 3d2869c commit 6444f24
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions compiler/rustc_codegen_cranelift/src/intrinsics/mod.rs
Expand Up @@ -1118,14 +1118,7 @@ pub(crate) fn codegen_intrinsic_call<'tcx>(

raw_eq, <T>(v lhs_ref, v rhs_ref) {
fn type_by_size(size: Size) -> Option<Type> {
Some(match size.bits() {
8 => types::I8,
16 => types::I16,
32 => types::I32,
64 => types::I64,
128 => types::I128,
_ => return None,
})
Type::int(size.bits().try_into().ok()?)
}

let size = fx.layout_of(T).layout.size;
Expand Down

0 comments on commit 6444f24

Please sign in to comment.