Skip to content

Commit 79c0737

Browse files
committed
Do not flood on copy_nonoverlapping.
1 parent add5124 commit 79c0737

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

compiler/rustc_mir_dataflow/src/value_analysis.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,18 @@ pub trait ValueAnalysis<'tcx> {
123123
fn super_intrinsic(
124124
&self,
125125
intrinsic: &NonDivergingIntrinsic<'tcx>,
126-
state: &mut State<Self::Value>,
126+
_state: &mut State<Self::Value>,
127127
) {
128128
match intrinsic {
129129
NonDivergingIntrinsic::Assume(..) => {
130130
// Could use this, but ignoring it is sound.
131131
}
132-
NonDivergingIntrinsic::CopyNonOverlapping(CopyNonOverlapping { dst, .. }) => {
133-
if let Some(place) = dst.place() {
134-
state.flood(place.as_ref(), self.map());
135-
}
132+
NonDivergingIntrinsic::CopyNonOverlapping(CopyNonOverlapping {
133+
dst: _,
134+
src: _,
135+
count: _,
136+
}) => {
137+
// This statement represents `*dst = *src`, `count` times.
136138
}
137139
}
138140
}

0 commit comments

Comments
 (0)