Skip to content

Commit ee40fc1

Browse files
committed
[GR-53717] PostRunCanonicalization phases must call super.notApplicableTo()
PullRequest: graal/17629
2 parents 50eaae7 + b522b2b commit ee40fc1

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/phases/common/DominatorBasedGlobalValueNumberingPhase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -134,7 +134,7 @@ public DominatorBasedGlobalValueNumberingPhase(CanonicalizerPhase canonicalizer)
134134

135135
@Override
136136
public Optional<NotApplicable> notApplicableTo(GraphState graphState) {
137-
return ALWAYS_APPLICABLE;
137+
return super.notApplicableTo(graphState);
138138
}
139139

140140
@Override

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/phases/common/OptimizeOffsetAddressPhase.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -106,7 +106,9 @@ public OptimizeOffsetAddressPhase(CanonicalizerPhase canonicalizer) {
106106

107107
@Override
108108
public Optional<NotApplicable> notApplicableTo(GraphState graphState) {
109-
return NotApplicable.unlessRunBefore(this, StageFlag.FIXED_READS, graphState);
109+
return NotApplicable.ifAny(
110+
super.notApplicableTo(graphState),
111+
NotApplicable.unlessRunBefore(this, StageFlag.FIXED_READS, graphState));
110112
}
111113

112114
@Override

0 commit comments

Comments
 (0)