Skip to content

Commit b04b304

Browse files
author
Jatin Bhateja
committed
8329254: optimize integral reverse operations on x86 GFNI target.
Reviewed-by: sviswanathan
1 parent d9c84e7 commit b04b304

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/hotspot/cpu/x86/vm_version_x86.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2951,6 +2951,8 @@ uint64_t VM_Version::CpuidInfo::feature_flags() const {
29512951
if (sef_cpuid7_ecx1_eax.bits.avx_ifma != 0)
29522952
result |= CPU_AVX_IFMA;
29532953
}
2954+
if (sef_cpuid7_ecx.bits.gfni != 0)
2955+
result |= CPU_GFNI;
29542956
if (sef_cpuid7_ebx.bits.avx512f != 0 &&
29552957
xem_xcr0_eax.bits.opmask != 0 &&
29562958
xem_xcr0_eax.bits.zmm512 != 0 &&
@@ -2976,8 +2978,6 @@ uint64_t VM_Version::CpuidInfo::feature_flags() const {
29762978
result |= CPU_AVX512_VPCLMULQDQ;
29772979
if (sef_cpuid7_ecx.bits.vaes != 0)
29782980
result |= CPU_AVX512_VAES;
2979-
if (sef_cpuid7_ecx.bits.gfni != 0)
2980-
result |= CPU_GFNI;
29812981
if (sef_cpuid7_ecx.bits.avx512_vnni != 0)
29822982
result |= CPU_AVX512_VNNI;
29832983
if (sef_cpuid7_ecx.bits.avx512_bitalg != 0)

src/hotspot/cpu/x86/x86_64.ad

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5662,7 +5662,7 @@ instruct bytes_reversebit_int(rRegI dst, rRegI src, rRegI rtmp, rFlagsReg cr) %{
56625662
ins_pipe( ialu_reg );
56635663
%}
56645664

5665-
instruct bytes_reversebit_int_gfni(rRegI dst, rRegI src, regF xtmp1, regF xtmp2, rRegL rtmp, rFlagsReg cr) %{
5665+
instruct bytes_reversebit_int_gfni(rRegI dst, rRegI src, vlRegF xtmp1, vlRegF xtmp2, rRegL rtmp, rFlagsReg cr) %{
56665666
predicate(VM_Version::supports_gfni());
56675667
match(Set dst (ReverseI src));
56685668
effect(TEMP dst, TEMP xtmp1, TEMP xtmp2, TEMP rtmp, KILL cr);
@@ -5684,7 +5684,7 @@ instruct bytes_reversebit_long(rRegL dst, rRegL src, rRegL rtmp1, rRegL rtmp2, r
56845684
ins_pipe( ialu_reg );
56855685
%}
56865686

5687-
instruct bytes_reversebit_long_gfni(rRegL dst, rRegL src, regD xtmp1, regD xtmp2, rRegL rtmp, rFlagsReg cr) %{
5687+
instruct bytes_reversebit_long_gfni(rRegL dst, rRegL src, vlRegD xtmp1, vlRegD xtmp2, rRegL rtmp, rFlagsReg cr) %{
56885688
predicate(VM_Version::supports_gfni());
56895689
match(Set dst (ReverseL src));
56905690
effect(TEMP dst, TEMP xtmp1, TEMP xtmp2, TEMP rtmp, KILL cr);

0 commit comments

Comments
 (0)