On Tue, 28 Jun 2022 05:20:03 GMT, Jatin Bhateja <jbhat...@openjdk.org> wrote:
>> Quan Anh Mai has updated the pull request incrementally with one additional >> commit since the last revision: >> >> add comparison for direct value of compare > > src/hotspot/cpu/x86/x86_64.ad line 13043: > >> 13041: __ cmpl($src1$$Register, $src2$$Register); >> 13042: __ movl($dst$$Register, -1); >> 13043: __ jccb(Assembler::below, done); > > By placing compare adjacent to conditional jump in-order frontend can trigger > macro-fusion. > Kindly refer section 3.4.2.2 of Intel's optimization manual. I realised that by swapping the `mov` and the `cmp` instruction, the rule needs to have `dst` different from `src1` and `src2`, which increases register pressure. ------------- PR: https://git.openjdk.org/jdk/pull/9068