Commit 131c0055 authored by Victor Gomes's avatar Victor Gomes Committed by V8 LUCI CQ

Revert "[TurboFan] Change representation of NumberConstant in 32-bit arch"

This reverts commit b65e72c6.

Reason for revert: CFs issues

Original change's description:
> [TurboFan] Change representation of NumberConstant in 32-bit arch
>
> Smi constants in 32 bit machines are guaranteed to be 31 bits.
>
> Bug: chromium:1254189
> Change-Id: I4ea296a7212c5e6ea14119fbd71cfb5789762b55
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3195874
> Commit-Queue: Victor Gomes <victorgomes@chromium.org>
> Reviewed-by: Maya Lekova <mslekova@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#77185}

Bug: chromium:1254189, chromium:1255213, chromium:1255330
Change-Id: Idd9a6e76a44612d1ab9aada0d8ee093b9aab34a0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3200079
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77210}
parent cc6d54c3
......@@ -4743,12 +4743,6 @@ Node* EffectControlLinearizer::ChangeSmiToIntPtr(Node* value) {
__ ChangeInt32ToInt64(__ TruncateInt64ToInt32(value)),
SmiShiftBitsConstant());
}
if (machine()->Is32() && value->opcode() == IrOpcode::kNumberConstant) {
// Smi constants are guaranteed to be 31 bits.
double number = OpParameter<double>(value->op());
return __ WordSarShiftOutZeros(
__ Int32Constant(static_cast<int32_t>(number)), SmiShiftBitsConstant());
}
return __ WordSarShiftOutZeros(value, SmiShiftBitsConstant());
}
......
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