File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/core/test Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 27
27
28
28
import org .junit .Test ;
29
29
30
- import jdk .graal .compiler .core .common .NumUtil ;
31
30
import jdk .graal .compiler .nodes .StructuredGraph ;
32
31
import jdk .vm .ci .meta .ResolvedJavaMethod ;
33
32
@@ -102,7 +101,9 @@ public void testByteMaxEqualsToLessThanSymbolic() {
102
101
}
103
102
104
103
public static boolean byteUMaxEqualsToLessThanSnippet (ByteHolder holder ) {
105
- return NumUtil .maxUnsigned (holder .b & 0xff , 7 ) == 7 ;
104
+ byte b = holder .b ;
105
+ int result = Integer .compareUnsigned (b & 0xff , 7 ) < 0 ? 7 : b & 0xff ;
106
+ return result == 7 ;
106
107
}
107
108
108
109
public static boolean byteUMaxEqualsToLessThanReference (ByteHolder holder ) {
@@ -128,7 +129,9 @@ public void testByteMinEqualsToLessThan() {
128
129
}
129
130
130
131
public static boolean byteUMinEqualsToLessThanSnippet (ByteHolder holder ) {
131
- return NumUtil .minUnsigned (holder .b & 0xff , 7 ) == 7 ;
132
+ byte b = holder .b ;
133
+ int result = Integer .compareUnsigned (b & 0xff , 7 ) > 0 ? 7 : b & 0xff ;
134
+ return result == 7 ;
132
135
}
133
136
134
137
public static boolean byteUMinEqualsToLessThanReference (ByteHolder holder ) {
You can’t perform that action at this time.
0 commit comments