File tree 1 file changed +9
-4
lines changed
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>(
133
133
. expect_const ( )
134
134
. try_to_valtree ( )
135
135
. expect ( "expected monomorphic const in codegen" )
136
+ . 0
136
137
. unwrap_branch ( ) ;
137
138
138
139
assert_eq ! ( x. layout( ) , y. layout( ) ) ;
@@ -806,8 +807,10 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
806
807
ty:: Uint ( i) if i. bit_width ( ) == Some ( expected_int_bits) => m. load_scalar ( fx) ,
807
808
ty:: Array ( elem, len)
808
809
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 =>
811
814
{
812
815
m. force_stack ( fx) . 0 . load (
813
816
fx,
@@ -907,8 +910,10 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
907
910
ty:: Uint ( i) if i. bit_width ( ) == Some ( expected_int_bits) => { }
908
911
ty:: Array ( elem, len)
909
912
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 => { }
912
917
_ => {
913
918
fx. tcx . dcx ( ) . span_fatal (
914
919
span,
You can’t perform that action at this time.
0 commit comments