@@ -115,8 +115,8 @@ pub fn codegen_intrinsic_call(
115115 let llval = match name {
116116 _ if simple. is_some ( ) => {
117117 bx. call ( simple. unwrap ( ) ,
118- & args. iter ( ) . map ( |arg| arg. immediate ( ) ) . collect :: < Vec < _ > > ( ) ,
119- None )
118+ & args. iter ( ) . map ( |arg| arg. immediate ( ) ) . collect :: < Vec < _ > > ( ) ,
119+ None )
120120 }
121121 "unreachable" => {
122122 return ;
@@ -373,7 +373,6 @@ pub fn codegen_intrinsic_call(
373373 return ;
374374 }
375375 }
376-
377376 } ,
378377 "fadd_fast" | "fsub_fast" | "fmul_fast" | "fdiv_fast" | "frem_fast" => {
379378 let sty = & arg_tys[ 0 ] . sty ;
@@ -822,8 +821,7 @@ fn codegen_msvc_try(
822821 let i64p = Type :: i64 ( cx) . ptr_to ( ) ;
823822 let ptr_align = bx. tcx ( ) . data_layout . pointer_align ;
824823 let slot = bx. alloca ( i64p, "slot" , ptr_align) ;
825- bx. invoke ( func, & [ data] , normal. llbb ( ) , catchswitch. llbb ( ) ,
826- None ) ;
824+ bx. invoke ( func, & [ data] , normal. llbb ( ) , catchswitch. llbb ( ) , None ) ;
827825
828826 normal. ret ( C_i32 ( cx, 0 ) ) ;
829827
@@ -911,8 +909,7 @@ fn codegen_gnu_try(
911909 // being thrown. The second value is a "selector" indicating which of
912910 // the landing pad clauses the exception's type had been matched to.
913911 // rust_try ignores the selector.
914- let lpad_ty = Type :: struct_ ( cx, & [ Type :: i8p ( cx) , Type :: i32 ( cx) ] ,
915- false ) ;
912+ let lpad_ty = Type :: struct_ ( cx, & [ Type :: i8p ( cx) , Type :: i32 ( cx) ] , false ) ;
916913 let vals = catch. landing_pad ( lpad_ty, bx. cx . eh_personality ( ) , 1 ) ;
917914 catch. add_clause ( vals, C_null ( Type :: i8p ( cx) ) ) ;
918915 let ptr = catch. extract_value ( vals, 0 ) ;
@@ -1000,11 +997,11 @@ fn generic_simd_intrinsic(
1000997 ( $msg: tt, $( $fmt: tt) * ) => {
1001998 span_invalid_monomorphization_error(
1002999 bx. sess( ) , span,
1003- & format!( concat!( "invalid monomorphization of `{}` intrinsic: " ,
1004- $msg) ,
1000+ & format!( concat!( "invalid monomorphization of `{}` intrinsic: " , $msg) ,
10051001 name, $( $fmt) * ) ) ;
10061002 }
10071003 }
1004+
10081005 macro_rules! return_error {
10091006 ( $( $fmt: tt) * ) => {
10101007 {
@@ -1021,14 +1018,13 @@ fn generic_simd_intrinsic(
10211018 }
10221019 } ;
10231020 }
1021+
10241022 macro_rules! require_simd {
10251023 ( $ty: expr, $position: expr) => {
10261024 require!( $ty. is_simd( ) , "expected SIMD {} type, found non-SIMD `{}`" , $position, $ty)
10271025 }
10281026 }
10291027
1030-
1031-
10321028 let tcx = bx. tcx ( ) ;
10331029 let sig = tcx. normalize_erasing_late_bound_regions (
10341030 ty:: ParamEnv :: reveal_all ( ) ,
@@ -1121,17 +1117,17 @@ fn generic_simd_intrinsic(
11211117 } ;
11221118
11231119 return Ok ( bx. shuffle_vector ( args[ 0 ] . immediate ( ) ,
1124- args[ 1 ] . immediate ( ) ,
1125- C_vector ( & indices) ) )
1120+ args[ 1 ] . immediate ( ) ,
1121+ C_vector ( & indices) ) )
11261122 }
11271123
11281124 if name == "simd_insert" {
11291125 require ! ( in_elem == arg_tys[ 2 ] ,
11301126 "expected inserted type `{}` (element of input `{}`), found `{}`" ,
11311127 in_elem, in_ty, arg_tys[ 2 ] ) ;
11321128 return Ok ( bx. insert_element ( args[ 0 ] . immediate ( ) ,
1133- args[ 2 ] . immediate ( ) ,
1134- args[ 1 ] . immediate ( ) ) )
1129+ args[ 2 ] . immediate ( ) ,
1130+ args[ 1 ] . immediate ( ) ) )
11351131 }
11361132 if name == "simd_extract" {
11371133 require ! ( ret_ty == in_elem,
@@ -1150,9 +1146,7 @@ fn generic_simd_intrinsic(
11501146 ) ;
11511147 match m_elem_ty. sty {
11521148 ty:: Int ( _) => { } ,
1153- _ => {
1154- return_error ! ( "mask element type is `{}`, expected `i_`" , m_elem_ty) ;
1155- }
1149+ _ => return_error ! ( "mask element type is `{}`, expected `i_`" , m_elem_ty)
11561150 }
11571151 // truncate the mask to a vector of i1s
11581152 let i1 = Type :: i1 ( bx. cx ) ;
@@ -1177,8 +1171,7 @@ fn generic_simd_intrinsic(
11771171 ( $msg: tt, $( $fmt: tt) * ) => {
11781172 span_invalid_monomorphization_error(
11791173 bx. sess( ) , span,
1180- & format!( concat!( "invalid monomorphization of `{}` intrinsic: " ,
1181- $msg) ,
1174+ & format!( concat!( "invalid monomorphization of `{}` intrinsic: " , $msg) ,
11821175 name, $( $fmt) * ) ) ;
11831176 }
11841177 }
@@ -1312,7 +1305,7 @@ fn generic_simd_intrinsic(
13121305 }
13131306
13141307
1315- if name == "simd_gather" {
1308+ if name == "simd_gather" {
13161309 // simd_gather(values: <N x T>, pointers: <N x *_ T>,
13171310 // mask: <N x i{M}>) -> <N x T>
13181311 // * N: number of elements in the input vectors
@@ -1360,7 +1353,7 @@ fn generic_simd_intrinsic(
13601353 // to the element type of the first argument
13611354 let ( pointer_count, underlying_ty) = match arg_tys[ 1 ] . simd_type ( tcx) . sty {
13621355 ty:: RawPtr ( p) if p. ty == in_elem => ( ptr_count ( arg_tys[ 1 ] . simd_type ( tcx) ) ,
1363- non_ptr ( arg_tys[ 1 ] . simd_type ( tcx) ) ) ,
1356+ non_ptr ( arg_tys[ 1 ] . simd_type ( tcx) ) ) ,
13641357 _ => {
13651358 require ! ( false , "expected element type `{}` of second argument `{}` \
13661359 to be a pointer to the element type `{}` of the first \
@@ -1414,7 +1407,7 @@ fn generic_simd_intrinsic(
14141407 return Ok ( v) ;
14151408 }
14161409
1417- if name == "simd_scatter" {
1410+ if name == "simd_scatter" {
14181411 // simd_scatter(values: <N x T>, pointers: <N x *mut T>,
14191412 // mask: <N x i{M}>) -> ()
14201413 // * N: number of elements in the input vectors
@@ -1570,7 +1563,6 @@ unsupported {} from `{}` with element `{}` of size `{}` to `{}`"#,
15701563 )
15711564 }
15721565 }
1573-
15741566 } ;
15751567 Ok ( bx. $float_reduce( acc, args[ 0 ] . immediate( ) ) )
15761568 }
@@ -1750,9 +1742,9 @@ unsupported {} from `{}` with element `{}` of size `{}` to `{}`"#,
17501742 _ => { } ,
17511743 }
17521744 require!( false ,
1753- "unsupported operation on `{}` with element `{}`" ,
1754- in_ty,
1755- in_elem)
1745+ "unsupported operation on `{}` with element `{}`" ,
1746+ in_ty,
1747+ in_elem)
17561748 } ) *
17571749 }
17581750 }
0 commit comments