RFR: 8302850: Consider implementing a C1 clone intrinsic that uses ArrayCopyNode for primitive arrays

Dean Long dlong at openjdk.org
Thu Feb 8 01:19:59 UTC 2024


On Wed, 7 Feb 2024 18:45:13 GMT, Galder Zamarreño <galder at openjdk.org> wrote:

>> Rather than create a new Clone op that fuses NewTypeArray and ArrayCopy, but requires new platform-specific code, why can't we just build clone on top of the existing NewTypeArray and ArrayCopy?  We just need the new flag to avoid zeroing.
>
> @dean-long I hadn't considered that but I will definitely look into it. I see there's a c1 type for `NewTypeArray` but I don't see any for array copy. Do you have any pointers/examples on how to approach a solution like the one you suggest?

@galderz, let me see if I can get it to work.

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

PR Comment: https://git.openjdk.org/jdk/pull/17667#issuecomment-1933213054


More information about the hotspot-compiler-dev mailing list