Commit 6e79970f authored by Toon Verwaest's avatar Toon Verwaest Committed by V8 LUCI CQ

[maglev] Convert smi->int32 constant

Bug: v8:7700
Change-Id: I4a772e0b2b821376ba75afd587694e130f059089
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3647831
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80643}
parent a679edbb
......@@ -354,6 +354,8 @@ class MaglevGraphBuilder {
case ValueRepresentation::kTagged: {
if (value->Is<CheckedSmiTag>()) {
return value->input(0).node();
} else if (SmiConstant* constant = value->TryCast<SmiConstant>()) {
return AddNewNode<Int32Constant>({}, constant->value().value());
}
return AddNewConversionNode<CheckedSmiUntag>(reg, value);
}
......
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