Lower the assume intrinsic to a MIR statement
This commit is contained in:
parent
b8169a6da0
commit
088e03fe22
@ -791,6 +791,8 @@ fn is_fat_ptr<'tcx>(fx: &FunctionCx<'_, '_, 'tcx>, ty: Ty<'tcx>) -> bool {
|
||||
| StatementKind::Nop
|
||||
| StatementKind::FakeRead(..)
|
||||
| StatementKind::Retag { .. }
|
||||
// We ignore `assume` intrinsics, they are only useful for optimizations
|
||||
| StatementKind::Assume(..)
|
||||
| StatementKind::AscribeUserType(..) => {}
|
||||
|
||||
StatementKind::Coverage { .. } => fx.tcx.sess.fatal("-Zcoverage is unimplemented"),
|
||||
|
@ -540,6 +540,7 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
|
||||
return None;
|
||||
} // conservative handling
|
||||
StatementKind::Assign(_)
|
||||
| StatementKind::Assume(_)
|
||||
| StatementKind::FakeRead(_)
|
||||
| StatementKind::SetDiscriminant { .. }
|
||||
| StatementKind::Deinit(_)
|
||||
|
@ -357,9 +357,6 @@ fn codegen_regular_intrinsic_call<'tcx>(
|
||||
let usize_layout = fx.layout_of(fx.tcx.types.usize);
|
||||
|
||||
match intrinsic {
|
||||
sym::assume => {
|
||||
intrinsic_args!(fx, args => (_a); intrinsic);
|
||||
}
|
||||
sym::likely | sym::unlikely => {
|
||||
intrinsic_args!(fx, args => (a); intrinsic);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user