Lower the assume intrinsic to a MIR statement

This commit is contained in:
Oli Scherer
2022-06-30 08:16:05 +00:00
parent 3c72788461
commit 3f07645120
33 changed files with 212 additions and 30 deletions

View File

@@ -93,6 +93,11 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
bx.memcpy(dst, align, src, align, bytes, crate::MemFlags::empty());
bx
}
mir::StatementKind::Assume(box ref op) => {
let op_val = self.codegen_operand(&mut bx, op);
bx.assume(op_val.immediate());
bx
}
mir::StatementKind::FakeRead(..)
| mir::StatementKind::Retag { .. }
| mir::StatementKind::AscribeUserType(..)