message: Change enum->int casts to not go through MIR casts.
  Instead we generate a discriminant rvalue and cast the result of that.
diff: @@ -635,29 +635,6 @@ fn is_fat_ptr<'tcx>(fx: &FunctionCx<'_, '_, 'tcx>, ty: Ty<'tcx>) -> bool {
  let (ptr, _extra) = operand.load_scalar_pair(fx);
  lval.write_cvalue(fx, CValue::by_val(ptr, dest_layout))
  }
  - } else if let ty::Adt(adt_def, _substs) = from_ty.kind() {
  - // enum -> discriminant value
  - assert!(adt_def.is_enum());
  - match to_ty.kind() {
  - ty::Uint(_) | ty::Int(_) => {}
  - _ => unreachable!("cast adt {} -> {}", from_ty, to_ty),
  - }
  - let to_clif_ty = fx.clif_type(to_ty).unwrap();
  -
  - let discriminant = crate::discriminant::codegen_get_discriminant(
  - fx,
  - operand,
  - fx.layout_of(operand.layout().ty.discriminant_ty(fx.tcx)),
  - )
  - .load_scalar(fx);
  -
  - let res = crate::cast::clif_intcast(
  - fx,
  - discriminant,
  - to_clif_ty,
  - to_ty.is_signed(),
  - );
  - lval.write_cvalue(fx, CValue::by_val(res, dest_layout));
  } else {
  let to_clif_ty = fx.clif_type(to_ty).unwrap();
  let from = operand.load_scalar(fx);
  