RFR: 8266962: Add arch supporting check for "Op_VectorLoadConst" before creating the node

Vladimir Ivanov vlivanov at openjdk.java.net
Tue May 18 11:26:42 UTC 2021


On Mon, 17 May 2021 03:18:34 GMT, Xiaohong Gong <xgong at openjdk.org> wrote:

> As far as I know the VectorLoadConst is used here to get the initial shuffle iota of the vector. I'm not so clear about what the iota vector constant materialization you mean.

`VectorLoadConst` is backed by a constant in `StubRoutines`. Instead, the constant can be materialized as a on-heap ByteVector instance, cached in a static final field, and passed into the intrinsic.

An alternative approach would be to replace `VectorLoadConst` with a `LoadVector` which performs raw vector access at `StubRoutines::_vector_iota_indices` address.

All in all, I don't see `VectorLoadConst` well-justified.
 

src/hotspot/cpu/aarch64/aarch64_neon.ad:

  3369 instruct loadcon8B(vecD dst, immI0 src)
  3374   match(Set dst (VectorLoadConst src));
  3378     __ lea(rscratch1, ExternalAddress(StubRoutines::aarch64::vector_iota_indices()));


src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp:

  7055     StubRoutines::aarch64::_vector_iota_indices    = generate_iota_indices("iota_indices");

   618   // Generate indices for iota vector.
   619   address generate_iota_indices(const char *stub_name) {
   620     __ align(CodeEntryAlignment);
   621     StubCodeMark mark(this, "StubRoutines", stub_name);
   622     address start = __ pc();
   623     __ emit_data64(0x0706050403020100, relocInfo::none);
   624     __ emit_data64(0x0F0E0D0C0B0A0908, relocInfo::none);
   625     return start;
   626   }

-------------

PR: https://git.openjdk.java.net/jdk/pull/4023


More information about the hotspot-compiler-dev mailing list