Skip to content
Permalink
Browse files

8238680: C2: Remove redundant AD instructions for Replicate nodes

Reviewed-by: thartmann, sviswanathan
  • Loading branch information
Vladimir Ivanov
Vladimir Ivanov committed Feb 11, 2020
1 parent 590f599 commit 0d84fe987268a006eb4b35ab67aa28364aae16ca
Showing with 34 additions and 176 deletions.
  1. +4 −4 src/hotspot/cpu/x86/assembler_x86.cpp
  2. +4 −4 src/hotspot/cpu/x86/assembler_x86.hpp
  3. +26 −168 src/hotspot/cpu/x86/x86.ad
@@ -7159,15 +7159,15 @@ void Assembler::evbroadcasti64x2(XMMRegister dst, Address src, int vector_len) {
// scalar single/double precision replicate

// duplicate single precision data from src into programmed locations in dest : requires AVX512VL
void Assembler::vpbroadcastss(XMMRegister dst, XMMRegister src, int vector_len) {
void Assembler::vbroadcastss(XMMRegister dst, XMMRegister src, int vector_len) {
assert(VM_Version::supports_avx(), "");
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
emit_int8(0x18);
emit_int8((unsigned char)(0xC0 | encode));
}

void Assembler::vpbroadcastss(XMMRegister dst, Address src, int vector_len) {
void Assembler::vbroadcastss(XMMRegister dst, Address src, int vector_len) {
assert(VM_Version::supports_avx(), "");
assert(dst != xnoreg, "sanity");
InstructionMark im(this);
@@ -7180,7 +7180,7 @@ void Assembler::vpbroadcastss(XMMRegister dst, Address src, int vector_len) {
}

// duplicate double precision data from src into programmed locations in dest : requires AVX512VL
void Assembler::vpbroadcastsd(XMMRegister dst, XMMRegister src, int vector_len) {
void Assembler::vbroadcastsd(XMMRegister dst, XMMRegister src, int vector_len) {
assert(VM_Version::supports_avx(), "");
InstructionAttr attributes(vector_len, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
attributes.set_rex_vex_w_reverted();
@@ -7189,7 +7189,7 @@ void Assembler::vpbroadcastsd(XMMRegister dst, XMMRegister src, int vector_len)
emit_int8((unsigned char)(0xC0 | encode));
}

void Assembler::vpbroadcastsd(XMMRegister dst, Address src, int vector_len) {
void Assembler::vbroadcastsd(XMMRegister dst, Address src, int vector_len) {
assert(VM_Version::supports_avx(), "");
assert(dst != xnoreg, "sanity");
InstructionMark im(this);
@@ -2217,10 +2217,10 @@ class Assembler : public AbstractAssembler {
void evbroadcasti64x2(XMMRegister dst, Address src, int vector_len);

// scalar single/double precision replicate
void vpbroadcastss(XMMRegister dst, XMMRegister src, int vector_len);
void vpbroadcastss(XMMRegister dst, Address src, int vector_len);
void vpbroadcastsd(XMMRegister dst, XMMRegister src, int vector_len);
void vpbroadcastsd(XMMRegister dst, Address src, int vector_len);
void vbroadcastss(XMMRegister dst, XMMRegister src, int vector_len);
void vbroadcastss(XMMRegister dst, Address src, int vector_len);
void vbroadcastsd(XMMRegister dst, XMMRegister src, int vector_len);
void vbroadcastsd(XMMRegister dst, Address src, int vector_len);

// gpr sourced byte/word/dword/qword replicate
void evpbroadcastb(XMMRegister dst, Register src, int vector_len);

0 comments on commit 0d84fe9

Please sign in to comment.