RFR: 8342651: Refactor array constant to use an array of jbyte [v3]
Vladimir Kozlov
kvn at openjdk.org
Wed Dec 4 18:19:39 UTC 2024
On Tue, 26 Nov 2024 18:25:08 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:
>> src/hotspot/cpu/x86/x86.ad line 2771:
>>
>>> 2769: int offset = i * type2aelembytes(bt);
>>> 2770: switch (bt) {
>>> 2771: case T_BYTE: val->at(i) = con; break;
>>
>> I don't like that switch is executed for each copied element. What is typical `len` value?
>
> `len` is at most 16 and is typically 1 (you only emit 1 element and the broadcast instruction will fill the whole register). Also, this function is only invoked a couple of times for each compilation and I think the compiler can do unswitching, too.
okay
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21596#discussion_r1870060518
More information about the hotspot-compiler-dev
mailing list