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>(
791
791
| StatementKind :: Nop
792
792
| StatementKind :: FakeRead ( ..)
793
793
| StatementKind :: Retag { .. }
794
+ // We ignore `assume` intrinsics, they are only useful for optimizations
795
+ | StatementKind :: Assume ( ..)
794
796
| StatementKind :: AscribeUserType ( ..) => { }
795
797
796
798
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>(
540
540
return None ;
541
541
} // conservative handling
542
542
StatementKind :: Assign ( _)
543
+ | StatementKind :: Assume ( _)
543
544
| StatementKind :: FakeRead ( _)
544
545
| StatementKind :: SetDiscriminant { .. }
545
546
| StatementKind :: Deinit ( _)
Original file line number Diff line number Diff line change @@ -357,9 +357,6 @@ fn codegen_regular_intrinsic_call<'tcx>(
357
357
let usize_layout = fx. layout_of ( fx. tcx . types . usize ) ;
358
358
359
359
match intrinsic {
360
- sym:: assume => {
361
- intrinsic_args ! ( fx, args => ( _a) ; intrinsic) ;
362
- }
363
360
sym:: likely | sym:: unlikely => {
364
361
intrinsic_args ! ( fx, args => ( a) ; intrinsic) ;
365
362
You can’t perform that action at this time.
0 commit comments