NullnessValue equalBranchValue = leftVal.greatestLowerBound(rightVal);
LocalVariableUpdates equalBranchUpdates = equalTo ? thenUpdates : elseUpdates;
LocalVariableUpdates notEqualBranchUpdates = equalTo ? elseUpdates : thenUpdates;
if (leftNode instanceof LocalVariableNode) {
LocalVariableNode localVar = (LocalVariableNode) leftNode;
equalBranchUpdates.set(localVar, equalBranchValue);
notEqualBranchUpdates.set(
localVar, leftVal.greatestLowerBound(rightVal.deducedValueWhenNotEqual()));
}
if (rightNode instanceof LocalVariableNode) {
LocalVariableNode localVar = (LocalVariableNode) rightNode;
equalBranchUpdates.set(localVar, equalBranchValue);
notEqualBranchUpdates.set(
localVar, rightVal.greatestLowerBound(leftVal.deducedValueWhenNotEqual()));
}
}