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>(
182
182
183
183
// Make sure this is actually a SIMD vector.
184
184
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 ) )
187
187
{
188
- idx_ty. simd_size_and_type ( fx. tcx ) . 0 . try_into ( ) . unwrap ( )
189
- } else {
190
188
fx. tcx . dcx ( ) . span_err (
191
189
span,
192
190
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>(
195
193
fx. bcx . ins ( ) . trap ( TrapCode :: UnreachableCodeReached ) ;
196
194
return ;
197
195
} ;
196
+ let n: u16 = idx_ty. simd_size_and_type ( fx. tcx ) . 0 . try_into ( ) . unwrap ( ) ;
198
197
199
198
assert_eq ! ( x. layout( ) , y. layout( ) ) ;
200
199
let layout = x. layout ( ) ;
You can’t perform that action at this time.
0 commit comments