Skip to content

Commit ab2340a

Browse files
GeorgNeisCommit Bot
authored andcommitted
M86-LTS: [compiler] Fix a bug in VisitSpeculativeIntegerAdditiveOp
(cherry picked from commit 9313c4c) No-Try: true No-Presubmit: true No-Tree-Checks: true Bug: chromium:1199345 Change-Id: I33bf71b33f43919fec4684054b5bf0a0787930ca Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831478 Reviewed-by: Nico Hartmann <[email protected]> Commit-Queue: Georg Neis <[email protected]> Cr-Original-Commit-Position: refs/heads/master@{#74008} Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2848412 Commit-Queue: Artem Sumaneev <[email protected]> Reviewed-by: Victor-Gabriel Savu <[email protected]> Cr-Commit-Position: refs/branch-heads/8.6@{#86} Cr-Branched-From: a64aed2-refs/heads/8.6.395@{#1} Cr-Branched-From: a626bc0-refs/heads/master@{#69472}
1 parent 3d4ab32 commit ab2340a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/compiler/simplified-lowering.cc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)