File tree Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Expand file tree Collapse file tree 3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -791,6 +791,8 @@ fn codegen_stmt<'tcx>(
791791 | StatementKind :: Nop
792792 | StatementKind :: FakeRead ( ..)
793793 | StatementKind :: Retag { .. }
794+ // We ignore `assume` intrinsics, they are only useful for optimizations
795+ | StatementKind :: Assume ( ..)
794796 | StatementKind :: AscribeUserType ( ..) => { }
795797
796798 StatementKind :: Coverage { .. } => fx. tcx . sess . fatal ( "-Zcoverage is unimplemented" ) ,
Original file line number Diff line number Diff line change @@ -540,6 +540,7 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
540540 return None ;
541541 } // conservative handling
542542 StatementKind :: Assign ( _)
543+ | StatementKind :: Assume ( _)
543544 | StatementKind :: FakeRead ( _)
544545 | StatementKind :: SetDiscriminant { .. }
545546 | StatementKind :: Deinit ( _)
Original file line number Diff line number Diff line change @@ -357,9 +357,6 @@ fn codegen_regular_intrinsic_call<'tcx>(
357357 let usize_layout = fx. layout_of ( fx. tcx . types . usize ) ;
358358
359359 match intrinsic {
360- sym:: assume => {
361- intrinsic_args ! ( fx, args => ( _a) ; intrinsic) ;
362- }
363360 sym:: likely | sym:: unlikely => {
364361 intrinsic_args ! ( fx, args => ( a) ; intrinsic) ;
365362
You can’t perform that action at this time.
0 commit comments