Lower the assume intrinsic to a MIR statement
This commit is contained in:
parent
3c72788461
commit
3f07645120
33 changed files with 212 additions and 30 deletions
|
@ -77,10 +77,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
|||
let result = PlaceRef::new_sized(llresult, fn_abi.ret.layout);
|
||||
|
||||
let llval = match name {
|
||||
sym::assume => {
|
||||
bx.assume(args[0].immediate());
|
||||
return;
|
||||
}
|
||||
sym::abort => {
|
||||
bx.abort();
|
||||
return;
|
||||
|
|
|
@ -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(..)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue