File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -182,11 +182,9 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
182182
183183 // Make sure this is actually a SIMD vector.
184184 let idx_ty = fx. monomorphize ( idx. node . ty ( fx. mir , fx. tcx ) ) ;
185- let n : u16 = if idx_ty. is_simd ( )
186- && matches ! ( idx_ty. simd_size_and_type( fx. tcx) . 1 . kind( ) , ty:: Uint ( ty:: UintTy :: U32 ) )
185+ if ! idx_ty. is_simd ( )
186+ || ! matches ! ( idx_ty. simd_size_and_type( fx. tcx) . 1 . kind( ) , ty:: Uint ( ty:: UintTy :: U32 ) )
187187 {
188- idx_ty. simd_size_and_type ( fx. tcx ) . 0 . try_into ( ) . unwrap ( )
189- } else {
190188 fx. tcx . dcx ( ) . span_err (
191189 span,
192190 format ! ( "simd_shuffle index must be a SIMD vector of `u32`, got `{}`" , idx_ty) ,
@@ -195,6 +193,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
195193 fx. bcx . ins ( ) . trap ( TrapCode :: UnreachableCodeReached ) ;
196194 return ;
197195 } ;
196+ let n: u16 = idx_ty. simd_size_and_type ( fx. tcx ) . 0 . try_into ( ) . unwrap ( ) ;
198197
199198 assert_eq ! ( x. layout( ) , y. layout( ) ) ;
200199 let layout = x. layout ( ) ;
You can’t perform that action at this time.
0 commit comments