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
Expand Up @@ -27,7 +27,6 @@

import org.junit.Test;

import jdk.graal.compiler.core.common.NumUtil;
import jdk.graal.compiler.nodes.StructuredGraph;
import jdk.vm.ci.meta.ResolvedJavaMethod;

Expand Down Expand Up @@ -102,7 +101,9 @@ public void testByteMaxEqualsToLessThanSymbolic() {
}

public static boolean byteUMaxEqualsToLessThanSnippet(ByteHolder holder) {
return NumUtil.maxUnsigned(holder.b & 0xff, 7) == 7;
byte b = holder.b;
int result = Integer.compareUnsigned(b & 0xff, 7) < 0 ? 7 : b & 0xff;
return result == 7;
}

public static boolean byteUMaxEqualsToLessThanReference(ByteHolder holder) {
Expand All @@ -128,7 +129,9 @@ public void testByteMinEqualsToLessThan() {
}

public static boolean byteUMinEqualsToLessThanSnippet(ByteHolder holder) {
return NumUtil.minUnsigned(holder.b & 0xff, 7) == 7;
byte b = holder.b;
int result = Integer.compareUnsigned(b & 0xff, 7) > 0 ? 7 : b & 0xff;
return result == 7;
}

public static boolean byteUMinEqualsToLessThanReference(ByteHolder holder) {
Expand Down