Remove overflow checks from ConstProp.
This commit is contained in:
parent
4bd2ebc58b
commit
e34caaf42d
8 changed files with 88 additions and 116 deletions
|
@ -180,12 +180,7 @@ impl<'tcx> ValueAnalysis<'tcx> for ConstAnalysis<'_, 'tcx> {
|
|||
let overflow = match overflow {
|
||||
FlatSet::Top => FlatSet::Top,
|
||||
FlatSet::Elem(overflow) => {
|
||||
if overflow {
|
||||
// Overflow cannot be reliably propagated. See: https://github.com/rust-lang/rust/pull/101168#issuecomment-1288091446
|
||||
FlatSet::Top
|
||||
} else {
|
||||
self.wrap_scalar(Scalar::from_bool(false), self.tcx.types.bool)
|
||||
}
|
||||
self.wrap_scalar(Scalar::from_bool(overflow), self.tcx.types.bool)
|
||||
}
|
||||
FlatSet::Bottom => FlatSet::Bottom,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue