interpret: make overflowing binops just normal binops

This commit is contained in:
Ralf Jung
2024-05-21 12:17:34 +02:00
parent 9cb6bb8599
commit c0b4b454c3
40 changed files with 323 additions and 349 deletions

View File

@@ -97,7 +97,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
for (const_int, target) in targets.iter() {
// Compare using MIR BinOp::Eq, to also support pointer values.
// (Avoiding `self.binary_op` as that does some redundant layout computation.)
let res = self.wrapping_binary_op(
let res = self.binary_op(
mir::BinOp::Eq,
&discr,
&ImmTy::from_uint(const_int, discr.layout),