Skip to content

Commit 6a61e53

Browse files
rmacnak-googlepull[bot]
authored andcommitted
[vm, compiler] Don't introduce spurious connections to check bounds instructions during LICM.
TEST=dartfuzz Bug: #56947 Change-Id: Icf593c246f226dd9d8d8b6b055122f8b567be35e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/391682 Reviewed-by: Alexander Markov <[email protected]> Commit-Queue: Ryan Macnak <[email protected]>
1 parent 7338570 commit 6a61e53

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
// The Dart Project Fuzz Tester (1.101).
6+
// Program generated as:
7+
// dart dartfuzz.dart --seed 466727405 --no-fp --no-ffi --flat
8+
// @dart=2.14
9+
10+
import 'dart:typed_data';
11+
12+
Int16List var11 = Int16List(33);
13+
List<bool> var79 = <bool>[true, false];
14+
Map<int, bool> var109 = <int, bool>{-74: true, -72: false, 34: true};
15+
16+
main() {
17+
try {
18+
if (var79[-9223372034707292160]) {
19+
switch ((var109[var11[-9223372034707292160]]! ? 100 : 200) <<
20+
(~9223372034707292159)) {}
21+
}
22+
} catch (e, st) {
23+
print("foo throws");
24+
}
25+
}

runtime/vm/compiler/backend/flow_graph.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2678,7 +2678,8 @@ void FlowGraph::RenameUsesDominatedByRedefinitions() {
26782678
Definition* definition = instr_it.Current()->AsDefinition();
26792679
// CheckArrayBound instructions have their own mechanism for ensuring
26802680
// proper dependencies, so we don't rewrite those here.
2681-
if (definition != nullptr && !definition->IsCheckArrayBound()) {
2681+
if (definition != nullptr && !definition->IsCheckArrayBound() &&
2682+
!definition->IsGenericCheckBound()) {
26822683
Value* redefined = definition->RedefinedValue();
26832684
if (redefined != nullptr) {
26842685
if (!definition->HasSSATemp()) {

0 commit comments

Comments
 (0)