Do not flood on copy_nonoverlapping.

This commit is contained in:
Camille GILLOT 2023-04-25 19:50:22 +00:00
parent add5124dce
commit 79c073746b

View File

@ -123,16 +123,18 @@ pub trait ValueAnalysis<'tcx> {
fn super_intrinsic(
&self,
intrinsic: &NonDivergingIntrinsic<'tcx>,
state: &mut State<Self::Value>,
_state: &mut State<Self::Value>,
) {
match intrinsic {
NonDivergingIntrinsic::Assume(..) => {
// Could use this, but ignoring it is sound.
}
NonDivergingIntrinsic::CopyNonOverlapping(CopyNonOverlapping { dst, .. }) => {
if let Some(place) = dst.place() {
state.flood(place.as_ref(), self.map());
}
NonDivergingIntrinsic::CopyNonOverlapping(CopyNonOverlapping {
dst: _,
src: _,
count: _,
}) => {
// This statement represents `*dst = *src`, `count` times.
}
}
}