File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -1453,10 +1453,15 @@ class RepresentationSelector {
14531453 Type right_feedback_type = TypeOf (node->InputAt (1 ));
14541454
14551455 // Using Signed32 as restriction type amounts to promising there won't be
1456- // signed overflow. This is incompatible with relying on a Word32
1457- // truncation in order to skip the overflow check.
1456+ // signed overflow. This is incompatible with relying on a Word32 truncation
1457+ // in order to skip the overflow check. Similarly, we must not drop -0 from
1458+ // the result type unless we deopt for -0 inputs.
14581459 Type const restriction =
1459- truncation.IsUsedAsWord32 () ? Type::Any () : Type::Signed32 ();
1460+ truncation.IsUsedAsWord32 ()
1461+ ? Type::Any ()
1462+ : (truncation.identify_zeros () == kIdentifyZeros )
1463+ ? Type::Signed32OrMinusZero ()
1464+ : Type::Signed32 ();
14601465
14611466 // Handle the case when no int32 checks on inputs are necessary (but
14621467 // an overflow check is needed on the output). Note that we do not
You can’t perform that action at this time.
0 commit comments