Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -140,4 +140,15 @@ public TriState tryFold(Stamp xStampGeneric, Stamp yStampGeneric) {
}
return TriState.UNKNOWN;
}

@Override
public TriState implies(boolean thisNegated, LogicNode other) {
if (thisNegated && other instanceof IntegerEqualsNode equals && equals.getY().isDefaultConstant() && equals.getX() instanceof AndNode and) {
/* this: (x & y) != 0, other: (a & b) == 0 */
if ((getX() == and.getX() && getY() == and.getY()) || (getX() == and.getY() && getY() == and.getX())) {
return TriState.FALSE;
}
}
return super.implies(thisNegated, other);
}
}