-
Enhancement
-
Resolution: Fixed
-
P4
-
21, 22
-
b02
-
aarch64
-
generic
Array length check, like below:
```
void test(int ia[]) {
if (ia.length > 0) {
result += 0x88;
} else {
result -= 1;
}
}
```
c2 will generate code like:
```
ldr w11, [x2, #12]
cmp w11, #0x0
b.ls 0x0000ffff9c487ed0 // b.plast ;;
ldr w11, [x1, #12]
add w10, w11, #0x88
str w10, [x1, #12]
...
```
On aarch64 port, for certain unsigned integral comparisons, like:
```
cmp w11, #0x0
b.ls 0x0000ffff9c487ed0 // b.plast ;;
```
we can convert to:
```
cbz w11, 0x0000ffff9c487ed0
```
```
void test(int ia[]) {
if (ia.length > 0) {
result += 0x88;
} else {
result -= 1;
}
}
```
c2 will generate code like:
```
ldr w11, [x2, #12]
cmp w11, #0x0
b.ls 0x0000ffff9c487ed0 // b.plast ;;
ldr w11, [x1, #12]
add w10, w11, #0x88
str w10, [x1, #12]
...
```
On aarch64 port, for certain unsigned integral comparisons, like:
```
cmp w11, #0x0
b.ls 0x0000ffff9c487ed0 // b.plast ;;
```
we can convert to:
```
cbz w11, 0x0000ffff9c487ed0
```
- links to
-
Commit openjdk/jdk/2c9185eb
-
Review openjdk/jdk/16989
-
Review(master) openjdk/jdk21u-dev/940