Skip to content

Commit eab7732

Browse files
committed
Handle NonDivergingIntrinsic and CopyNonOverlapping
1 parent f99950f commit eab7732

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

compiler/rustc_mir_dataflow/src/value_analysis.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,19 @@ pub trait ValueAnalysis<'tcx> {
116116

117117
fn super_intrinsic(
118118
&self,
119-
_intrinsic: &NonDivergingIntrinsic<'tcx>,
120-
_state: &mut State<Self::Value>,
119+
intrinsic: &NonDivergingIntrinsic<'tcx>,
120+
state: &mut State<Self::Value>,
121121
) {
122-
todo!();
122+
match intrinsic {
123+
NonDivergingIntrinsic::Assume(..) => {
124+
// Could use this, but ignoring it is sound.
125+
}
126+
NonDivergingIntrinsic::CopyNonOverlapping(CopyNonOverlapping { dst, .. }) => {
127+
if let Some(place) = dst.place() {
128+
state.flood(place.as_ref(), self.map());
129+
}
130+
}
131+
}
123132
}
124133

125134
fn handle_assign(

0 commit comments

Comments
 (0)