Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8204418 | 11.0.1 | Aleksey Shipilev | P4 | Resolved | Fixed | team |
We found this during Shenandoah performance work. In GC barriers fastpath, we have the shape like (Set cr (CmpI (AndI (LoadUB op1) op2) opZ)), which compiles down to:
mov $op2, %r1
andb ($op1), %r1
test %r1, %r1
...while it can be compiled to just:
testb ($op1), $op2
...thus saving the %r1.
G1 SATB checks have similar shape, but without the mask, and they waste the register in the same way.
mov $op2, %r1
andb ($op1), %r1
test %r1, %r1
...while it can be compiled to just:
testb ($op1), $op2
...thus saving the %r1.
G1 SATB checks have similar shape, but without the mask, and they waste the register in the same way.
- backported by
-
JDK-8204418 Optimize (masked) byte memory comparisons on x86
-
- Resolved
-
- relates to
-
JDK-8204479 Bitwise AND on byte value sometimes produces wrong result
-
- Closed
-
-
JDK-8203696 Sweep x86_64.ad for better bitwise tests with imm{8,16,32,64} constants
-
- Open
-