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 @@ -1318,10 +1318,15 @@ class RepresentationSelector {
13181318 Type right_feedback_type = TypeOf (node->InputAt (1 ));
13191319
13201320 // Using Signed32 as restriction type amounts to promising there won't be
1321- // signed overflow. This is incompatible with relying on a Word32
1322- // truncation in order to skip the overflow check.
1321+ // signed overflow. This is incompatible with relying on a Word32 truncation
1322+ // in order to skip the overflow check. Similarly, we must not drop -0 from
1323+ // the result type unless we deopt for -0 inputs.
13231324 Type const restriction =
1324- truncation.IsUsedAsWord32 () ? Type::Any () : Type::Signed32 ();
1325+ truncation.IsUsedAsWord32 ()
1326+ ? Type::Any ()
1327+ : (truncation.identify_zeros () == kIdentifyZeros )
1328+ ? Type::Signed32OrMinusZero ()
1329+ : Type::Signed32 ();
13251330
13261331 // Handle the case when no int32 checks on inputs are necessary (but
13271332 // 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