File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
133133 . expect_const ( )
134134 . try_to_valtree ( )
135135 . expect ( "expected monomorphic const in codegen" )
136+ . 0
136137 . unwrap_branch ( ) ;
137138
138139 assert_eq ! ( x. layout( ) , y. layout( ) ) ;
@@ -806,8 +807,10 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
806807 ty:: Uint ( i) if i. bit_width ( ) == Some ( expected_int_bits) => m. load_scalar ( fx) ,
807808 ty:: Array ( elem, len)
808809 if matches ! ( elem. kind( ) , ty:: Uint ( ty:: UintTy :: U8 ) )
809- && len. try_eval_target_usize ( fx. tcx , ty:: ParamEnv :: reveal_all ( ) )
810- == Some ( expected_bytes) =>
810+ && len
811+ . try_to_target_usize ( fx. tcx )
812+ . expect ( "expected monomorphic const in codegen" )
813+ == expected_bytes =>
811814 {
812815 m. force_stack ( fx) . 0 . load (
813816 fx,
@@ -907,8 +910,10 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
907910 ty:: Uint ( i) if i. bit_width ( ) == Some ( expected_int_bits) => { }
908911 ty:: Array ( elem, len)
909912 if matches ! ( elem. kind( ) , ty:: Uint ( ty:: UintTy :: U8 ) )
910- && len. try_eval_target_usize ( fx. tcx , ty:: ParamEnv :: reveal_all ( ) )
911- == Some ( expected_bytes) => { }
913+ && len
914+ . try_to_target_usize ( fx. tcx )
915+ . expect ( "expected monomorphic const in codegen" )
916+ == expected_bytes => { }
912917 _ => {
913918 fx. tcx . dcx ( ) . span_fatal (
914919 span,
You can’t perform that action at this time.
0 commit comments