Lower the assume intrinsic to a MIR statement
This commit is contained in:
parent
b8169a6da0
commit
088e03fe22
3 changed files with 3 additions and 3 deletions
|
@ -791,6 +791,8 @@ fn codegen_stmt<'tcx>(
|
|||
| 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…
Add table
Reference in a new issue