Skip to content

Commit bb8ff30

Browse files
committed
[GR-49755] Check stamp before casting in IntegerLessThanNode
PullRequest: graal/15933
2 parents 085d1cb + 6acac87 commit bb8ff30

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/nodes/calc/IntegerLessThanNode.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ protected LogicNode findSynonym(ValueNode forX, ValueNode forY, NodeView view) {
162162
if (result != null) {
163163
return result;
164164
}
165+
if (!(forX.stamp(view) instanceof IntegerStamp)) {
166+
return null;
167+
}
165168
// always prefer unsigned comparisons, however, if part of a graph we sometimes want to
166169
// disable it for testing purposes
167170
if (forX.getOptions() == null || GraalOptions.PreferUnsignedComparison.getValue(forX.getOptions())) {

0 commit comments

Comments
 (0)