pub enum NonDivergingIntrinsic<'tcx> {
Assume(Operand<'tcx>),
CopyNonOverlapping(CopyNonOverlapping<'tcx>),
}Variants§
Assume(Operand<'tcx>)
Denotes a call to the intrinsic function assume.
The operand must be a boolean. Optimizers may use the value of the boolean to backtrack its
computation to infer information about other variables. So if the boolean came from a
x < y operation, subsequent operations on x and y could elide various bound checks.
If the argument is false, this operation is equivalent to TerminatorKind::Unreachable.
CopyNonOverlapping(CopyNonOverlapping<'tcx>)
Denotes a call to the intrinsic function copy_nonoverlapping.
First, all three operands are evaluated. src and dest must each be a reference, pointer,
or Box pointing to the same type T. count must evaluate to a usize. Then, src and
dest are dereferenced, and count * size_of::<T>() bytes beginning with the first byte of
the src place are copied to the contiguous range of bytes beginning with the first byte
of dest.
Needs clarification: In what order are operands computed and dereferenced? It should probably match the order for assignment, but that is also undecided.
Needs clarification: Is this typed or not, ie is there a typed load and store involved? I vaguely remember Ralf saying somewhere that he thought it should not be.