Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8311742 | 17.0.9 | Fei Yang | P4 | Resolved | Fixed | b01 |
Description
The single-bit instructions from the Zbs extension provide a mechanism to set, clear, invert, or extract a single bit in a register. The bit is specified by its index.
Especially, the single-bit extract (immediate) instruction 'bexti rd, rs1, shamt' performs this operation:
```
let index = shamt & (XLEN - 1);
X(rd) = (X(rs1) >> index) & 1;
```
This instruction could be used to match for following sub-graph in C2 where integer immediate 'mask' is power of 2:
'''
Set dst (Conv2B (AndI src mask))
'''
Especially, the single-bit extract (immediate) instruction 'bexti rd, rs1, shamt' performs this operation:
```
let index = shamt & (XLEN - 1);
X(rd) = (X(rs1) >> index) & 1;
```
This instruction could be used to match for following sub-graph in C2 where integer immediate 'mask' is power of 2:
'''
Set dst (Conv2B (AndI src mask))
'''
Attachments
Issue Links
- backported by
-
JDK-8311742 RISC-V: C2: Use single-bit instructions from the Zbs extension
-
- Resolved
-
- links to
-
Commit openjdk/jdk17u-dev/966fc82d
-
Commit openjdk/jdk/d50015af
-
Commit openjdk/riscv-port-jdk11u/f305abc3
-
Review openjdk/jdk17u-dev/1427
-
Review openjdk/jdk/11406
-
Review openjdk/riscv-port-jdk11u/21
-
Review openjdk/riscv-port-jdk17u/26
(3 links to)