[compiler] Fix a bug in SimplifiedLowering

Bug: chromium:1245949
Change-Id: Ib0a9b3b9307c925d6c3bb0b9c294eea5545b3819
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3138200
Commit-Queue: Georg Neis <neis@chromium.org>
Commit-Queue: Nico Hartmann <nicohartmann@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76641}
This commit is contained in:
Georg Neis 2021-09-02 12:49:00 +02:00 committed by V8 LUCI CQ
parent 66234a4d94
commit dc81345f7e
2 changed files with 17 additions and 1 deletions

View File

@ -3828,7 +3828,7 @@ class RepresentationSelector {
case IrOpcode::kDateNow:
VisitInputs<T>(node);
return SetOutput<T>(node, MachineRepresentation::kTaggedPointer);
return SetOutput<T>(node, MachineRepresentation::kTagged);
case IrOpcode::kFrameState:
return VisitFrameState<T>(FrameState{node});
case IrOpcode::kStateValues:

View File

@ -0,0 +1,16 @@
// Copyright 2021 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Flags: --allow-natives-syntax
function main() {
const v2 = Date.now();
const v3 = /z/;
v3.test(v2);
}
%PrepareFunctionForOptimization(main);
main();
%OptimizeFunctionOnNextCall(main);
main();