@@ -71,11 +71,11 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
7171 let expected_bytes = len / 8 + ( ( len % 8 > 0 ) as u64 ) ;
7272
7373 let mask_ty = arg_tys[ 0 ] ;
74- let mut mask = match mask_ty. kind ( ) {
74+ let mut mask = match * mask_ty. kind ( ) {
7575 ty:: Int ( i) if i. bit_width ( ) == Some ( expected_int_bits) => args[ 0 ] . immediate ( ) ,
7676 ty:: Uint ( i) if i. bit_width ( ) == Some ( expected_int_bits) => args[ 0 ] . immediate ( ) ,
7777 ty:: Array ( elem, len)
78- if matches ! ( elem. kind( ) , ty:: Uint ( ty:: UintTy :: U8 ) )
78+ if matches ! ( * elem. kind( ) , ty:: Uint ( ty:: UintTy :: U8 ) )
7979 && len. try_eval_target_usize ( bx. tcx , ty:: ParamEnv :: reveal_all ( ) )
8080 == Some ( expected_bytes) =>
8181 {
@@ -353,8 +353,8 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
353353 if name == sym:: simd_shuffle {
354354 // Make sure this is actually an array, since typeck only checks the length-suffixed
355355 // version of this intrinsic.
356- let n: u64 = match args[ 2 ] . layout . ty . kind ( ) {
357- ty:: Array ( ty, len) if matches ! ( ty. kind( ) , ty:: Uint ( ty:: UintTy :: U32 ) ) => {
356+ let n: u64 = match * args[ 2 ] . layout . ty . kind ( ) {
357+ ty:: Array ( ty, len) if matches ! ( * ty. kind( ) , ty:: Uint ( ty:: UintTy :: U32 ) ) => {
358358 len. try_eval_target_usize ( bx. cx . tcx , ty:: ParamEnv :: reveal_all ( ) ) . unwrap_or_else (
359359 || span_bug ! ( span, "could not evaluate shuffle index array length" ) ,
360360 )
@@ -427,7 +427,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
427427 m_len == v_len,
428428 InvalidMonomorphization :: MismatchedLengths { span, name, m_len, v_len }
429429 ) ;
430- match m_elem_ty. kind ( ) {
430+ match * m_elem_ty. kind ( ) {
431431 ty:: Int ( _) => { }
432432 _ => return_error ! ( InvalidMonomorphization :: MaskType { span, name, ty: m_elem_ty } ) ,
433433 }
@@ -460,13 +460,13 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
460460 Unsupported ,
461461 }
462462
463- let in_style = match in_elem. kind ( ) {
463+ let in_style = match * in_elem. kind ( ) {
464464 ty:: Int ( _) | ty:: Uint ( _) => Style :: Int ,
465465 ty:: Float ( _) => Style :: Float ,
466466 _ => Style :: Unsupported ,
467467 } ;
468468
469- let out_style = match out_elem. kind ( ) {
469+ let out_style = match * out_elem. kind ( ) {
470470 ty:: Int ( _) | ty:: Uint ( _) => Style :: Int ,
471471 ty:: Float ( _) => Style :: Float ,
472472 _ => Style :: Unsupported ,
@@ -493,7 +493,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
493493 macro_rules! arith_binary {
494494 ( $( $name: ident: $( $( $p: ident) ,* => $call: ident) ,* ; ) * ) => {
495495 $( if name == sym:: $name {
496- match in_elem. kind( ) {
496+ match * in_elem. kind( ) {
497497 $( $( ty:: $p( _) ) |* => {
498498 return Ok ( bx. $call( args[ 0 ] . immediate( ) , args[ 1 ] . immediate( ) ) )
499499 } ) *
@@ -543,13 +543,13 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
543543 shift += 1 ;
544544 }
545545
546- match ret_ty. kind ( ) {
546+ match * ret_ty. kind ( ) {
547547 ty:: Uint ( i) if i. bit_width ( ) == Some ( expected_int_bits) => {
548548 // Zero-extend iN to the bitmask type:
549549 return Ok ( result) ;
550550 }
551551 ty:: Array ( elem, len)
552- if matches ! ( elem. kind( ) , ty:: Uint ( ty:: UintTy :: U8 ) )
552+ if matches ! ( * elem. kind( ) , ty:: Uint ( ty:: UintTy :: U8 ) )
553553 && len. try_eval_target_usize ( bx. tcx , ty:: ParamEnv :: reveal_all ( ) )
554554 == Some ( expected_bytes) =>
555555 {
@@ -588,7 +588,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
588588 return Err ( ( ) ) ;
589589 } } ;
590590 }
591- let ( elem_ty_str, elem_ty) = if let ty:: Float ( f) = in_elem. kind ( ) {
591+ let ( elem_ty_str, elem_ty) = if let ty:: Float ( ref f) = * in_elem. kind ( ) {
592592 let elem_ty = bx. cx . type_float_from_ty ( * f) ;
593593 match f. bit_width ( ) {
594594 32 => ( "f" , elem_ty) ,
@@ -795,15 +795,15 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
795795
796796 // This counts how many pointers
797797 fn ptr_count ( t : Ty < ' _ > ) -> usize {
798- match t. kind ( ) {
798+ match * t. kind ( ) {
799799 ty:: RawPtr ( p) => 1 + ptr_count ( p. ty ) ,
800800 _ => 0 ,
801801 }
802802 }
803803
804804 // Non-ptr type
805805 fn non_ptr ( t : Ty < ' _ > ) -> Ty < ' _ > {
806- match t. kind ( ) {
806+ match * t. kind ( ) {
807807 ty:: RawPtr ( p) => non_ptr ( p. ty ) ,
808808 _ => t,
809809 }
@@ -813,7 +813,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
813813 // to the element type of the first argument
814814 let ( _, element_ty0) = arg_tys[ 0 ] . simd_size_and_type ( bx. tcx ( ) ) ;
815815 let ( _, element_ty1) = arg_tys[ 1 ] . simd_size_and_type ( bx. tcx ( ) ) ;
816- let ( pointer_count, underlying_ty) = match element_ty1. kind ( ) {
816+ let ( pointer_count, underlying_ty) = match * element_ty1. kind ( ) {
817817 ty:: RawPtr ( p) if p. ty == in_elem => ( ptr_count ( element_ty1) , non_ptr ( element_ty1) ) ,
818818 _ => {
819819 require ! (
@@ -837,7 +837,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
837837
838838 // The element type of the third argument must be a signed integer type of any width:
839839 let ( _, element_ty2) = arg_tys[ 2 ] . simd_size_and_type ( bx. tcx ( ) ) ;
840- match element_ty2. kind ( ) {
840+ match * element_ty2. kind ( ) {
841841 ty:: Int ( _) => ( ) ,
842842 _ => {
843843 require ! (
@@ -909,15 +909,15 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
909909
910910 // This counts how many pointers
911911 fn ptr_count ( t : Ty < ' _ > ) -> usize {
912- match t. kind ( ) {
912+ match * t. kind ( ) {
913913 ty:: RawPtr ( p) => 1 + ptr_count ( p. ty ) ,
914914 _ => 0 ,
915915 }
916916 }
917917
918918 // Non-ptr type
919919 fn non_ptr ( t : Ty < ' _ > ) -> Ty < ' _ > {
920- match t. kind ( ) {
920+ match * t. kind ( ) {
921921 ty:: RawPtr ( p) => non_ptr ( p. ty ) ,
922922 _ => t,
923923 }
@@ -928,7 +928,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
928928 let ( _, element_ty0) = arg_tys[ 0 ] . simd_size_and_type ( bx. tcx ( ) ) ;
929929 let ( _, element_ty1) = arg_tys[ 1 ] . simd_size_and_type ( bx. tcx ( ) ) ;
930930 let ( _, element_ty2) = arg_tys[ 2 ] . simd_size_and_type ( bx. tcx ( ) ) ;
931- let ( pointer_count, underlying_ty) = match element_ty1. kind ( ) {
931+ let ( pointer_count, underlying_ty) = match * element_ty1. kind ( ) {
932932 ty:: RawPtr ( p) if p. ty == in_elem && p. mutbl == hir:: Mutability :: Mut => {
933933 ( ptr_count ( element_ty1) , non_ptr ( element_ty1) )
934934 }
@@ -953,7 +953,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
953953 assert_eq ! ( underlying_ty, non_ptr( element_ty0) ) ;
954954
955955 // The element type of the third argument must be a signed integer type of any width:
956- match element_ty2. kind ( ) {
956+ match * element_ty2. kind ( ) {
957957 ty:: Int ( _) => ( ) ,
958958 _ => {
959959 require ! (
@@ -1011,7 +1011,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
10111011 macro_rules! arith_unary {
10121012 ( $( $name: ident: $( $( $p: ident) ,* => $call: ident) ,* ; ) * ) => {
10131013 $( if name == sym:: $name {
1014- match in_elem. kind( ) {
1014+ match * in_elem. kind( ) {
10151015 $( $( ty:: $p( _) ) |* => {
10161016 return Ok ( bx. $call( args[ 0 ] . immediate( ) ) )
10171017 } ) *
@@ -1135,7 +1135,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
11351135 ret_ty == in_elem,
11361136 InvalidMonomorphization :: ReturnType { span, name, in_elem, in_ty, ret_ty }
11371137 ) ;
1138- return match in_elem. kind( ) {
1138+ return match * in_elem. kind( ) {
11391139 ty:: Int ( _) | ty:: Uint ( _) => {
11401140 let r = bx. vector_reduce_op( args[ 0 ] . immediate( ) , $vec_op) ;
11411141 if $ordered {
@@ -1204,7 +1204,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
12041204 ret_ty == in_elem,
12051205 InvalidMonomorphization :: ReturnType { span, name, in_elem, in_ty, ret_ty }
12061206 ) ;
1207- return match in_elem. kind( ) {
1207+ return match * in_elem. kind( ) {
12081208 ty:: Int ( _) | ty:: Uint ( _) => Ok ( bx. $int_red( args[ 0 ] . immediate( ) ) ) ,
12091209 ty:: Float ( _) => Ok ( bx. $float_red( args[ 0 ] . immediate( ) ) ) ,
12101210 _ => return_error!( InvalidMonomorphization :: UnsupportedSymbol {
@@ -1233,7 +1233,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
12331233 ) ;
12341234 args[ 0 ] . immediate( )
12351235 } else {
1236- match in_elem. kind( ) {
1236+ match * in_elem. kind( ) {
12371237 ty:: Int ( _) | ty:: Uint ( _) => { }
12381238 _ => return_error!( InvalidMonomorphization :: UnsupportedSymbol {
12391239 span,
@@ -1247,7 +1247,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
12471247
12481248 args[ 0 ] . immediate( )
12491249 } ;
1250- return match in_elem. kind( ) {
1250+ return match * in_elem. kind( ) {
12511251 ty:: Int ( _) | ty:: Uint ( _) => {
12521252 let r = bx. vector_reduce_op( input, $op) ;
12531253 Ok ( if !$boolean {
0 commit comments