Commit 9313c4ce authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[compiler] Fix a bug in VisitSpeculativeIntegerAdditiveOp

Bug: chromium:1199345
Change-Id: I33bf71b33f43919fec4684054b5bf0a0787930ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2831478Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74008}
parent 52596006
......@@ -1478,10 +1478,15 @@ class RepresentationSelector {
Type right_feedback_type = TypeOf(node->InputAt(1));
// Using Signed32 as restriction type amounts to promising there won't be
// signed overflow. This is incompatible with relying on a Word32
// truncation in order to skip the overflow check.
// signed overflow. This is incompatible with relying on a Word32 truncation
// in order to skip the overflow check. Similarly, we must not drop -0 from
// the result type unless we deopt for -0 inputs.
Type const restriction =
truncation.IsUsedAsWord32() ? Type::Any() : Type::Signed32();
truncation.IsUsedAsWord32()
? Type::Any()
: (truncation.identify_zeros() == kIdentifyZeros)
? Type::Signed32OrMinusZero()
: Type::Signed32();
// Handle the case when no int32 checks on inputs are necessary (but
// an overflow check is needed on the output). Note that we do not
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment